|
@@ -1611,6 +1611,18 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
|
|
|
|
|
|
wait_event(dev_priv->pending_flip_queue,
|
|
|
atomic_read(&obj_priv->pending_flip) == 0);
|
|
|
+
|
|
|
+ /* Big Hammer, we also need to ensure that any pending
|
|
|
+ * MI_WAIT_FOR_EVENT inside a user batch buffer on the
|
|
|
+ * current scanout is retired before unpinning the old
|
|
|
+ * framebuffer.
|
|
|
+ */
|
|
|
+ ret = i915_gem_object_flush_gpu(obj_priv, false);
|
|
|
+ if (ret) {
|
|
|
+ i915_gem_object_unpin(to_intel_framebuffer(crtc->fb)->obj);
|
|
|
+ mutex_unlock(&dev->struct_mutex);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ret = intel_pipe_set_base_atomic(crtc, crtc->fb, x, y,
|