Skip to contentSkip to conversation

Do not push the CM_GAMMA_LUT property values in drmmode_crtc_cm_init

PATCH In review Michel Dänzer 2 participants 2 messages Aug 31, 2018 – Sep 2, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not push the CM_GAMMA_LUT property values in drmmode_crtc_cm_init

From: Michel Dänzer <[email protected]>

The crtc->gamma_lut values aren't initialized yet at this point, and the property values are pushed again from drmmode_setup_colormap anyway.

Fixes intermittent flicker due to random gamma LUT values during server startup.

---
 src/drmmode_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/drmmode_display.c +1 -1
index 46be29d07..6ef6a98e2 100644
@@ -1863,7 +1863,7 @@ static void drmmode_crtc_cm_init(int drm_fd, xf86CrtcPtr crtc)
 		drmmode_crtc->ctm->matrix[8] = (uint64_t)1 << 32;
 
 	/* Push properties to reset properties currently in hardware */
-	for (i = 0; i < CM_DEGAMMA_LUT_SIZE; i++) {
+	for (i = 0; i < CM_GAMMA_LUT; i++) {
 		if (drmmode_crtc_push_cm_prop(crtc, i))
 			xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
 				   "Failed to initialize color management "
Signature · 6 lines
2.18.0

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

A message that is not in the archive (sent off-list or not yet received): 20180831104501.6920-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Acked-by
#2 lore raw
Quoted 11 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

The crtc->gamma_lut values aren't initialized yet at this point, and the property values are pushed again from drmmode_setup_colormap anyway.

Fixes intermittent flicker due to random gamma LUT values during server startup.

Quoted 20 lines
---
 src/drmmode_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/drmmode_display.c +1 -2
index 46be29d07..6ef6a98e2 100644
@@ -1863,7 +1863,7 @@ static void drmmode_crtc_cm_init(int drm_fd, xf86CrtcPtr crtc)
                drmmode_crtc->ctm->matrix[8] = (uint64_t)1 << 32;
 
        /* Push properties to reset properties currently in hardware */
-       for (i = 0; i < CM_DEGAMMA_LUT_SIZE; i++) {
+       for (i = 0; i < CM_GAMMA_LUT; i++) {
                if (drmmode_crtc_push_cm_prop(crtc, i))
                        xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
                                   "Failed to initialize color management "
--

2.18.0

Quoted 4 lines

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

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