[PATCH xf86-video-amdgpu] Do not push the CM_GAMMA_LUT property values in drmmode_crtc_cm_init

Alex Deucher alexdeucher at gmail.com
Sun Sep 2 15:01:21 UTC 2018


On Fri, Aug 31, 2018 at 6:45 AM Michel Dänzer <michel at daenzer.net> wrote:
>
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> 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.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  src/drmmode_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 46be29d07..6ef6a98e2 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -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
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list