]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: unload: fix hotplug_work races
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Aug 2010 16:26:46 +0000 (18:26 +0200)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Sep 2010 09:13:24 +0000 (10:13 +0100)
commit352ebbba005bf5eed5e62adec57e2ef85b20c0a4
treec6ef345799ac6ed7038686f3ba064042401f1566
parenta62f109c45019d60b20b4a43a1ea9b3efe1ea33f
drm/i915: unload: fix hotplug_work races

hotplug_work is queued by the hotplug interrupt and only either emits
a hotplug uevent or queues a crt poll slow-work. No other locking.  So
it's safe to cancel this work _after_ irq's have been turned off.  But
before the modesetting objects are destroyed because the hotplug
function accesses them (without locking).

The current code (for kms) only switches irqs off after modesetting
teardown, hence move the irq teardown into the modeset cleanup right
before the crtc cleanup.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/intel_display.c