drm/nouveau: Call drm_vblank_pre/post_modeset() around mode setting.
authorFrancisco Jerez <currojerez@riseup.net>
Mon, 25 Oct 2010 01:30:34 +0000 (03:30 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 3 Dec 2010 05:11:14 +0000 (15:11 +1000)
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv04_crtc.c
drivers/gpu/drm/nouveau/nv50_crtc.c

index e4aea721971fc3d2bc3d1adbf1ab340407bc1a0e..297505eb98d5802f141e9c8dd06d6e6f7f1191b8 100644 (file)
@@ -672,6 +672,7 @@ static void nv_crtc_prepare(struct drm_crtc *crtc)
        if (nv_two_heads(dev))
                NVSetOwner(dev, nv_crtc->index);
 
+       drm_vblank_pre_modeset(dev, nv_crtc->index);
        funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
 
        NVBlankScreen(dev, nv_crtc->index, true);
@@ -704,6 +705,7 @@ static void nv_crtc_commit(struct drm_crtc *crtc)
 #endif
 
        funcs->dpms(crtc, DRM_MODE_DPMS_ON);
+       drm_vblank_post_modeset(dev, nv_crtc->index);
 }
 
 static void nv_crtc_destroy(struct drm_crtc *crtc)
index 1225ea0a841b04aea10b05280d17c1e95b6df937..f3570cc450175b2b882adc3e207a853761a4a5aa 100644 (file)
@@ -454,6 +454,7 @@ nv50_crtc_prepare(struct drm_crtc *crtc)
 
        NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
 
+       drm_vblank_pre_modeset(dev, nv_crtc->index);
        nv50_crtc_blank(nv_crtc, true);
 }
 
@@ -469,6 +470,7 @@ nv50_crtc_commit(struct drm_crtc *crtc)
        NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
 
        nv50_crtc_blank(nv_crtc, false);
+       drm_vblank_post_modeset(dev, nv_crtc->index);
 
        ret = RING_SPACE(evo, 2);
        if (ret) {