drm/i915: Finish page flips and update primary planes after a GPU reset
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 18 Feb 2013 17:08:49 +0000 (19:08 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 20 Feb 2013 00:33:43 +0000 (01:33 +0100)
commit96a02917a0131e52efefde49c2784c0421d6c439
tree92232f7bfdf0db5796b4923722771d9d98074fe2
parent4878cae22a2405b6d33318e2dc99a9c1367fee44
drm/i915: Finish page flips and update primary planes after a GPU reset

GPU reset will drop all flips that are still in the ring. So after the
reset, call update_plane() for all CRTCs to make sure the primary
planes are scanning out from the correct buffer.

Also finish all pending flips. That means user space will get its
page flip events and won't get stuck waiting for them.

v2: Explicitly finish page flips instead of relying on FLIP_DONE
    interrupt being generated by the base address update.
v3: Make two loops over crtcs to avoid deadlocks with the crtc mutex

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: Fixup long line complaint from checkpatch.]
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