linux/drivers/gpu/drm/rockchip
Andy Yan d3fe9aa495 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: 3e89a8c683 ("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
History 2025-11-15 00:36:09 +01:00
..
analogix_dp-rockchip.c drm/rockchip: analogix_dp: Use dev_err_probe() instead of DRM_DEV_ERROR() during probing 2025-11-14 22:57:53 +01:00
cdn-dp-core.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
cdn-dp-core.h drm/rockchip: cdn-dp: Convert to drm bridge 2025-07-08 17:35:49 +02:00
cdn-dp-reg.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
cdn-dp-reg.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00
dw-mipi-dsi-rockchip.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
dw-mipi-dsi2-rockchip.c drm/rockchip: dsi2: add support rk3576 2025-08-22 23:13:11 +02:00
dw_dp-rockchip.c drm/rockchip: Add RK3588 DPTX output support 2025-08-28 15:49:51 +03:00
dw_hdmi-rockchip.c drm/rockchip: dw_hdmi: switch to FIELD_PREP_WM16* macros 2025-09-02 20:06:47 -04:00
dw_hdmi_qp-rockchip.c drm/rockchip: dw_hdmi_qp: Add high color depth support 2025-11-14 23:10:38 +01:00
inno_hdmi.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
Kconfig Linux 6.17-rc6 2025-09-15 17:51:07 +10:00
Makefile drm/rockchip: Add RK3588 DPTX output support 2025-08-28 15:49:51 +03:00
rk3066_hdmi.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
rk3066_hdmi.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00
rockchip_drm_drv.c drm/rockchip: Set VOP for the DRM DMA device 2025-11-15 00:20:12 +01:00
rockchip_drm_drv.h drm/rockchip: Add RK3588 DPTX output support 2025-08-28 15:49:51 +03:00
rockchip_drm_fb.c drm/gem/afbc: Eliminate redundant drm_get_format_info() 2025-07-16 20:06:22 +03:00
rockchip_drm_fb.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00
rockchip_drm_gem.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
rockchip_drm_gem.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00
rockchip_drm_vop.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
rockchip_drm_vop.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00
rockchip_drm_vop2.c drm/rockchip: vop2: Check bpc before switching DCLK source 2025-11-14 23:10:33 +01:00
rockchip_drm_vop2.h drm/rockchip: vop2: switch to FIELD_PREP_WM16 macro 2025-09-02 20:06:47 -04:00
rockchip_lvds.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
rockchip_lvds.h drm/rockchip: lvds: switch to FIELD_PREP_WM16 macro 2025-09-02 20:06:46 -04:00
rockchip_rgb.c drm: include drm_print.h where needed 2025-10-31 10:34:52 +02:00
rockchip_rgb.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00
rockchip_vop2_reg.c drm/rockchip: vop2: Use OVL_LAYER_SEL configuration instead of use win_mask calculate used layers 2025-11-15 00:36:09 +01:00
rockchip_vop_reg.c drm/rockchip: vop: add lut_size for RK3368 vop_data 2025-10-14 14:12:23 +02:00
rockchip_vop_reg.h drm/rockchip: Fix Copyright description 2024-12-14 23:52:49 +01:00