Signed-off-by: Emil Velikov <[email protected]>
---

Noticed while looking at an issue reported by Rafał Miłecki.

Seems like the right thing to do, but I don't know the specifics
behind the mode_set_base_atomic() so cannot comment if
nouveau_fbcon_save/restore is even needed or not.

Cheers
Emil

 drivers/gpu/drm/nouveau/dispnv04/crtc.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c 
b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index d4fbf11..6a89409 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -915,13 +915,14 @@ nv04_crtc_mode_set_base_atomic(struct drm_crtc *crtc,
 {
        struct nouveau_drm *drm = nouveau_drm(crtc->dev);
        struct drm_device *dev = drm->dev;
+       int ret;
 
        if (state == ENTER_ATOMIC_MODE_SET)
                nouveau_fbcon_save_disable_accel(dev);
-       else
+       ret = nv04_crtc_do_mode_set_base(crtc, fb, x, y, true);
+       if (state == LEAVE_ATOMIC_MODE_SET)
                nouveau_fbcon_restore_accel(dev);
-
-       return nv04_crtc_do_mode_set_base(crtc, fb, x, y, true);
+       return ret;
 }
 
 static void nv04_cursor_upload(struct drm_device *dev, struct nouveau_bo *src,
-- 
1.9.0

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to