]> Gentwo Git Trees - linux/.git/commit
drm/rockchip: vop2: Use OVL_LAYER_SEL configuration instead of use win_mask calculate...
authorAndy Yan <andy.yan@rock-chips.com>
Wed, 12 Nov 2025 08:50:23 +0000 (16:50 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Fri, 14 Nov 2025 23:36:09 +0000 (00:36 +0100)
commitd3fe9aa495854f8d88c69c41a4b31e69424656ad
tree3d9066c60baed34b873c77431e9784e83d3af455
parent7d7bb790aced3b1b8550b74e02fdfc001d044bee
drm/rockchip: vop2: Use OVL_LAYER_SEL configuration instead of use win_mask calculate used layers

When there are multiple Video Ports, and only one of them is working
(for example, VP1 is working while VP0 is not), in this case, the
win_mask of VP0 is 0. However, we have already set the port mux for VP0
according to vp0->nlayers, and at the same time, in the OVL_LAYER_SEL
register, there are windows will also be assigned to layers which will
map to the inactive VPs. In this situation, vp0->win_mask is zero as it
now working, it is more reliable to calculate the used layers based on
the configuration of the OVL_LAYER_SEL register.

Note: as the configuration of OVL_LAYER_SEL is take effect when the
vsync is come, so we use the value backup in vop2->old_layer_sel instead
of read OVL_LAYER_SEL directly.

Fixes: 3e89a8c68354 ("drm/rockchip: vop2: Fix the update of LAYER/PORT select registers when there are multi display output on rk3588/rk3568")
Cc: stable@vger.kernel.org
Reported-by: Diederik de Haas <diederik@cknow-tech.com>
Closes: https://bugs.kde.org/show_bug.cgi?id=511274
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Tested-by: Dang Huynh <dang.huynh@mainlining.org>
Tested-by: Diederik de Haas <diederik@cknow-tech.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20251112085024.2480111-1-andyshrk@163.com
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c