Commit 7a744a75 authored by Jernej Skrabec's avatar Jernej Skrabec Committed by Maxime Ripard

drm/sun4i: Set blending mode for all channels (DE2)

BSP driver always sets blend mode for all channels, no matter if they
are really used or not. Do the same here.

The exact meaning of the value is not exactly known, but BSP driver
mentions "SRC OVER" and by digging through code some more info can be
found.
Signed-off-by: default avatarJernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171201060550.10392-8-jernej.skrabec@siol.net
parent 2f4cffe4
...@@ -239,6 +239,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, ...@@ -239,6 +239,7 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
struct sun8i_mixer *mixer; struct sun8i_mixer *mixer;
struct resource *res; struct resource *res;
void __iomem *regs; void __iomem *regs;
int plane_cnt;
int i, ret; int i, ret;
/* /*
...@@ -324,8 +325,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, ...@@ -324,8 +325,6 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
/* Initialize blender */ /* Initialize blender */
regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_FCOLOR_CTL, regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_FCOLOR_CTL,
SUN8I_MIXER_BLEND_FCOLOR_CTL_DEF); SUN8I_MIXER_BLEND_FCOLOR_CTL_DEF);
regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_MODE(0),
SUN8I_MIXER_BLEND_MODE_DEF);
regmap_write(mixer->engine.regs, regmap_write(mixer->engine.regs,
SUN8I_MIXER_BLEND_ATTR_FCOLOR(0), SUN8I_MIXER_BLEND_ATTR_FCOLOR(0),
...@@ -337,6 +336,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master, ...@@ -337,6 +336,11 @@ static int sun8i_mixer_bind(struct device *dev, struct device *master,
regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_ROUTE, regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_ROUTE,
mixer->cfg->vi_num); mixer->cfg->vi_num);
plane_cnt = mixer->cfg->vi_num + mixer->cfg->ui_num;
for (i = 0; i < plane_cnt; i++)
regmap_write(mixer->engine.regs, SUN8I_MIXER_BLEND_MODE(i),
SUN8I_MIXER_BLEND_MODE_DEF);
return 0; return 0;
err_disable_bus_clk: err_disable_bus_clk:
......
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