drm/rockchip: vop2: print the correct vp id

Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: Ic3728c72715ab6ab5cab0fd8acf20d754feab51a
This commit is contained in:
Zhang Yubing
2022-06-16 10:08:26 +08:00
parent 33df088602
commit befdf06c03

View File

@@ -3538,6 +3538,10 @@ static int vop2_extend_clk_switch_pll(struct vop2 *vop2, struct vop2_extend_pll
return 0;
}
static inline int vop2_extend_clk_get_vp_id(struct vop2_extend_pll *ext_pll)
{
return ffs(ext_pll->vp_mask) - 1;
}
/*
* Here are 2 hdmi phy pll can use for video port dclk. The strategies of how to use hdmi phy pll
@@ -3598,13 +3602,13 @@ static int vop2_clk_set_parent_extend(struct vop2_video_port *vp,
(vcstate->output_if & VOP_OUTPUT_IF_HDMI1)) {
if (hdmi0_phy_pll->vp_mask) {
DRM_ERROR("hdmi0 phy pll is used by vp%d\n",
hdmi0_phy_pll->vp_mask);
vop2_extend_clk_get_vp_id(hdmi0_phy_pll));
return -EBUSY;
}
if (hdmi1_phy_pll->vp_mask) {
DRM_ERROR("hdmi1 phy pll is used by vp%d\n",
hdmi1_phy_pll->vp_mask);
vop2_extend_clk_get_vp_id(hdmi1_phy_pll));
return -EBUSY;
}
@@ -3621,8 +3625,8 @@ static int vop2_clk_set_parent_extend(struct vop2_video_port *vp,
if (hdmi1_phy_pll) {
if (hdmi1_phy_pll->vp_mask) {
DRM_ERROR("hdmi0: phy pll is used by vp%d:vp%d\n",
hdmi0_phy_pll->vp_mask,
hdmi1_phy_pll->vp_mask);
vop2_extend_clk_get_vp_id(hdmi0_phy_pll),
vop2_extend_clk_get_vp_id(hdmi1_phy_pll));
return -EBUSY;
}
@@ -3630,7 +3634,7 @@ static int vop2_clk_set_parent_extend(struct vop2_video_port *vp,
hdmi1_phy_pll);
} else {
DRM_ERROR("hdmi0: phy pll is used by vp%d\n",
hdmi0_phy_pll->vp_mask);
vop2_extend_clk_get_vp_id(hdmi0_phy_pll));
return -EBUSY;
}
}
@@ -3647,8 +3651,8 @@ static int vop2_clk_set_parent_extend(struct vop2_video_port *vp,
if (hdmi0_phy_pll) {
if (hdmi0_phy_pll->vp_mask) {
DRM_ERROR("hdmi1: phy pll is used by vp%d:vp%d\n",
hdmi0_phy_pll->vp_mask,
hdmi1_phy_pll->vp_mask);
vop2_extend_clk_get_vp_id(hdmi0_phy_pll),
vop2_extend_clk_get_vp_id(hdmi1_phy_pll));
return -EBUSY;
}
@@ -3656,7 +3660,7 @@ static int vop2_clk_set_parent_extend(struct vop2_video_port *vp,
hdmi0_phy_pll);
} else {
DRM_ERROR("hdmi1: phy pll is used by vp%d\n",
hdmi1_phy_pll->vp_mask);
vop2_extend_clk_get_vp_id(hdmi1_phy_pll));
return -EBUSY;
}
}