Commit 218d6a3c authored by Jernej Skrabec's avatar Jernej Skrabec Committed by Maxime Ripard

drm/sun4i: Fix DE2 mixer size

DE2 mixer is always 0x6000 bytes in size on all known SoCs.

While at it, introduce a macro for that.
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181104182705.18047-11-jernej.skrabec@siol.net
parent 4b09c073
...@@ -460,7 +460,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, ...@@ -460,7 +460,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
base = sun8i_blender_base(mixer); base = sun8i_blender_base(mixer);
/* Reset the registers */ /* Reset the registers */
for (i = 0x0; i < 0x20000; i += 4) for (i = 0; i < DE2_MIXER_UNIT_SIZE; i += 4)
regmap_write(mixer->engine.regs, i, 0); regmap_write(mixer->engine.regs, i, 0);
/* Enable the mixer */ /* Enable the mixer */
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#define SUN8I_MIXER_GLOBAL_DBUFF_ENABLE BIT(0) #define SUN8I_MIXER_GLOBAL_DBUFF_ENABLE BIT(0)
#define DE2_MIXER_UNIT_SIZE 0x6000
#define DE2_BLD_BASE 0x1000 #define DE2_BLD_BASE 0x1000
#define DE2_CH_BASE 0x2000 #define DE2_CH_BASE 0x2000
#define DE2_CH_SIZE 0x1000 #define DE2_CH_SIZE 0x1000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment