bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0569-drm-vc4-Only-add-gamma-properties-once.patch
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.
5
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.
9
10 Fixes: 766cc6b1f7fc "drm/vc4: Add CTM support"
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
12 ---
13 drivers/gpu/drm/vc4/vc4_crtc.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
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.
21 */
22 - drm_crtc_enable_color_mgmt(crtc, 0, true, crtc->gamma_size);
23 + drm_crtc_enable_color_mgmt(crtc, 0, true, 0);
24
25 /* Initialize the VC4 gamma LUTs */
26 for (i = 0; i < crtc->gamma_size; i++) {