[Intel-gfx] [PATCH v4] drm/i915: Use a spin lock to protect the pipe crc struct

Daniel Vetter daniel at ffwll.ch
Tue Oct 22 00:27:16 CEST 2013


On Mon, Oct 21, 2013 at 02:29:30PM +0100, Damien Lespiau wrote:
> Daniel pointed out that it was hard to get anything lockless to work
> correctly, so don't even try for this non critical piece of code and
> just use a spin lock.
> 
> v2: Make intel_pipe_crc->opened a bool
> v3: Use assert_spin_locked() instead of a comment (Daniel Vetter)
> v4: Use spin_lock_irq() in the debugfs functions (they can only be
>     called from process context),
>     Use spin_lock() in the pipe_crc_update() function that can only be
>     called from an interrupt handler,
>     Use wait_event_interruptible_lock_irq() when waiting for data in the
>     cicular buffer to ensure proper locking around the condition we are
>     waiting for. (Daniel Vetter)
> 
> Suggested-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>

Queued for -next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list