1 From 749ff7fb1f2382f19ed744a86e82211711187db2 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Mon, 8 Nov 2021 18:25:49 +0000
4 Subject: [PATCH] drm/vc4: Only add gamma properties once.
6 Two calls were made to drm_crtc_enable_color_mgmt to add gamma
7 and CTM, however they were both set to add the gamma properties,
8 so they ended up added twice.
10 Fixes: 766cc6b1f7fc "drm/vc4: Add CTM support"
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
16 --- a/drivers/gpu/drm/vc4/vc4_crtc.c
17 +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
18 @@ -1196,7 +1196,7 @@ int vc4_crtc_init(struct drm_device *drm
19 /* We support CTM, but only for one CRTC at a time. It's therefore
20 * implemented as private driver state in vc4_kms, not here.
22 - drm_crtc_enable_color_mgmt(crtc, 0, true, crtc->gamma_size);
23 + drm_crtc_enable_color_mgmt(crtc, 0, true, 0);
25 /* Initialize the VC4 gamma LUTs */
26 for (i = 0; i < crtc->gamma_size; i++) {