drm/i915: rework locking for intel_dpio|sbi_read|write
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Dec 2012 13:06:44 +0000 (14:06 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Dec 2012 21:59:24 +0000 (22:59 +0100)
commit09153000b8ca32a539a1207edebabd0d40b6c61b
treeafb797432fbb708cc2d7bdc7e18196c078ffb9e6
parent20afbda209d708be66944907966486d0c1331cb8
drm/i915: rework locking for intel_dpio|sbi_read|write

Spinning for up to 200 us with interrupts locked out is not good. So
let's just spin (and even that seems to be excessive).

And we don't call these functions from interrupt context, so this is
not required. Besides that doing anything in interrupt contexts which
might take a few hundred us is a no-go. So just convert the entire
thing to a mutex. Also move the mutex-grabbing out of the read/write
functions (add a WARN_ON(!is_locked)) instead) since all callers are
nicely grouped together.

Finally the real motivation for this change: Dont grab the modeset
mutex in the dpio debugfs file, we don't need that consistency. And
correctness of the dpio interface is ensured with the dpio_lock.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c
This page took 0.028244 seconds and 5 git commands to generate.