[PATCH v4 03/14] drm/rockchip: vop2: Fix the mixer alpha setup for layer 0
Andy Yan
andyshrk at 163.com
Tue Oct 29 02:54:56 PDT 2024
From: Andy Yan <andy.yan at rock-chips.com>
The alpha setup should start from the second layer, the current calculation
starts incorrectly from the first layer, a negative offset will be obtained
in the following formula:
offset = (mixer_id + zpos - 1) * 0x10
Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver")
Signed-off-by: Andy Yan <andy.yan at rock-chips.com>
Tested-by: Derek Foreman <derek.foreman at collabora.com>
Tested-by: Michael Riesch <michael.riesch at wolfvision.net> # on RK3568
Tested-by: Detlev Casanova <detlev.casanova at collabora.com>
---
(no changes since v1)
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index bff190151ae8c..c50d93df84046 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -2282,6 +2282,12 @@ static void vop2_setup_alpha(struct vop2_video_port *vp)
struct vop2_win *win = to_vop2_win(plane);
int zpos = plane->state->normalized_zpos;
+ /*
+ * Need to configure alpha from second layer.
+ */
+ if (zpos == 0)
+ continue;
+
if (plane->state->pixel_blend_mode == DRM_MODE_BLEND_PREMULTI)
premulti_en = 1;
else
--
2.34.1
More information about the Linux-rockchip
mailing list