提交 4878cae2 编写于 作者: V Ville Syrjälä 提交者: Daniel Vetter

drm/i915: Really wait for pending flips when panning

Since obj->pending_flips was never set, intel_pipe_set_base() never
actually waited for pending page flips to complete.

We really do want to wait for the pending flips, because otherwise the
mmio surface base address update could overtake the flip, and you
could end up with an old frame on the screen once the flip really
completes.

Just call intel_crtc_wait_pending_flips() prior to calling
intel_pipe_set_base() instead of calling just intel_finish_fb()
from intel_pipe_set_base(). Moving the call outside of
intel_pipe_set_base() avoids calling it twice from the full
modeset path.

v2: Wait for pending flips w/o holding struct_mutex
Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 c4aaf350
...@@ -2301,9 +2301,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, ...@@ -2301,9 +2301,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
return ret; return ret;
} }
if (crtc->fb)
intel_finish_fb(crtc->fb);
ret = dev_priv->display.update_plane(crtc, fb, x, y); ret = dev_priv->display.update_plane(crtc, fb, x, y);
if (ret) { if (ret) {
intel_unpin_fb_obj(to_intel_framebuffer(fb)->obj); intel_unpin_fb_obj(to_intel_framebuffer(fb)->obj);
...@@ -8125,6 +8122,8 @@ static int intel_crtc_set_config(struct drm_mode_set *set) ...@@ -8125,6 +8122,8 @@ static int intel_crtc_set_config(struct drm_mode_set *set)
goto fail; goto fail;
} }
} else if (config->fb_changed) { } else if (config->fb_changed) {
intel_crtc_wait_for_pending_flips(set->crtc);
ret = intel_pipe_set_base(set->crtc, ret = intel_pipe_set_base(set->crtc,
set->x, set->y, set->fb); set->x, set->y, set->fb);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册