aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-14 11:09:31 -0500
committerChris Wilson <chris@chris-wilson.co.uk>2010-12-15 05:33:23 -0500
commitb7f1de289c50beb4998611ba5373e539efd0f79f (patch)
treeb5a47897f8372e36012c4ce698a58b73311b0a24
parentc6df541c00e53a4fdff7a130d4365f848075adcc (diff)
drm/i915: Wait for vblank before unpinning old fb
Be paranoid and ensure that the vblank has passed and the scanout has switched to the new fb, before unpinning the old one and possibly tearing down its PTEs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f2d50141e0c2..840bfc3ae719 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1626,8 +1626,10 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
1626 return ret; 1626 return ret;
1627 } 1627 }
1628 1628
1629 if (old_fb) 1629 if (old_fb) {
1630 intel_wait_for_vblank(dev, intel_crtc->pipe);
1630 i915_gem_object_unpin(to_intel_framebuffer(old_fb)->obj); 1631 i915_gem_object_unpin(to_intel_framebuffer(old_fb)->obj);
1632 }
1631 1633
1632 mutex_unlock(&dev->struct_mutex); 1634 mutex_unlock(&dev->struct_mutex);
1633 1635