aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-10-17usb gadget: cdc obex glueFelipe Balbi
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>
2008-10-17usb gadget: function activation/deactivationDavid Brownell
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>
2008-10-17USB: gadget: net2280: implement set_wedgeAlan Stern
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>
2008-10-17USB: gadget: dummy_hcd: implement set_wedgeAlan Stern
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>
2008-10-17usb: gadget Kconfig cleanupDavid Brownell
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>
2008-10-17USB: Let some USB host controllers get IRQ flags from resourceMarc Zyngier
[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>
2008-10-17ub: remove sg_statPete Zaitcev
Remove forgotten code related to sg_stat[]. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: extend poisoning to anchorsOliver Neukum
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>
2008-10-17USB: kill URBs permanentlyOliver Neukum
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>
2008-10-17drivers/usb/class/usblp.c: adjust error handling codeJulia Lawall
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>
2008-10-17USB: add USB test and measurement class driverGreg Kroah-Hartman
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>
2008-10-17USB: Added driver for a Delcom USB 7-segment LED DisplayHarrison Metzger
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>
2008-10-17USB: Add Oceanic product ID to ftdi_sioVladimir Vukicevic
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>
2008-10-17USB: option.c remove duplicate device ids now supported in hso.cDenis Joseph Barrow
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>
2008-10-17USB: option: add Ericsson F3507g and Dell 5530Dan Williams
Add a few more mobile broadband cards. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-18drm/i915: fix ioremap of a user address for non-root (CVE-2008-3831)Matthias Hopf
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>
2008-10-18drm: make CONFIG_DRM depend on CONFIG_SHMEM.Dave Airlie
This can be removed later when DRM doesn't depend on shmem. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18radeon: fix PCI bus mastering support enables.Alex Deucher
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>
2008-10-18radeon: add RS400 family support.Alex Deucher
This adds support for the RS400 family of IGPs for Intel CPUs. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18drm/radeon: add support for RS740 IGP chipsets.Alex Deucher
This adds support for the HS2100 IGP chipset. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18i915: GM45 has GM965-style MCH setup.Eric Anholt
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>
2008-10-18i915: Don't run retire work handler while suspendedKeith Packard
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>
2008-10-18i915: Map status page cached for chips with GTT-based HWS location.Keith Packard
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>
2008-10-18i915: Fix up ring initialization to cover G45 odditiesKeith Packard
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>
2008-10-18i915: Use non-reserved status page index for breadcrumbKeith Packard
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>
2008-10-18drm: Increment dev_priv->irq_received so i915_gem_interrupts count works.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18drm: kill drm_device->irqJesse Barnes
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>
2008-10-18drm: wbinvd is cache coherent.Dave Airlie
doing an ipi for the wbinvd case isn't necessary. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18i915: add missing return in error path.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18i915: fixup permissions on gem ioctls.Dave Airlie
init/entervt/leavevt should be root-only master ioctls. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18drm: Clean up many sparse warnings in i915.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18drm: Use ioremap_wc in i915_driver instead of ioremap, since we always want WC.Eric Anholt
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>
2008-10-18drm: G33-class hardware has a newer 965-style MCH (no DCC register).Eric Anholt
Fixes bad software fallback rendering in Mesa in dual-channel configurations. d9a2470012588dc5313a5ac8bb2f03575af00e99 Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18drm: Avoid oops in GEM execbuffers with bad arguments.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18DRM: Return -EBADF on bad object in flink, and return curent name if it exists.Eric Anholt
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18i915 gem: install and uninstall irq handler in entervt and leavevt ioctls.Kristian Høgsberg
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>
2008-10-18i915: Make use of sarea_priv conditional.Kristian Høgsberg
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>
2008-10-18i915: Use struct_mutex to protect ring in GEM mode.Eric Anholt
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>
2008-10-18i915: Add chip set ID param.Kristian Høgsberg
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>
2008-10-18drm: Add GEM ("graphics execution manager") to i915 driver.Eric Anholt
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>
2008-10-18Export kmap_atomic_pfn for DRM-GEM.Eric Anholt
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>
2008-10-18Export shmem_file_setup for DRM-GEMKeith Packard
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>
2008-10-18drm: Rework vblank-wait handling to allow interrupt reduction.Jesse Barnes
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>
2008-10-18drm/cred: wrap task credential accesses in the drm driver.David Howells
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>
2008-10-18new chip name is GM45Jesse Barnes
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>
2008-10-18separate i915 suspend/resume functions into their own fileJesse Barnes
[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>
2008-10-18radeon: fix writeback across suspend/resume.Dave Airlie
Make writeback not get disabled on resume. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18drm: fix sysfs error path.Dave Airlie
Pointed out by Roel Kluin on dri-devel. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18FB_SIS=m, DRM_SIS=y is not a legal configuration.Adrian Bunk
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-10-18Add Intel ACPI IGD OpRegion supportMatthew Garrett
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>