drm/sun4i: csc: Rework DE3 CSC macros
authorJernej Skrabec <jernej.skrabec@siol.net>
Sun, 10 Jan 2021 20:19:45 +0000 (21:19 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 13 Jan 2021 09:33:50 +0000 (10:33 +0100)
Rework DE3 CSC macros to take just one coordinate instead of two. This
will make its usage easier in subsequent commit.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210110201947.3611649-2-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun8i_csc.c
drivers/gpu/drm/sun4i/sun8i_mixer.h

index 781955dd4995d4add13845c4c40a2158ab151121..5c6ad643dae2661b9033f2b3516899f98b9f647d 100644 (file)
@@ -194,7 +194,7 @@ static void sun8i_de3_ccsc_set_coefficients(struct regmap *map, int layer,
                return;
        }
 
-       base_reg = SUN50I_MIXER_BLEND_CSC_COEFF(DE3_BLD_BASE, layer, 0, 0);
+       base_reg = SUN50I_MIXER_BLEND_CSC_COEFF(DE3_BLD_BASE, layer, 0);
        regmap_bulk_write(map, base_reg, table, 12);
 }
 
index 7576b523fdbb1409c720ca5874425a71be9cc411..145833a9d82d46c0d65e08797ca8c7e0e3618f26 100644 (file)
 #define SUN8I_MIXER_BLEND_CK_MIN(base, x)      ((base) + 0xe0 + 0x04 * (x))
 #define SUN8I_MIXER_BLEND_OUTCTL(base)         ((base) + 0xfc)
 #define SUN50I_MIXER_BLEND_CSC_CTL(base)       ((base) + 0x100)
-#define SUN50I_MIXER_BLEND_CSC_COEFF(base, layer, x, y) \
-       ((base) + 0x110 + (layer) * 0x30 +  (x) * 0x10 + 4 * (y))
-#define SUN50I_MIXER_BLEND_CSC_CONST(base, layer, i) \
-       ((base) + 0x110 + (layer) * 0x30 +  (i) * 0x10 + 0x0c)
+#define SUN50I_MIXER_BLEND_CSC_COEFF(base, layer, x) \
+       ((base) + 0x110 + (layer) * 0x30 +  (x) * 4)
 
 #define SUN8I_MIXER_BLEND_PIPE_CTL_EN_MSK      GENMASK(12, 8)
 #define SUN8I_MIXER_BLEND_PIPE_CTL_EN(pipe)    BIT(8 + pipe)