OSDN Git Service

uclinux-h8/linux.git
15 years agousb gadget: USB_GADGET_VBUS_DRAW Kconfig option
David Brownell [Fri, 12 Sep 2008 16:39:06 +0000 (09:39 -0700)]
usb gadget: USB_GADGET_VBUS_DRAW Kconfig option

Offer a "how much VBUS power to request" configuration option
for USB gadgets that aren't using board-specific customization
of their gadget or (composite) configuration drivers.

Also remove a couple pointless "depends on USB_GADGET" bits
from the Kconfig text; booleans inside an "if USB_GADGET" will
already have that dependency.

Based on a patch from Justin Clacherty.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Justin Clacherty <justin@redfish-group.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoMUSB: Add sanity check for maximum number of endpoints
Kevin Hilman [Mon, 15 Sep 2008 10:09:31 +0000 (12:09 +0200)]
MUSB: Add sanity check for maximum number of endpoints

There is no check if platform code passes in more endpoints (num_eps)
than the maximum number of enpoints (MUSB_C_NUM_EPS.)  The result is
that allocate_instance() happily writes past the end of 'struct musb'
corrupting memory.

This patch adds a BUG() if the platform code requests more than the max.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: remove code associated with !CONFIG_PPC_MERGE
Kumar Gala [Mon, 22 Sep 2008 22:00:07 +0000 (15:00 -0700)]
usb: remove code associated with !CONFIG_PPC_MERGE

Now that arch/ppc is gone we don't need CONFIG_PPC_MERGE anymore remove
the dead code associated with !CONFIG_PPC_MERGE.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousbmon: fix tiny race exposed by the fastboot patches
Arjan van de Ven [Mon, 22 Sep 2008 22:00:10 +0000 (15:00 -0700)]
usbmon: fix tiny race exposed by the fastboot patches

usbmon registers the notifier chain, takes the bus lock and then goes to
scan the existing devices for hooking up.

Unfortunately, if usb_mon gets initialized while USB bus discovery is
going on, it's possible that usbmon gets a notifier on one cpu (which runs
without USB locks), and the scan is going on and also finds the new bus,
resulting in a double sysfs registration, which then produces a WARNING.

Pete Zaitcev did the bug diagnostics on this one

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: change hub initialization sleeps to delayed_work
Alan Stern [Mon, 22 Sep 2008 18:44:26 +0000 (14:44 -0400)]
USB: change hub initialization sleeps to delayed_work

This patch (as1137) changes the hub_activate() routine, replacing the
power-power-up and debounce delays with delayed_work calls.  The idea
is that on systems where the USB stack is compiled into the kernel
rather than built as modules, these delays will no longer block the
boot thread.  At least 100 ms is saved for each root hub, which can
add up to a significant savings in total boot time.

Arjan van de Ven was very pleased to see that this shaved 700 ms off
his computer's boot time.  Since his total boot time is on the order
of two seconds, the improvement is considerable.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ehci-dbg: fix reading less content of periodic file
Ming Lei [Thu, 18 Sep 2008 15:06:38 +0000 (23:06 +0800)]
USB: ehci-dbg: fix reading less content of periodic file

This patch fix 2 problems about reading periodic file:

1. The "..." after a interrupt qh is missed because buffer pointer is
   not moved.

2. After setting p.ptr as NULL, its next qh or itd will be omited and
   can't be stored in debug buffer.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ehci-dbg: increase debug buffer size for periodic file
Ming Lei [Thu, 18 Sep 2008 15:06:21 +0000 (23:06 +0800)]
USB: ehci-dbg: increase debug buffer size for periodic file

This patch is based on the following ideas:

1. Some usb devices (such as usb video class) have endpoints of high
   interval attribute, so reading "periodic" file need more debug buffer
   to accommodate the qh or itd schedule information.  For example, 4KB
   buffer is not enough for a single interrupt qh of 2ms period.

2. print a %p need 16 byte buffer on 64-bits arch, but 8 byte on 32-bits
   arch. Add a extra bonus for 64-bits arch.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: gadget: workaround storage command size issues
Felipe Balbi [Thu, 18 Sep 2008 23:00:02 +0000 (02:00 +0300)]
usb: gadget: workaround storage command size issues

Try to workaround issues with bad SCSI implementations
by ignoring the command size error.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: g_printer: fix handling zero-length packet
SangSu Park [Mon, 22 Sep 2008 22:41:15 +0000 (15:41 -0700)]
USB: g_printer: fix handling zero-length packet

g_printer doesn't have to check whether the data size is a multiple of
MaxPacketSize, because device controller driver already make that check.

Signed-off-by: SangSu Park<sangsu@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Fix spelling in usb/serial.h
Geoff Levand [Sat, 20 Sep 2008 21:41:47 +0000 (14:41 -0700)]
USB: Fix spelling in usb/serial.h

Fixes a minor typo in the comments for usb_set_serial_data.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Fix doc for usb_autopm_enable
Geoff Levand [Sat, 20 Sep 2008 21:41:47 +0000 (14:41 -0700)]
USB: Fix doc for usb_autopm_enable

Correct errors in the descriptions for usb_autopm_enable
and usb_autopm_disable in the USB PM doc.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB Serial: Sierra: debug message fix
Kevin Lloyd [Wed, 17 Sep 2008 04:05:24 +0000 (21:05 -0700)]
USB Serial: Sierra: debug message fix

This patch moves dbg calls to dev_dbg where possible. It also fixes some
issues with a previous submission aiming to do the same thing.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: RESET_RESUME needs to block autosuspend when remote wakeup is needed
Oliver Neukum [Mon, 15 Sep 2008 15:29:28 +0000 (17:29 +0200)]
USB: RESET_RESUME needs to block autosuspend when remote wakeup is needed

Reset upon resumption will wipe the input buffer and is therefore
a reason to not suspend if remote wakeup is requested because
the driver needs that data.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: ftdi_sio: fix 'product' parameter description
Paulius Zaleckas [Wed, 10 Sep 2008 14:18:46 +0000 (17:18 +0300)]
USB: ftdi_sio: fix 'product' parameter description

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb core: fix USB_OTG_BLACKLIST_HUB typo
Peter Korsgaard [Mon, 8 Sep 2008 08:14:47 +0000 (10:14 +0200)]
usb core: fix USB_OTG_BLACKLIST_HUB typo

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Documentation/usb/anchors.txt #2
Oliver Neukum [Tue, 2 Sep 2008 12:16:11 +0000 (14:16 +0200)]
USB: Documentation/usb/anchors.txt #2

This adds Documentation for the extensions of the anchor API.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoOHCI: Allow broken controllers to auto-stop
Alan Stern [Wed, 3 Sep 2008 20:38:32 +0000 (16:38 -0400)]
OHCI: Allow broken controllers to auto-stop

This patch (as1134) attempts to improve the way we handle OHCI
controllers with broken Root Hub Status Change interrupt support.  In
these controllers the RHSC interrupt bit essentially never turns off,
making RHSC interrupts useless -- they have to remain permanently
disabled.

Such controllers should still be allowed to turn off their root hubs
when no devices are attached.  Polling for new connections can
continue while the root hub is suspended.  The patch implements this
feature.  (It won't have much effect unless CONFIG_PM is enabled and
CONFIG_USB_SUSPEND is disabled, but since the overhead is very small
we may as well do it.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb-storage: report underflow with no sense data
Alan Stern [Tue, 2 Sep 2008 14:12:11 +0000 (10:12 -0400)]
usb-storage: report underflow with no sense data

This patch (as1118) addresses a problem with certain USB mass-storage
devices.  These devices sometimes return less data than asked for and
then provide no sense data to explain the problem.  Currently
usb-storage leaves it up to the SCSI layer to decide how this should
be handled, and the SCSI layer interprets the lack of sense data to
mean that nothing went wrong.  But if we got less data than required
then something definitely _did_ go wrong, and we should say so.

The patch tells the SCSI layer to retry the command when this sort of
thing happens.  Retrying may not solve the underlying problem, but
it's better than believing that data was transferred when it wasn't.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: add Freescale QE/CPM USB peripheral controller driver
Li Yang [Tue, 2 Sep 2008 11:58:10 +0000 (19:58 +0800)]
usb: add Freescale QE/CPM USB peripheral controller driver

Some of Freescale SoC chips have a QE or CPM co-processor which
supports full speed USB.  The driver adds device mode support
of both QE and CPM USB controller to Linux USB gadget.  The
driver is tested with MPC8360 and MPC8272, and should work with
other models having QE/CPM given minor tweaks.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: drivers/usb/misc: Use an IS_ERR test rather than a NULL test
Julien Brunel [Mon, 1 Sep 2008 08:57:27 +0000 (10:57 +0200)]
USB: drivers/usb/misc: Use an IS_ERR test rather than a NULL test

In case of error, the function backlight_device_register returns an
ERR pointer, but never returns a NULL pointer. So a NULL test that may
come after a call to this function should be strengthened by an IS_ERR
test.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@match_bad_null_test@
expression x, E;
statement S1,S2;
@@
x = backlight_device_register(...)
... when != x = E
* if (x != NULL)
S1 else S2
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: remove unused #include <version.h>
Huang Weiyi [Sat, 23 Aug 2008 05:56:30 +0000 (13:56 +0800)]
USB: remove unused #include <version.h>

The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/usb/gadget/pxa27x_udc.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb gadget: defer obex enumeration
David Brownell [Tue, 19 Aug 2008 00:45:25 +0000 (17:45 -0700)]
usb gadget: defer obex enumeration

Some USB peripheral controller drivers support software control
over the data pullup.  Use those controls to prevent the OBEX
function from enumerating until the userspace server has opened
the /dev/ttyGS* node it will use to implement protocol chitchat
with the USB host.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb gadget: cdc obex glue
Felipe Balbi [Tue, 19 Aug 2008 00:39:30 +0000 (17:39 -0700)]
usb gadget: cdc obex glue

The following patch introduces a new f_obex.c function driver.
It allows userspace obex servers to use usb as transport layer
for their messages.

[ dbrownell@users.sourceforge.net: various fixes and cleanups ]

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb gadget: function activation/deactivation
David Brownell [Tue, 19 Aug 2008 00:38:22 +0000 (17:38 -0700)]
usb gadget: function activation/deactivation

Add a new mechanism to the composite gadget framework, letting
functions deactivate (and reactivate) themselves.  Think of it
as a refcounted wrapper for the software pullup control.

A key example of why to use this mechanism involves functions that
require a userspace daemon.  Those functions shuld use this new
mechanism to prevent the gadget from enumerating until those daemons
are activated.  Without this mechanism, hosts would see devices that
malfunction until the relevant daemons start.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: gadget: net2280: implement set_wedge
Alan Stern [Thu, 14 Aug 2008 19:49:11 +0000 (15:49 -0400)]
USB: gadget: net2280: implement set_wedge

This patch (as1132) implements the set_wedge() method for net2280.
This method is necessary for strict USBCV compliance in
g_file_storage.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: gadget: dummy_hcd: implement set_wedge
Alan Stern [Thu, 14 Aug 2008 19:48:30 +0000 (15:48 -0400)]
USB: gadget: dummy_hcd: implement set_wedge

This patch (as1131) implements the set_wedge() method for dummy_hcd.
This method is necessary for strict USBCV compliance in
g_file_storage.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agousb: gadget Kconfig cleanup
David Brownell [Fri, 15 Aug 2008 00:04:48 +0000 (17:04 -0700)]
usb: gadget Kconfig cleanup

This reorders the list of USB peripheral controller drivers so it's
more common for the initial (default) value to be relevant:  put the
SOC integrated silicon up front, discrete stuff last.  Alphabetize.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Let some USB host controllers get IRQ flags from resource
Marc Zyngier [Mon, 18 Aug 2008 11:08:42 +0000 (13:08 +0200)]
USB: Let some USB host controllers get IRQ flags from resource

[This version fixes a thinko in the r8a66597 driver]

This patch let a few discrete USB host controllers drivers (isp116x-hcd,
r8a66597-hcd and sl811-hcd) obtain IRQ flags from their IORESOURCE_IRQ
resource if configured as such, much like it's been done for the smc91x
driver.

It spares people writing support for specific boards the burden to
configure the interrupt controller independantly, and keeps all IRQ
related information in a single resource.

HCD that are integrally part of a SoC have been left aside, as there
is probably no "wiring" options...

Tested on an Xscale PXA-255 based platform with isp116x-hcd.

Signed-off-by: Marc Zyngier <marc.zyngier@altran.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoub: remove sg_stat
Pete Zaitcev [Mon, 4 Aug 2008 23:15:40 +0000 (17:15 -0600)]
ub: remove sg_stat

Remove forgotten code related to sg_stat[].

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: extend poisoning to anchors
Oliver Neukum [Tue, 29 Jul 2008 14:18:47 +0000 (16:18 +0200)]
USB: extend poisoning to anchors

this extends the poisoning concept to anchors. This way poisoning
will work with fire and forget drivers.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: kill URBs permanently
Oliver Neukum [Tue, 29 Jul 2008 13:26:15 +0000 (15:26 +0200)]
USB: kill URBs permanently

looking at usb_kill_urb() it seems to me that it is unnecessarily lenient.
In the use case of disconnect() you never want to use the URB again
(for the same device) But leaving urb->reject elevated will make it easier
to avoid races between read/write and disconnect.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodrivers/usb/class/usblp.c: adjust error handling code
Julia Lawall [Wed, 16 Jul 2008 16:00:42 +0000 (18:00 +0200)]
drivers/usb/class/usblp.c: adjust error handling code

In this code, it is possible to tell statically whether usblp will be NULL
in the error handling code.

Oliver Neukum suggested to make a goto to the final return rather than
return directly.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
identifier f,err,l,l1;
type T;
expression x,E;
statement S;
@@

x = NULL
... when != goto l1;
* x = f(...)
... when != x
err = E;
goto l;
...
* if (x != NULL)
  S
return err;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: add USB test and measurement class driver
Greg Kroah-Hartman [Tue, 26 Aug 2008 23:22:06 +0000 (16:22 -0700)]
USB: add USB test and measurement class driver

This driver was originaly written by Stefan Kopp, but massively
reworked by Greg for submission.

Thanks to Felipe Balbi <me@felipebalbi.com> for lots of work in cleaning
up this driver.

Thanks to Oliver Neukum <oliver@neukum.org> for reviewing previous
versions and pointing out problems.

Cc: Stefan Kopp <stefan_kopp@agilent.com>
Cc: Marcel Janssen <korgull@home.nl>
Cc: Felipe Balbi <me@felipebalbi.com>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Added driver for a Delcom USB 7-segment LED Display
Harrison Metzger [Thu, 14 Aug 2008 16:29:32 +0000 (11:29 -0500)]
USB: Added driver for a Delcom USB 7-segment LED Display

Added basic support for a Delcom USB 7-segment LED Display

Signed-off by: Harrison Metzger <harrisonmetz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: Add Oceanic product ID to ftdi_sio
Vladimir Vukicevic [Sat, 4 Oct 2008 00:08:43 +0000 (17:08 -0700)]
USB: Add Oceanic product ID to ftdi_sio

Add Oceanic PID to ftdi_sio driver

Oceanic dive computers (such as the VT3 --
http://www.oceanicworldwide.com/p_computers_vt3.html) all use an onboard
FTDI serial converter, with the FTDI vid and a  PID of 0xf460.  The
attached patch adds that pid to ftdi_sio; driver  connects to my VT3
after that.

Signed-off-by: Vladimir Vukicevic <vladimir@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option.c remove duplicate device ids now supported in hso.c
Denis Joseph Barrow [Tue, 30 Sep 2008 14:49:22 +0000 (16:49 +0200)]
USB: option.c remove duplicate device ids now supported in hso.c

Remove duplicate device ids which are now supported by drivers/usb/net/hso.c

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoUSB: option: add Ericsson F3507g and Dell 5530
Dan Williams [Wed, 24 Sep 2008 15:49:19 +0000 (11:49 -0400)]
USB: option: add Ericsson F3507g and Dell 5530

Add a few more mobile broadband cards.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agodrm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)
Matthias Hopf [Fri, 17 Oct 2008 21:18:05 +0000 (07:18 +1000)]
drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)

Olaf Kirch noticed that the i915_set_status_page() function of the i915
kernel driver calls ioremap with an address offset that is supplied by
userspace via ioctl. The function zeroes the mapped memory via memset
and tells the hardware about the address. Turns out that access to that
ioctl is not restricted to root so users could probably exploit that to
do nasty things. We haven't tried to write actual exploit code though.

It only affects the Intel G33 series and newer.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: make CONFIG_DRM depend on CONFIG_SHMEM.
Dave Airlie [Thu, 16 Oct 2008 23:29:14 +0000 (09:29 +1000)]
drm: make CONFIG_DRM depend on CONFIG_SHMEM.

This can be removed later when DRM doesn't depend on shmem.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoradeon: fix PCI bus mastering support enables.
Alex Deucher [Thu, 16 Oct 2008 23:21:45 +0000 (09:21 +1000)]
radeon: fix PCI bus mastering support enables.

Someone noticed these registers moved around for later chips,
so we redo the codepaths per-chip. PCIE chips don't appear to
require explicit enables.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoradeon: add RS400 family support.
Alex Deucher [Thu, 16 Oct 2008 23:19:33 +0000 (09:19 +1000)]
radeon: add RS400 family support.

This adds support for the RS400 family of IGPs for Intel CPUs.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/radeon: add support for RS740 IGP chipsets.
Alex Deucher [Thu, 16 Oct 2008 07:12:02 +0000 (17:12 +1000)]
drm/radeon: add support for RS740 IGP chipsets.

This adds support for the HS2100 IGP chipset.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: GM45 has GM965-style MCH setup.
Eric Anholt [Wed, 15 Oct 2008 07:05:58 +0000 (00:05 -0700)]
i915: GM45 has GM965-style MCH setup.

Fixes tiling swizzling mode failures that manifest in glReadPixels().

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Don't run retire work handler while suspended
Keith Packard [Wed, 15 Oct 2008 04:41:13 +0000 (21:41 -0700)]
i915: Don't run retire work handler while suspended

At leavevt and lastclose time, cancel any pending retire work handler
invocation, and keep the retire work handler from requeuing itself if it is
currently running.

This patch restructures i915_gem_idle to perform all of these tasks instead
of having both leavevt and lastclose call a sequence of functions.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Map status page cached for chips with GTT-based HWS location.
Keith Packard [Wed, 15 Oct 2008 02:55:10 +0000 (19:55 -0700)]
i915: Map status page cached for chips with GTT-based HWS location.

This should improve performance by avoiding uncached reads by the CPU (the
point of having a status page), and may improve stability.  This patch only
affects G33, GM45 and G45 chips as those are the only ones using GTT-based
HWS mappings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Fix up ring initialization to cover G45 oddities
Keith Packard [Wed, 15 Oct 2008 00:20:35 +0000 (17:20 -0700)]
i915: Fix up ring initialization to cover G45 oddities

G45 appears quite sensitive to ring initialization register writes,
sometimes leaving the HEAD register with the START register contents. Check
to make sure HEAD is reset correctly when START is written, and fix it up,
screaming loudly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Use non-reserved status page index for breadcrumb
Keith Packard [Wed, 15 Oct 2008 00:19:38 +0000 (17:19 -0700)]
i915: Use non-reserved status page index for breadcrumb

Dwords 0 through 0x1f are reserved for use by the hardware. Move the GEM
breadcrumb from 0x10 to 0x20 to keep out of this area.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Increment dev_priv->irq_received so i915_gem_interrupts count works.
Eric Anholt [Mon, 6 Oct 2008 22:14:12 +0000 (15:14 -0700)]
drm: Increment dev_priv->irq_received so i915_gem_interrupts count works.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: kill drm_device->irq
Jesse Barnes [Mon, 15 Sep 2008 22:00:33 +0000 (15:00 -0700)]
drm: kill drm_device->irq

Like the last patch but adds a macro to get at the irq value instead of
dereferencing pdev directly.  Should  make things easier for the BSD guys and
if we ever support non-PCI devices.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: wbinvd is cache coherent.
Dave Airlie [Tue, 7 Oct 2008 03:41:49 +0000 (13:41 +1000)]
drm: wbinvd is cache coherent.

doing an ipi for the wbinvd case isn't necessary.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: add missing return in error path.
Dave Airlie [Tue, 7 Oct 2008 03:40:36 +0000 (13:40 +1000)]
i915: add missing return in error path.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: fixup permissions on gem ioctls.
Dave Airlie [Tue, 7 Oct 2008 03:40:10 +0000 (13:40 +1000)]
i915: fixup permissions on gem ioctls.

init/entervt/leavevt should be root-only master ioctls.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Clean up many sparse warnings in i915.
Eric Anholt [Thu, 2 Oct 2008 19:24:47 +0000 (12:24 -0700)]
drm: Clean up many sparse warnings in i915.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Use ioremap_wc in i915_driver instead of ioremap, since we always want WC.
Eric Anholt [Tue, 23 Sep 2008 21:50:57 +0000 (14:50 -0700)]
drm: Use ioremap_wc in i915_driver instead of ioremap, since we always want WC.

Fixes failure to map the ringbuffer when PAT tells us we don't get to do
uncached on something that's already mapped WC, or something along those lines.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: G33-class hardware has a newer 965-style MCH (no DCC register).
Eric Anholt [Mon, 15 Sep 2008 20:13:34 +0000 (13:13 -0700)]
drm: G33-class hardware has a newer 965-style MCH (no DCC register).

Fixes bad software fallback rendering in Mesa in dual-channel configurations.

d9a2470012588dc5313a5ac8bb2f03575af00e99

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Avoid oops in GEM execbuffers with bad arguments.
Eric Anholt [Wed, 10 Sep 2008 21:22:49 +0000 (14:22 -0700)]
drm: Avoid oops in GEM execbuffers with bad arguments.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoDRM: Return -EBADF on bad object in flink, and return curent name if it exists.
Eric Anholt [Tue, 9 Sep 2008 18:40:34 +0000 (11:40 -0700)]
DRM: Return -EBADF on bad object in flink, and return curent name if it exists.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915 gem: install and uninstall irq handler in entervt and leavevt ioctls.
Kristian Høgsberg [Wed, 20 Aug 2008 15:04:27 +0000 (11:04 -0400)]
i915 gem: install and uninstall irq handler in entervt and leavevt ioctls.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Make use of sarea_priv conditional.
Kristian Høgsberg [Wed, 20 Aug 2008 15:20:13 +0000 (11:20 -0400)]
i915: Make use of sarea_priv conditional.

We fail ioctls that depend on the sarea_priv with EINVAL.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Use struct_mutex to protect ring in GEM mode.
Eric Anholt [Mon, 1 Sep 2008 23:45:29 +0000 (16:45 -0700)]
i915: Use struct_mutex to protect ring in GEM mode.

In the conversion for GEM, we had stopped using the hardware lock to protect
ring usage, since it was all internal to the DRM now.  However, some paths
weren't converted to using struct_mutex to prevent multiple threads from
concurrently working on the ring, in particular between the vblank swap handler
and ioctls.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Add chip set ID param.
Kristian Høgsberg [Wed, 20 Aug 2008 15:08:52 +0000 (11:08 -0400)]
i915: Add chip set ID param.

Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Add GEM ("graphics execution manager") to i915 driver.
Eric Anholt [Wed, 30 Jul 2008 19:06:12 +0000 (12:06 -0700)]
drm: Add GEM ("graphics execution manager") to i915 driver.

GEM allows the creation of persistent buffer objects accessible by the
graphics device through new ioctls for managing execution of commands on the
device.  The userland API is almost entirely driver-specific to ensure that
any driver building on this model can easily map the interface to individual
driver requirements.

GEM is used by the 2d driver for managing its internal state allocations and
will be used for pixmap storage to reduce memory consumption and enable
zero-copy GLX_EXT_texture_from_pixmap, and in the 3d driver is used to enable
GL_EXT_framebuffer_object and GL_ARB_pixel_buffer_object.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoExport kmap_atomic_pfn for DRM-GEM.
Eric Anholt [Thu, 21 Aug 2008 19:53:33 +0000 (12:53 -0700)]
Export kmap_atomic_pfn for DRM-GEM.

The driver would like to map IO space directly for copying data in when
appropriate, to avoid CPU cache flushing for streaming writes.
kmap_atomic_pfn lets us avoid IPIs associated with ioremap for this process.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoExport shmem_file_setup for DRM-GEM
Keith Packard [Fri, 20 Jun 2008 07:08:06 +0000 (00:08 -0700)]
Export shmem_file_setup for DRM-GEM

GEM needs to create shmem files to back buffer objects.  Though currently
creation of files for objects could have been driven from userland, the
modesetting work will require allocation of buffer objects before userland
is running, for boot-time message display.

Signed-off-by: Eric Anholt <eric@anholt.net>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: Rework vblank-wait handling to allow interrupt reduction.
Jesse Barnes [Tue, 30 Sep 2008 19:14:26 +0000 (12:14 -0700)]
drm: Rework vblank-wait handling to allow interrupt reduction.

Previously, drivers supporting vblank interrupt waits would run the interrupt
all the time, or all the time that any 3d client was running, preventing the
CPU from sleeping for long when the system was otherwise idle.  Now, interrupts
are disabled any time that no client is waiting on a vblank event. The new
method uses vblank counters on the chipsets when the interrupts are turned
off, rather than counting interrupts, so that we can continue to present
accurate vblank numbers.

Co-author: Michel Dänzer <michel@tungstengraphics.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm/cred: wrap task credential accesses in the drm driver.
David Howells [Tue, 2 Sep 2008 01:03:14 +0000 (11:03 +1000)]
drm/cred: wrap task credential accesses in the drm driver.

Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.

Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

Change some task->e?[ug]id to task_e?[ug]id().  In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: David Airlie <airlied@redhat.com>
15 years agonew chip name is GM45
Jesse Barnes [Mon, 25 Aug 2008 22:16:19 +0000 (15:16 -0700)]
new chip name is GM45

Author: Zhenyu Wang <zhenyu.z.wang@intel.com>

i915: official name for GM45 chipset

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoseparate i915 suspend/resume functions into their own file
Jesse Barnes [Mon, 25 Aug 2008 22:11:06 +0000 (15:11 -0700)]
separate i915 suspend/resume functions into their own file

[Patch against drm-next.  Consider this a trial balloon for our new Linux
development model.]

This is a big chunk of code.  Separating it out makes it easier to change
without churn on the main i915_drv.c file (and there will be churn as we
fix bugs and add things like kernel mode setting).  Also makes it easier
to share this file with BSD.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoradeon: fix writeback across suspend/resume.
Dave Airlie [Tue, 2 Sep 2008 00:10:16 +0000 (10:10 +1000)]
radeon: fix writeback across suspend/resume.

Make writeback not get disabled on resume.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: fix sysfs error path.
Dave Airlie [Tue, 2 Sep 2008 00:06:06 +0000 (10:06 +1000)]
drm: fix sysfs error path.

Pointed out by Roel Kluin on dri-devel.

Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoFB_SIS=m, DRM_SIS=y is not a legal configuration.
Adrian Bunk [Sun, 24 Aug 2008 07:11:22 +0000 (17:11 +1000)]
FB_SIS=m, DRM_SIS=y is not a legal configuration.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoAdd Intel ACPI IGD OpRegion support
Matthew Garrett [Tue, 5 Aug 2008 18:37:25 +0000 (19:37 +0100)]
Add Intel ACPI IGD OpRegion support

This adds the support necessary for allowing ACPI backlight control to
work on some newer Intel-based graphics systems. Tested on Thinkpad T61
and HP 2510p hardware.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
15 years agoi915: Initialize hardware status page at device load when possible.
Keith Packard [Wed, 30 Jul 2008 20:03:43 +0000 (13:03 -0700)]
i915: Initialize hardware status page at device load when possible.

Some chips were unstable with repeated setup/teardown of the hardware status
page.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Track progress inside of batchbuffers for determining wedgedness.
Keith Packard [Wed, 30 Jul 2008 19:21:20 +0000 (12:21 -0700)]
i915: Track progress inside of batchbuffers for determining wedgedness.

This avoids early termination for long-running commands.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Add support for MSI and interrupt mitigation.
Eric Anholt [Tue, 29 Jul 2008 19:10:39 +0000 (12:10 -0700)]
i915: Add support for MSI and interrupt mitigation.

Previous attempts at interrupt mitigation had been foiled by i915_wait_irq's
failure to update the sarea seqno value when the status page indicated that
the seqno had already been passed.  MSI support has been seen to cut CPU
costs by up to 40% in some workloads by avoiding other expensive interrupt
handlers for frequent graphics interrupts.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Use more consistent names for regs, and store them in a separate file.
Jesse Barnes [Tue, 29 Jul 2008 18:54:06 +0000 (11:54 -0700)]
i915: Use more consistent names for regs, and store them in a separate file.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: Ignore X server provided mmio address
Keith Packard [Wed, 30 Jul 2008 19:36:08 +0000 (12:36 -0700)]
i915: Ignore X server provided mmio address

It is already correctly detected by the kernel for use in suspend/resume.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoi915: remove settable use_mi_batchbuffer_start
Keith Packard [Wed, 30 Jul 2008 19:28:47 +0000 (12:28 -0700)]
i915: remove settable use_mi_batchbuffer_start

The driver can know what hardware requires MI_BATCH_BUFFER vs
MI_BATCH_BUFFER_START; there's no reason to let user mode configure this.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoSiS DRM: fix a pointer cast warning
David Howells [Wed, 30 Jul 2008 19:29:38 +0000 (12:29 -0700)]
SiS DRM: fix a pointer cast warning

Fix a pointer cast warning in the SIS DRM code.

This was introduced in patch ce65a44de07f73ceda1749812b75086b7add408d.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoSiS DRM: fix the memory allocator if the SIS FB is built as a module
David Howells [Wed, 30 Jul 2008 19:29:37 +0000 (12:29 -0700)]
SiS DRM: fix the memory allocator if the SIS FB is built as a module

Fix the SIS DRM memory allocator if the SIS FB built as a module.  The SIS DRM
code initialises the mm allocation hooks, but _only_ if the SIS FB is not
built as a module because it depends on CONFIG_FB_SIS, and that's unset if the
SIS FB is not built in.  It must check CONFIG_FB_SIS_MODULE as well.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agodrm: remove #define's for non-linux systems
Carlos R. Mafra [Wed, 30 Jul 2008 19:29:37 +0000 (12:29 -0700)]
drm: remove #define's for non-linux systems

There is no point in considering FreeBSD et al.  in the linux kernel
source code.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
15 years agoV4L/DVB (9296): Patch to remove warning message during cx88-dvb compilation
Igor M. Liplianin [Fri, 17 Oct 2008 16:45:55 +0000 (13:45 -0300)]
V4L/DVB (9296): Patch to remove warning message during cx88-dvb compilation

Remove warning message during cx88-dvb compilation.
Also fixes double underline in function and struct names.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9294): gspca: Add a stop sequence in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 08:28:40 +0000 (05:28 -0300)]
V4L/DVB (9294): gspca: Add a stop sequence in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9293): gspca: Separate and fix the sensor dependant sequences in t613.
Leandro Costantino [Fri, 17 Oct 2008 08:27:04 +0000 (05:27 -0300)]
V4L/DVB (9293): gspca: Separate and fix the sensor dependant sequences in t613.

Signed-off-by: Leandro Costantino <lcostantino@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9292): gspca: Call the control setting functions at init time in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 08:19:46 +0000 (05:19 -0300)]
V4L/DVB (9292): gspca: Call the control setting functions at init time in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9291): gspca: Do not set the white balance temperature by default in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 08:07:45 +0000 (05:07 -0300)]
V4L/DVB (9291): gspca: Do not set the white balance temperature by default in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9290): gspca: Adjust the sensor init sequences in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 08:00:59 +0000 (05:00 -0300)]
V4L/DVB (9290): gspca: Adjust the sensor init sequences in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9289): gspca: Other sensor identified as om6802 in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 07:53:02 +0000 (04:53 -0300)]
V4L/DVB (9289): gspca: Other sensor identified as om6802 in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9288): gspca: Write to the USB device and not USB interface in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 07:45:27 +0000 (04:45 -0300)]
V4L/DVB (9288): gspca: Write to the USB device and not USB interface in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9287): gspca: Change the name of the multi bytes write function in t613.
Jean-Francois Moine [Fri, 17 Oct 2008 07:42:29 +0000 (04:42 -0300)]
V4L/DVB (9287): gspca: Change the name of the multi bytes write function in t613.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9286): gspca: Compilation problem of gspca.c and the kernel version.
Jean-Francois Moine [Fri, 17 Oct 2008 07:36:47 +0000 (04:36 -0300)]
V4L/DVB (9286): gspca: Compilation problem of gspca.c and the kernel version.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9283): Correct typo and enable setting the gain on the mt9m111 sensor
Erik Andrén [Mon, 13 Oct 2008 19:00:35 +0000 (16:00 -0300)]
V4L/DVB (9283): Correct typo and enable setting the gain on the mt9m111 sensor

A typo was introduced during the gspca conversion, crippling the ability to control the gain on the mt9m111 sensor.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9282): Properly iterate the urbs when destroying them.
Erik Andrén [Mon, 13 Oct 2008 18:52:46 +0000 (15:52 -0300)]
V4L/DVB (9282): Properly iterate the urbs when destroying them.

Properly iterate the allocated when freeing the urbs, this fixes a memory leak

Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9281): gspca: Add hflip and vflip to the po1030 sensor
Erik Andren [Thu, 16 Oct 2008 19:49:17 +0000 (16:49 -0300)]
V4L/DVB (9281): gspca: Add hflip and vflip to the po1030 sensor

Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9280): gspca: Use the gspca debug macros
Erik Andren [Thu, 16 Oct 2008 19:46:07 +0000 (16:46 -0300)]
V4L/DVB (9280): gspca: Use the gspca debug macros

Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9279): gspca: Correct some copyright headers
Erik Andren [Thu, 16 Oct 2008 19:43:16 +0000 (16:43 -0300)]
V4L/DVB (9279): gspca: Correct some copyright headers

Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9278): gspca: Remove the m5602_debug variable
Erik Andren [Thu, 16 Oct 2008 19:39:41 +0000 (16:39 -0300)]
V4L/DVB (9278): gspca: Remove the m5602_debug variable

Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9277): gspca: propagate an error in m5602_start_transfer()
Erik Andren [Thu, 16 Oct 2008 19:36:35 +0000 (16:36 -0300)]
V4L/DVB (9277): gspca: propagate an error in m5602_start_transfer()

Signed-off-by: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9276): videobuf-dvb: two functions are now static
Mauro Carvalho Chehab [Fri, 17 Oct 2008 16:02:47 +0000 (13:02 -0300)]
V4L/DVB (9276): videobuf-dvb: two functions are now static

This patch marks those two functions as static:
static int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *fe,
static int videobuf_dvb_register_frontend(struct dvb_adapter *adapter,

Since MFE patches changed their calls by videobuf_dvb_register_bus.

To avoid having to declare the prototypes, the patch moves
videobuf_dvb_register_bus() to be after the declaration of the above functions
used there.

Cc: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (9275): dvb: input data pointer of cx24116_writeregN() should be const
Geert Uytterhoeven [Fri, 17 Oct 2008 00:04:35 +0000 (21:04 -0300)]
V4L/DVB (9275): dvb: input data pointer of cx24116_writeregN() should be const

| drivers/media/dvb/frontends/cx24116.c:573: warning: passing argument 3 of 'cx24116_writeregN' discards qualifiers from pointer target type

Make the `data' input pointer parameter of cx24116_writeregN() const to
kill the warning.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>