drm/rockchip: vop2: Support invalid phy id for vop2_plane_id_to_string

ROCKCHIP_VOP2_PHY_ID_INVALID has a value of -1 that is out of range
for vop2_layer_name_list. Convert it to "INVALID".

Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
Change-Id: I0aaa36c5a51ef0227847567ca1b495d16470ee1b
This commit is contained in:
Chaoyi Chen
2024-06-21 15:09:50 +08:00
committed by Tao Huang
parent 233f1cf947
commit 34c17d0724

View File

@@ -13828,6 +13828,9 @@ static char *vop2_plane_mask_to_string(unsigned long mask)
static inline const char *vop2_plane_id_to_string(unsigned long phy)
{
if (phy == ROCKCHIP_VOP2_PHY_ID_INVALID)
return "INVALID";
if (WARN_ON(phy >= ARRAY_SIZE(vop2_layer_name_list)))
return NULL;