[PATCH 6/8] drm/rockchip: vop2: Find the first mixer of a video port with Esmart3 too
Chaoyi Chen
chaoyi.chen at rock-chips.com
Tue Nov 10 01:56:50 PST 2026
Hi Arun,
On 11/10/2026 3:18 PM, Arun Iyengar via B4 Relay wrote:
> From: Arun Iyengar <aiyengar1990 at gmail.com>
>
> vop2_find_start_mixer_id_for_vp() looks for the first layer that holds a
> window of the video port, but for_each_set_bit() takes the number of bits
> to search, and ROCKCHIP_VOP2_ESMART3 is the highest window id, so Esmart3
> is never found. A video port whose bottom layer shows Esmart3 then starts
> its alpha setup at the mixer of a higher layer, or, if Esmart3 is its
> only window, past all layers, and programs mixers of other video ports.
>
> Search all window ids.
>
> Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
> ---
> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> index 83203d18865b..2843bfb36341 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> @@ -1889,7 +1889,7 @@ static int vop2_find_start_mixer_id_for_vp(struct vop2_video_port *vp)
>
> for (i = 0; i < 31; i += 4) {
> match = false;
> - for_each_set_bit(phys_id, &win_mask, ROCKCHIP_VOP2_ESMART3) {
> + for_each_set_bit(phys_id, &win_mask, ROCKCHIP_VOP2_ESMART3 + 1) {
It would be better to add `ROCKCHIP_VOP_MAX_LAYER_ID` after ROCKCHIP_VOP2_ESMART3.
> win = vop2_find_win_by_phys_id(vop2, phys_id);
> if (win->data->layer_sel_id[vp->id] == ((layer_sel >> i) & 0xf)) {
> match = true;
>
--
Best,
Chaoyi
More information about the Linux-rockchip
mailing list