From: Arun Iyengar <[email protected]>

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 <[email protected]>
---
 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) 
{
                        win = vop2_find_win_by_phys_id(vop2, phys_id);
                        if (win->data->layer_sel_id[vp->id] == ((layer_sel >> 
i) & 0xf)) {
                                match = true;

-- 
2.55.0


Reply via email to