On Fri, 18 Mar 2011 16:12:45 -0700, Ben Widawsky <[email protected]> wrote:
> 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.
> 
> Added a simple parameter to control whether or not to acquire the lock.

I have an aversion to passing parameters around to control locking.
Considering that we modify dev_private and adjust LP_RING during enable,
wouldn't it be prudent to move that under the struct mutex? Especially in
the future if we allow it be enabled at runtime.

Failing that: bool was_locked = mutex_is_locked(&dev->struct_mutex);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to