drm/i915: Don't clobber crtc->fb when queue_flip fails
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 22 Feb 2013 14:53:38 +0000 (16:53 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 20 Mar 2013 15:03:21 +0000 (15:03 +0000)
commit0149797bb6d01648df71fed72b88591c75bca5a5
treec0950a64772bd5e99fd83fb8147bad7cba37b66b
parente0179c31e0818d5efc87a475f2b83979ef2d3585
drm/i915: Don't clobber crtc->fb when queue_flip fails

commit 4a35f83b2b7c6aae3fc0d1c4554fdc99dc33ad07 upstream.

Restore crtc->fb to the old framebuffer if queue_flip fails.

While at it, kill the pointless intel_fb temp variable.

v2: Update crtc->fb before queue_flip and restore it back
    after a failure.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-Tested-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/intel_display.c