summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-14 16:09:31 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-12-15 10:33:23 +0000
commitb7f1de289c50beb4998611ba5373e539efd0f79f (patch)
treeb5a47897f8372e36012c4ce698a58b73311b0a24 /drivers/gpu
parentc6df541c00e53a4fdff7a130d4365f848075adcc (diff)
downloadop-kernel-dev-b7f1de289c50beb4998611ba5373e539efd0f79f.zip
op-kernel-dev-b7f1de289c50beb4998611ba5373e539efd0f79f.tar.gz
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>
Diffstat (limited to 'drivers/gpu')
-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 f2d5014..840bfc3 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,
return ret;
}
- if (old_fb)
+ if (old_fb) {
+ intel_wait_for_vblank(dev, intel_crtc->pipe);
i915_gem_object_unpin(to_intel_framebuffer(old_fb)->obj);
+ }
mutex_unlock(&dev->struct_mutex);
OpenPOWER on IntegriCloud