drm/sun4i: Disable unused DE2 sub-engines
authorJernej Skrabec <jernej.skrabec@siol.net>
Sun, 4 Nov 2018 18:26:48 +0000 (19:26 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 5 Nov 2018 09:35:27 +0000 (10:35 +0100)
Some sub-engines are unused. Disable them explicitly.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-12-jernej.skrabec@siol.net
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sun8i_mixer.h

index 6769ec08c0d3900195a28f4c33050f11957d0766..3c2ce2781fc848d428f733e6fd627f1582a82a76 100644 (file)
@@ -463,6 +463,15 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
        for (i = 0; i < DE2_MIXER_UNIT_SIZE; i += 4)
                regmap_write(mixer->engine.regs, i, 0);
 
+       /* Disable unused sub-engines */
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_FCE_EN, 0);
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_BWS_EN, 0);
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_LTI_EN, 0);
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_PEAK_EN, 0);
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_ASE_EN, 0);
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_FCC_EN, 0);
+       regmap_write(mixer->engine.regs, SUN8I_MIXER_DCSC_EN, 0);
+
        /* Enable the mixer */
        regmap_write(mixer->engine.regs, SUN8I_MIXER_GLOBAL_CTL,
                     SUN8I_MIXER_GLOBAL_CTL_RT_EN);
index 09e0f4428c1e47e6eecc226c6bd9141c702c0408..a4175b993e0dc6edcbf5a9f17e00378e19d2c4d5 100644 (file)
 #define SUN8I_MIXER_FBFMT_YUV411       14
 
 /*
- * These sub-engines are still unknown now, the EN registers are here only to
- * be used to disable these sub-engines.
+ * Sub-engines listed bellow are unused for now. The EN registers are here only
+ * to be used to disable these sub-engines.
  */
 #define SUN8I_MIXER_FCE_EN                     0xa0000
 #define SUN8I_MIXER_BWS_EN                     0xa2000