aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2011-11-10drm/nvc0/gr: fix some bugs in grctx generationBen Skeggs
Most serious is for chips with only 1 TPC, we'd get stuck in an infinite loop. The fix here will slightly change the setup for all other chipsets too, but, it shouldn't matter too much, and this all needs figuring out and likely redone anyway. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0: enable acceleration on 0xc8 by defaultBen Skeggs
Worked well enough for glxgears and gnome-shell at least, no reason to have this off anymore. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0/vram: skip disabled PBFB subunitsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv40/pm: fix issues on igp chipsets, which don't have memoryBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: testing the wrong variableDan Carpenter
memtimings is a valid pointer here, the intent was to test for kcalloc() failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nvc0/vram: storage type 0xc3 is not compressedChristoph Bumiller
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50: fix stability issue on NV86.Maxim Levitsky
Confirmed to fix random hangs while running all Unegine demos on NV86. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: initialize chan->fence.lock before useMarcin Slusarz
Fence lock needs to be initialized before any call to nouveau_channel_put because it calls nouveau_channel_idle->nouveau_fence_update which uses fence lock. BUG: spinlock bad magic on CPU#0, test/24134 lock: ffff88019f90dba8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 24134, comm: test Not tainted 3.0.0-nv+ #800 Call Trace: spin_bug+0x9c/0xa3 do_raw_spin_lock+0x29/0x13c _raw_spin_lock+0x1e/0x22 nouveau_fence_update+0x2d/0xf1 nouveau_channel_idle+0x22/0xa0 nouveau_channel_put_unlocked+0x84/0x1bd nouveau_channel_put+0x20/0x24 nouveau_channel_alloc+0x4ec/0x585 nouveau_ioctl_fifo_alloc+0x50/0x130 drm_ioctl+0x289/0x361 do_vfs_ioctl+0x4dd/0x52c sys_ioctl+0x42/0x65 system_call_fastpath+0x16/0x1b It's easily triggerable from userspace. Additionally remove double initialization of chan->fence.pending. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: stable@kernel.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50/vram: fix incorrect detection of bank count on newer chipsetsBen Skeggs
NVA3+ has an extra bit here compared to NV50:NVA3 chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50/gr: typo fix, how about we not reset fifo during graph init?Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nv50/bios: fixup mpll programming from the init table parserBen Skeggs
Reportedly this has been causing stability and corruption issues after resuming from suspend for a few people. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-10drm: make sure drm_vblank_init() has been called before touching vbl_lockBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-11-09atmel/spi: fix missing probeJean-Christophe PLAGNIOL-VILLARD
Commit 940ab889 "drivercore: Add helper macro for platform_driver boilerplate" converted this driver to use module_platform_driver, but due to the use of platform_driver_probe(), this resulted in the call to atmel_spi_probe being lost. Place the call to this function into the driver structure. fix section missmatch atmel_spi_probe is marked __init where it's supposed to be __devinit atmel_spi_remove is marked __exit where it's supposed to be __devexit Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Russell King - ARM Linux <linux@arm.linux.org.uk> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
2011-11-09[libata] ahci: Add ASMedia ASM1061 supportKeng-Yu Lin
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-09[libata] Issue SRST to Sil3726 PMPGwendal Grignou
Reenable sending SRST to devices connected behind a Sil3726 PMP. This allow staggered spinups and handles drives that spins up slowly. While the drives spin up, the PMP will not accept SRST. Most controller reissues the reset until the drive is ready, while some [Sil3124] returns an error. In ata_eh_error, wait 10s before reset the ATA port and try again. Signed-off-by: Gwendal Grignou <gwendal@google.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-09sata_sis.c: trivial spelling fixChris Dunlop
Trivial spelling fix. Signed-off-by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-09ahci_platform: use dev_get_platdata()JiSheng Zhang
Use dev_get_platdata() to retrieve the struct ahci_platform_data data from the platform. Signed-off-by: JiSheng Zhang <jszhang3@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-09[libata] libata-scsi.c: Add function parameter documentationMarcos Paulo de Souza
Add the documentation of parameters of ata_change_queue_depth to silence the warning of make xmldocs Signed-off-by: Marcos paulo de Souza <marcos.mage@gmail.com> Acked-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2011-11-08Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: drivers/media: video/a5k6aa is a module and so needs module.h mfd: fix build failures in recently added ab5500 code hwspinlock/u8500: include linux/module.h MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
2011-11-08Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds
* 'for-linus' of git://neil.brown.name/md: md/raid5: STRIPE_ACTIVE has lock semantics, add barriers md/raid5: abort any pending parity operations when array fails.
2011-11-08Merge branch 'docs-move' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs * 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: (45 commits) DocBook/drm: Clean up a todo-note DocBook/drm: `device aware' -> `device-aware' DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific' DocBook/drm: Clean up the paragraph on framebuffer objects DocBook/drm: Use `; otherwise,' DocBook/drm: Better flow with `, and then' DocBook/drm: Refer to the domain-setting function as a device-specific ioctl DocBook/drm: Improve flow of GPU/CPU coherence sentence DocBook/drm: Use an <itemizelist> for fundamental GEM operations DocBook/drm: Insert a comma DocBook/drm: Use a <variablelist> for vblank ioctls DocBook/drm: Use an itemizedlist for what an encoder needs to provide DocBook/drm: Insert `the' for readability, and change `set' to `setting' DocBook/drm: Remove extraneous commas DocBook/drm: Use a colon DocBook/drm: Clarify `final initialization' via better formatting DocBook/drm: Remove redundancy DocBook/drm: Insert `it' for smooth reading DocBook/drm: The word `so-called'; I do not think it connotes what you think it connotes DocBook/drm: Use a singular subject for grammatical cleanliness ...
2011-11-08Merge branch 'pm-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm * 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) PM / devfreq: fix private_data Documentation: Fix typo in freezer-subsystem.txt PM / QoS: Set cpu_dma_pm_qos->name
2011-11-08m68k/irq: Remove obsolete IRQ_FLG_* usersGeert Uytterhoeven
The m68k core irq code stopped honoring these flags during the irq restructuring in 2006. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2011-11-08ide-{cd,floppy,tape}: Do not include <linux/irq.h>Geert Uytterhoeven
The top of <linux/irq.h> has this comment: * Please do not include this file in generic code. There is currently * no requirement for any architecture to implement anything held * within this file. * * Thanks. --rmk Remove inclusion of <linux/irq.h>, to prevent the following compile error from happening soon: | include/linux/irq.h:132: error: redefinition of ‘struct irq_data’ | include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’ Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Borislav Petkov <bp@alien8.de> Cc: linux-ide@vger.kernel.org
2011-11-08PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())Thomas Meyer
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) [The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/] Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2011-11-08Merge branch 'fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock: hwspinlock/u8500: fix build error due to undefined label hwspinlock: Don't return a value in __hwspin_unlock
2011-11-08x86 platform drivers: add POWER_SUPPLY to selected drivers for DellLinus Torvalds
The Kconfig loop detection goes crazy without this. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-08x86 platform drivers: make Dell laptop driver select needed LED supportLinus Torvalds
Otherwise we get compile errors like this: ERROR: "led_classdev_unregister" [drivers/platform/x86/dell-laptop.ko] undefined! ERROR: "led_classdev_register" [drivers/platform/x86/dell-laptop.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 when the dell-laptop support is enabled without the necessary LED support being enabled. Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com> Acked-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-08drivers/media: video/a5k6aa is a module and so needs module.hPaul Gortmaker
This file uses core functions like module_init() and module_exit() and so it explicitly needs to include the module.h header. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-08Merge branch 'for_3.2/gpio-cleanup' of ↵Grant Likely
git://gitorious.org/khilman/linux-omap-pm into gpio/merge
2011-11-08n_gsm: Fix timingsAlan Cox
Alek Du reported that the code erroneously applies time to jiffies conversions twice to the t1 and t2 values. In normal use on a modem link this cases no visible problem but on a slower link it will break as with HZ=1000 as is typical we are running t1/t2 ten times too fast. Alek's original patch removed the conversion from the timer setting but we in fact have to be more careful as the contents of t1/t2 are visible via the device API and we thus need to correct the constants. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-11-08iommu: omap: Fix compile failureMing Lei
Fix compile failure in drivers/iommu/omap-iommu-debug.c because of missing module.h include. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2011-11-08[media] v4l2-ctrl: Send change events to all fh for auto cluster slave controlsHans de Goede
Otherwise the fh changing the master control won't get the inactive state change event for the slave controls. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] v4l2-event: Don't set sev->fh to NULL on unsubscribeHans de Goede
Setting sev->fh to NULL causes problems for the del op added in the next patch of this series, since this op needs a way to get to its own data structures, and typically this will be done by using container_of on an embedded v4l2_fh struct. The reason the original code is setting sev->fh to NULL is to signal to users of the event framework that the unsubscription has happened, but since their is no shared lock between the event framework and users of it, this is inherently racy, and it also turns out to be unnecessary as long as both the event framework and the user of the framework do their own locking properly and the user guarantees that it holds no references to the subcribed_event structure after its del operation has been called. This is best explained by looking at the only code currently checking for sev->fh being set to NULL on unsubscribe, which is the v4l2-ctrls.c send_event function. Here is the relevant code from v4l2-ctrls: send_event(): if (sev->fh && (sev->fh != fh || (sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK))) v4l2_event_queue_fh(sev->fh, &ev); Now lets say that v4l2_event_unsubscribe and v4l2-ctrls: send_event() race on the same sev, then the following could happens: 1) send_event checks sev->fh, finds it is not NULL <thread switch> 2) v4l2_event_unsubscribe sets sev->fh NULL 3) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks as the thread calling send_event holds the ctrl_lock <thread switch> 4) send_event calls v4l2_event_queue_fh(sev->fh, &ev) which not is equivalent to calling: v4l2_event_queue_fh(NULL, &ev) 5) oops, NULL pointer deref. Now again without setting sev->fh to NULL in v4l2_event_unsubscribe and without the (now senseless since always true) sev->fh != NULL check in 1) send_event is about to call v4l2_event_queue_fh(sev->fh, &ev) <thread switch> 2) v4l2_event_unsubscribe removes sev->list from the fh->subscribed list <thread switch> 3) send_event calls v4l2_event_queue_fh(sev->fh, &ev) 4) v4l2_event_queue_fh blocks on the fh_lock spinlock <thread switch> 5) v4l2_event_unsubscribe unlocks the fh_lock spinlock 6) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks as the thread calling send_event holds the ctrl_lock <thread switch> 8) v4l2_event_queue_fh takes the fh_lock 7) v4l2_event_queue_fh calls v4l2_event_subscribed, does not find it since sev->list has been removed from fh->subscribed already -> does nothing 9) v4l2_event_queue_fh releases the fh_lock 10) the caller of send_event releases the ctrl lock (mutex) <thread switch> 11) v4l2_ctrls del_event takes the ctrl lock 12) v4l2_ctrls del_event removes sev->node from the ev_subs list 13) v4l2_ctrls del_event releases the ctrl lock 14) v4l2_event_unsubscribe frees the sev, to which no references are being held anymore Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] v4l2-event: Remove pending events from fh event queue when unsubscribingHans de Goede
The kev pointers inside the pending events queue (the available queue) of the fh point to data inside the sev, unsubscribing frees the sev, thus making these pointers point to freed memory! This patch fixes these dangling pointers in the available queue by removing all matching pending events on unsubscription. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALLHans de Goede
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] v4l: s5p-mfc: fix reported capabilitiesKamil Debski
MFC uses the multi-plane API, but it reported single-plane when querying capabilities. Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] media: vb2: reset queued list on REQBUFS(0) callMarek Szyprowski
Queued list was not reset on REQBUFS(0) call. This caused to enqueue a freed buffer to the driver. Reported-by: Angela Wan <angela.j.wan@gmail.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] media: vb2: set buffer length correctly for all buffer typesMarek Szyprowski
v4l2_planes[plane].length field was not initialized for userptr buffers. This patch fixes this issue. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08[media] media: vb2: add a check for uninitialized bufferMarek Szyprowski
__buffer_in_use() might be called for empty/uninitialized buffer in the following scenario: REQBUF(n, USER_PTR), QUERYBUF(). This patch fixes kernel ops in such case. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-11-08drm/i915: Fix object refcount leak on mmappable size limit error path.Eric Anholt
I've been seeing memory leaks on my system in the form of large (300-400MB) GEM objects created by now-dead processes laying around clogging up memory. I usually notice when it gets to about 1.2GB of them. Hopefully this clears up the issue, but I just found this bug by inspection. Signed-off-by: Eric Anholt <eric@anholt.net> Cc: stable@kernel.org Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-08agp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is setKeith Packard
Kernels with no iommu support cannot ever need the Ironlake work-around, so never enable it in that case. Might be better to completely remove the work-around from the kernel in this case? Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2011-11-08drm/i915: fix if statement (bogus semi-colon)Dan Carpenter
The semi-colon is a typo here and it makes the if statement unconditional. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-08hwspinlock/u8500: fix build error due to undefined labelAxel Lin
Fix below build error: CC drivers/hwspinlock/u8500_hsem.o drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe': drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not defined Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
2011-11-08md/raid5: STRIPE_ACTIVE has lock semantics, add barriersDan Williams
All updates that occur under STRIPE_ACTIVE should be globally visible when STRIPE_ACTIVE clears. test_and_set_bit() implies a barrier, but clear_bit() does not. This is suitable for 3.1-stable. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> Cc: stable@kernel.org
2011-11-08md/raid5: abort any pending parity operations when array fails.NeilBrown
When the number of failed devices exceeds the allowed number we must abort any active parity operations (checks or updates) as they are no longer meaningful, and can lead to a BUG_ON in handle_parity_checks6. This bug was introduce by commit 6c0069c0ae9659e3a91b68eaed06a5c6c37f45c8 in 2.6.29. Reported-by: Manish Katiyar <mkatiyar@gmail.com> Tested-by: Manish Katiyar <mkatiyar@gmail.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> Cc: stable@kernel.org
2011-11-08powerpc/ps3: irq: Remove IRQF_DISABLEDYong Zhang
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: Yong Zhang <yong.zhang0@gmail.com> Acked-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-11-07mfd: fix build failures in recently added ab5500 codePaul Gortmaker
These files had implicit dependencies on modular support which now show up as build failures with the module cleanup work merged to mainline. Reported-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-11-07hwspinlock/u8500: include linux/module.hAxel Lin
Include module.h to fix below build error: CC drivers/hwspinlock/u8500_hsem.o drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function) [...] drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1 make[1]: *** [drivers/hwspinlock] Error 2 make: *** [drivers] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>