drm/i915: Make mmio flip wait for seqno in the work function
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 6 Nov 2014 09:03:40 +0000 (11:03 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 7 Nov 2014 17:42:20 +0000 (18:42 +0100)
commit536f5b5e86b225dab94c7ff8061ae482b6077387
treee6c9d3940afe5cf376ede7bc7c515d7da9bc4d14
parent16e9a21f33cda9d48b70ff54e1ed2e4a77497bc6
drm/i915: Make mmio flip wait for seqno in the work function

This simplifies the code quite a bit compared to iterating over all
rings during the ring interrupt.

Also, it allows us to drop the mmio_flip spinlock, since the mmio_flip
struct is only accessed in two places. The first is when the flip is
queued and the other when the mmio writes are done. Since a flip cannot
be queued while there is a pending flip, the two paths shouldn't ever
run in parallel. We might need to revisit that if support for replacing
flips is implemented though.

v2: Don't hold dev->struct_mutext while waiting (Chris)

v3: Make the wait uninterruptable (Chris)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h