[Intel-gfx] [PATCH 1/4] drm/i915: fix ilk rc6 teardown locking

Keith Packard keithp at keithp.com
Sat Mar 19 19:46:38 CET 2011


On Sat, 19 Mar 2011 07:44:24 +0000, Chris Wilson <chris at chris-wilson.co.uk> wrote:

> 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.

This seems like the right plan to me as well -- make access to the
renderctx always covered by the struct mutex.

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

Ick. Better to just stick the needed locks around the two calls to
ironlake_teardown_rc6. You're just masking the issue otherwise.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110319/7e8e32df/attachment.sig>


More information about the Intel-gfx mailing list