drm/i915: unload: fix retire_work races
commit75ef9da2cdb64e7926404dd2b755bbbfe98eaeaf
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 20 Aug 2010 22:25:16 +0000 (21 00:25 +0200)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 8 Sep 2010 09:13:28 +0000 (8 10:13 +0100)
treeef200ecba7bb6c9a8cb2ee3d830f30c5d5377207
parentc911fc1c6ad61b56869ee521f1a477c741b039da
drm/i915: unload: fix retire_work races

ums-gem code correctly cancels the retire work (at lastclose time),
kms does not do so. Fix this by canceling the work right after ideling
the gpu.

While staring at the code I noticed that the work function is not
static. Fix this, too.

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/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c