[PATCH 03/13] drm/sun4i: vi scaler: Restore opaque alpha in video modes
Chen-Yu Tsai
wens at kernel.org
Mon Aug 3 09:35:41 PDT 2026
On Tue, Aug 4, 2026 at 12:11 AM Jernej Skrabec <jernej.skrabec at gmail.com> wrote:
>
> The DE3 mixer initialization clears the entire mixer register space. This
> also clears VSU_GLOBAL_ALPHA, despite its hardware reset value being 0xff.
>
> The VI scaler uses Video Normal mode for subsampled YUV formats. In this
> mode, VSU_GLOBAL_ALPHA provides the scaler output alpha. Leaving the
> register at zero causes the scaler to produce fully transparent output.
>
> Set VSU_GLOBAL_ALPHA to 0xff whenever configuring a DE3 or newer VI
> scaler. The register is ignored in UI scaling mode.
>
> Fixes: c50519e6db4d ("drm/sun4i: Add basic support for DE3")
> Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
Acked-by: Chen-Yu Tsai <wens at kernel.org>
> ---
> drivers/gpu/drm/sun4i/sun8i_vi_scaler.c | 2 ++
> drivers/gpu/drm/sun4i/sun8i_vi_scaler.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_scaler.c b/drivers/gpu/drm/sun4i/sun8i_vi_scaler.c
> index d4412a62c2f0..a5cc99981006 100644
> --- a/drivers/gpu/drm/sun4i/sun8i_vi_scaler.c
> +++ b/drivers/gpu/drm/sun4i/sun8i_vi_scaler.c
> @@ -975,6 +975,8 @@ void sun8i_vi_scaler_setup(struct sun8i_layer *layer,
>
> regmap_write(layer->regs,
> SUN50I_SCALER_VSU_SCALE_MODE(base), val);
> + regmap_write(layer->regs,
> + SUN50I_SCALER_VSU_GLB_ALPHA(base), 0xff);
> }
>
> regmap_write(layer->regs,
> diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_scaler.h b/drivers/gpu/drm/sun4i/sun8i_vi_scaler.h
> index 245fe2f431c3..d89c0cbe188d 100644
> --- a/drivers/gpu/drm/sun4i/sun8i_vi_scaler.h
> +++ b/drivers/gpu/drm/sun4i/sun8i_vi_scaler.h
> @@ -36,6 +36,7 @@
> #define SUN50I_SCALER_VSU_EDSCL_CTRL(base) ((base) + 0x28)
> #define SUN50I_SCALER_VSU_ANGLE_THR(base) ((base) + 0x2c)
> #define SUN8I_SCALER_VSU_OUTSIZE(base) ((base) + 0x40)
> +#define SUN50I_SCALER_VSU_GLB_ALPHA(base) ((base) + 0x44)
> #define SUN8I_SCALER_VSU_YINSIZE(base) ((base) + 0x80)
> #define SUN8I_SCALER_VSU_YHSTEP(base) ((base) + 0x88)
> #define SUN8I_SCALER_VSU_YVSTEP(base) ((base) + 0x8c)
> --
> 2.43.0
>
More information about the linux-arm-kernel
mailing list