[PATCH xf86-video-amdgpu 11/13] Push staged color properties on output detect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Leo (Sunpeng) Li" <sunpeng.li@xxxxxxx>

This will persist color management properties on a CRTC across
hot-plugs.

Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
---
 src/drmmode_display.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 06ae902..f7fad34 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2125,6 +2125,7 @@ static xf86OutputStatus drmmode_output_detect(xf86OutputPtr output)
 	AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(output->scrn);
 	xf86OutputStatus status;
 	drmModeFreeConnector(drmmode_output->mode_output);
+	int i;
 
 	drmmode_output->mode_output =
 	    drmModeGetConnector(pAMDGPUEnt->fd, drmmode_output->output_id);
@@ -2134,6 +2135,13 @@ static xf86OutputStatus drmmode_output_detect(xf86OutputPtr output)
 	}
 
 	drmmode_output_update_properties(output);
+	if (output->crtc) {
+		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(output->crtc, i);
+		}
+	}
 
 	switch (drmmode_output->mode_output->connection) {
 	case DRM_MODE_CONNECTED:
-- 
2.7.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux