@@ -9073,8 +9073,7 @@ static void intel_do_mmio_flip(struct intel_crtc *intel_crtc)
intel_mark_page_flip_active(intel_crtc);
- I915_WRITE(DSPSURF(intel_crtc->plane), i915_gem_obj_ggtt_offset(obj) +
- intel_crtc->dspaddr_offset);
+ I915_WRITE(DSPSURF(intel_crtc->plane), intel_crtc->unpin_work->gtt_offset);
POSTING_READ(DSPSURF(intel_crtc->plane));
}
@@ -9142,6 +9141,9 @@ static int intel_queue_mmio_flip(struct drm_device *dev,
if (ret)
goto err;
+ intel_crtc->unpin_work->gtt_offset =
+ i915_gem_obj_ggtt_offset(obj) + intel_crtc->dspaddr_offset;
+
ret = intel_postpone_flip(obj);
if (ret < 0) {
goto err_unpin;