From a8677e8afa08a4a3b2f1b6e8b4e395da009b7d33 Mon Sep 17 00:00:00 2001 From: Damon Ding Date: Fri, 7 Feb 2025 17:19:14 +0800 Subject: [PATCH] drm/rockchip: vop2: remove the plane number check in vop2_plane_mask_check() The &vop2_data.nr_layers represents the max number of planes that can be assigned to one VP. Therefore, when checking the max plane number for VOP2, it may be incorrect to use the &vop2_data.nr_layers. And the comparison of assigned plane_mask with &vop2_data.plane_mask_base can already confirm whether every plane has been assigned to one of all the VPs. Fixes: 00424a589d3d ("drm/rockchip: vop2: add support to assign plane mask by default") Change-Id: I9c2056dea42897150ef155c7e6fd0ad3a43c8132 Signed-off-by: Damon Ding --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c index c43324c2bd3b..19e0ad4bbc7e 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -14927,8 +14927,7 @@ static bool vop2_plane_mask_check(struct vop2 *vop2) plane_mask |= vop2->vps[i].plane_mask; } - if (hweight32(plane_mask) != vop2_data->nr_layers || - plane_mask != vop2_data->plane_mask_base) { + if (plane_mask != vop2_data->plane_mask_base) { full_plane = vop2_plane_mask_to_string(vop2_data->plane_mask_base); current_plane = vop2_plane_mask_to_string(plane_mask); DRM_WARN("all windows should be assigned, full plane mask: %s[0x%x], current plane mask: %s[0x%x]\n",