浏览代码

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>
Chris Wilson 14 年之前
父节点
当前提交
b7f1de289c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      drivers/gpu/drm/i915/intel_display.c

+ 3 - 1
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;
 		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);
 		i915_gem_object_unpin(to_intel_framebuffer(old_fb)->obj);
+	}
 
 
 	mutex_unlock(&dev->struct_mutex);
 	mutex_unlock(&dev->struct_mutex);