drm/i915: Hold the spinlock whilst resetting unpin_work along error path
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 27 May 2010 12:18:13 +0000 (13:18 +0100)
committerEric Anholt <eric@anholt.net>
Fri, 28 May 2010 17:40:27 +0000 (10:40 -0700)
commit468f0b44ce4b002ca7d9260f802a341854752c02
tree43ab02a3949035fca6d169aa3b10cf6e836455ab
parent35aed2e6be2feaa227fe5c7a0b7c286c4fe71592
drm/i915: Hold the spinlock whilst resetting unpin_work along error path

Delay taking the mutex until we need to and ensure that we hold the
spinlock when resetting unpin_work on the error path. Also defer the
debugging print messages until after we have released the spinlock.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_display.c