mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user