drm/rockchip: vop2: fix some plane may be lost

If dts assigned esmart1-win0 as vp1 primary plane but vp1 is disabled,
the esmart1-win0 plane may be lost.

Fixes: 1568e5614d ("drm/rockchip: vop2: not to register crtc for inactive video port")
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I13675bd0695c342bceccba224ff64a2e5dc1f9e0
This commit is contained in:
Sandy Huang
2024-06-03 14:32:34 +08:00
committed by Tao Huang
parent a63bd899a8
commit 709a9da20e

View File

@@ -13157,8 +13157,10 @@ static int vop2_create_crtc(struct vop2 *vop2, uint8_t enabled_vp_mask)
/*
* make sure that the vp to be registered has at least one connector.
*/
if (!(enabled_vp_mask & BIT(vp->id)))
if (!(enabled_vp_mask & BIT(vp->id))) {
vop2->vps[vp->id].primary_plane_phy_id = ROCKCHIP_VOP2_PHY_ID_INVALID;
continue;
}
/*
* we assume a vp with a zero plane_mask(set from dts or bootloader)