drm/i915: fix ilk rc6 teardown locking
authorBen Widawsky <ben@bwidawsk.net>
Sun, 20 Mar 2011 01:14:26 +0000 (18:14 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 10 May 2011 20:56:40 +0000 (13:56 -0700)
In the failure cases during rc6 initialization, both the power context
and render context may get !refcount without holding struct_mutex.
However, on rc6 disabling, the lock is held by the caller.

Rearranged the locking so that it's safe in both cases.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>

No differences found