From: "Leo (Sunpeng) Li" <[email protected]>

The dpms_mode flag on the driver-private CRTC was not being set when
it's DPMS state is set to off. This causes some problems when toggling
it back on, as some conditionals check this flag.

Signed-off-by: Leo (Sunpeng) Li <[email protected]>
---
 src/drmmode_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 2b38a71..f86f99a 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -347,6 +347,7 @@ drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode)
                drmModeSetCrtc(pAMDGPUEnt->fd, drmmode_crtc->mode_crtc->crtc_id,
                               0, 0, 0, NULL, 0, NULL);
                drmmode_fb_reference(pAMDGPUEnt->fd, &drmmode_crtc->fb, NULL);
+               drmmode_crtc->dpms_mode = mode;
        } else if (drmmode_crtc->dpms_mode != DPMSModeOn)
                crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
                                            crtc->x, crtc->y);
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to