mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
drm: sun4i: de33: vi_scaler: add Display Engine 3.3 (DE33) support
The vi_scaler appears to be used in preference to the ui_scaler module for hardware video scaling in the DE33. Enable support for this scaler. Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Ryan Walklin <ryan@testtoast.com> Acked-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20250528092431.28825-8-ryan@testtoast.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
5b9cfdbfc3
commit
9e623068f1
|
|
@ -94,12 +94,24 @@ static int sun8i_ui_layer_update_coord(struct sun8i_mixer *mixer, int channel,
|
|||
hscale = state->src_w / state->crtc_w;
|
||||
vscale = state->src_h / state->crtc_h;
|
||||
|
||||
sun8i_ui_scaler_setup(mixer, channel, src_w, src_h, dst_w,
|
||||
dst_h, hscale, vscale, hphase, vphase);
|
||||
sun8i_ui_scaler_enable(mixer, channel, true);
|
||||
if (mixer->cfg->de_type == SUN8I_MIXER_DE33) {
|
||||
sun8i_vi_scaler_setup(mixer, channel, src_w, src_h,
|
||||
dst_w, dst_h, hscale, vscale,
|
||||
hphase, vphase,
|
||||
state->fb->format);
|
||||
sun8i_vi_scaler_enable(mixer, channel, true);
|
||||
} else {
|
||||
sun8i_ui_scaler_setup(mixer, channel, src_w, src_h,
|
||||
dst_w, dst_h, hscale, vscale,
|
||||
hphase, vphase);
|
||||
sun8i_ui_scaler_enable(mixer, channel, true);
|
||||
}
|
||||
} else {
|
||||
DRM_DEBUG_DRIVER("HW scaling is not needed\n");
|
||||
sun8i_ui_scaler_enable(mixer, channel, false);
|
||||
if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
|
||||
sun8i_vi_scaler_enable(mixer, channel, false);
|
||||
else
|
||||
sun8i_ui_scaler_enable(mixer, channel, false);
|
||||
}
|
||||
|
||||
/* Set base coordinates */
|
||||
|
|
|
|||
|
|
@ -835,7 +835,9 @@ static const u32 bicubic4coefftab32[480] = {
|
|||
|
||||
static u32 sun8i_vi_scaler_base(struct sun8i_mixer *mixer, int channel)
|
||||
{
|
||||
if (mixer->cfg->de_type == SUN8I_MIXER_DE3)
|
||||
if (mixer->cfg->de_type == SUN8I_MIXER_DE33)
|
||||
return sun8i_channel_base(mixer, channel) + 0x3000;
|
||||
else if (mixer->cfg->de_type == SUN8I_MIXER_DE3)
|
||||
return DE3_VI_SCALER_UNIT_BASE +
|
||||
DE3_VI_SCALER_UNIT_SIZE * channel;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user