提交 1d3fac0c 编写于 作者: B Ben Skeggs

drm/nv50-nvc0: activate/update ds channel's framebuffer on modesets

The hw doesn't really appear to be designed to be used the way we have to
use it due to DRI2's design.  This leads us to having to keep the flipped
fb support active at all times.
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 cdccc70e
...@@ -487,6 +487,7 @@ nv50_crtc_prepare(struct drm_crtc *crtc) ...@@ -487,6 +487,7 @@ nv50_crtc_prepare(struct drm_crtc *crtc)
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index); NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
nv50_display_flip_stop(crtc);
drm_vblank_pre_modeset(dev, nv_crtc->index); drm_vblank_pre_modeset(dev, nv_crtc->index);
nv50_crtc_blank(nv_crtc, true); nv50_crtc_blank(nv_crtc, true);
} }
...@@ -502,6 +503,7 @@ nv50_crtc_commit(struct drm_crtc *crtc) ...@@ -502,6 +503,7 @@ nv50_crtc_commit(struct drm_crtc *crtc)
nv50_crtc_blank(nv_crtc, false); nv50_crtc_blank(nv_crtc, false);
drm_vblank_post_modeset(dev, nv_crtc->index); drm_vblank_post_modeset(dev, nv_crtc->index);
nv50_crtc_wait_complete(crtc); nv50_crtc_wait_complete(crtc);
nv50_display_flip_next(crtc, crtc->fb, NULL);
} }
static bool static bool
...@@ -683,11 +685,16 @@ nv50_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y, ...@@ -683,11 +685,16 @@ nv50_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
{ {
int ret; int ret;
nv50_display_flip_stop(crtc);
ret = nv50_crtc_do_mode_set_base(crtc, old_fb, x, y, false); ret = nv50_crtc_do_mode_set_base(crtc, old_fb, x, y, false);
if (ret) if (ret)
return ret; return ret;
return nv50_crtc_wait_complete(crtc); ret = nv50_crtc_wait_complete(crtc);
if (ret)
return ret;
return nv50_display_flip_next(crtc, crtc->fb, NULL);
} }
static int static int
...@@ -697,6 +704,7 @@ nv50_crtc_mode_set_base_atomic(struct drm_crtc *crtc, ...@@ -697,6 +704,7 @@ nv50_crtc_mode_set_base_atomic(struct drm_crtc *crtc,
{ {
int ret; int ret;
nv50_display_flip_stop(crtc);
ret = nv50_crtc_do_mode_set_base(crtc, fb, x, y, true); ret = nv50_crtc_do_mode_set_base(crtc, fb, x, y, true);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册