From: "Leo (Sunpeng) Li" <sunpeng.li@xxxxxxx> This will persist color management properties on a CRTC across DPMS state changes. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com> --- src/drmmode_display.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 45c582c..06ae902 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1294,6 +1294,7 @@ drmmode_do_crtc_dpms(xf86CrtcPtr crtc, int mode) AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(scrn); CARD64 ust; int ret; + int i; if (drmmode_crtc->dpms_mode == DPMSModeOn && mode != DPMSModeOn) { uint32_t seq; @@ -1341,6 +1342,11 @@ drmmode_do_crtc_dpms(xf86CrtcPtr crtc, int mode) drmmode_crtc->interpolated_vblanks += delta_seq; } + for (i = 0; i < CM_NUM_PROPS; i++) { + if (i == CM_GAMMA_LUT_SIZE || i == CM_DEGAMMA_LUT_SIZE) + continue; + drmmode_crtc_push_cm_prop(crtc, i); + } } drmmode_crtc->dpms_mode = mode; } -- 2.7.4