drm/sun4i: Enable output signal premultiplication for DE2/DE3
Subsystems (5)
DRM drivers DRM misc Arm/Allwinner sunXi SoC support DRM drivers for Allwinner A10 +1 more subsystems
PATCH 1/1 drm/sun4i: Enable output signal premultiplication for DE2/DE3
Otherwise alpha value is discarded, resulting incorrect pixel apperance on the display.
This also fixes missing transparency for the most bottom layer.
Test applications and videos w/ w/o this patch are available at [1].
[1]: https://github.com/GloDroid/glodroid_tests/issues/1
Signed-off-by Roman Stratiienko <[email protected]>
--- drivers/gpu/drm/sun4i/sun8i_mixer.c | 2 ++ drivers/gpu/drm/sun4i/sun8i_mixer.h | 1 + 2 files changed, 3 insertions(+)
drivers/gpu/drm/sun4i/sun8i_mixer.c +2 -0
@@ -320,6 +320,8 @@ static void sun8i_mixer_mode_set(struct sunxi_engine *engine,else val =0 ; + val |=SUN8I_MIXER_BLEND_OUTCTL_PREMULTIPLY ; +regmap_update_bits (engine->regs,SUN8I_MIXER_BLEND_OUTCTL (bld_base),SUN8I_MIXER_BLEND_OUTCTL_INTERLACED , val);
drivers/gpu/drm/sun4i/sun8i_mixer.h +1 -0
@@ -65,6 +65,7 @@#define SUN8I_MIXER_BLEND_ROUTE_PIPE_MSK (n) (0xf << ((n) << 2))#define SUN8I_MIXER_BLEND_ROUTE_PIPE_SHIFT (n) ((n) << 2) +#define SUN8I_MIXER_BLEND_OUTCTL_PREMULTIPLY BIT(0)#define SUN8I_MIXER_BLEND_OUTCTL_INTERLACED BIT(1)#define SUN50I_MIXER_BLEND_CSC_CTL_EN (ch) BIT(ch)
Signature · 1 line
2.30.2