mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
drm/rockchip: vop2: adjust dp attached vp dclk parent fro rk3576/rk3588
For RK3588, if DP attached vp dclk parent is from v0pll, current vp dclk no need to use hdmi phy pll; For RK3576, if DP attached vp dclk parent is from vpll, current vp dclk no need to use hdmi phy pll; Signed-off-by: Sandy Huang <hjc@rock-chips.com> Change-Id: If32d12df0df028cda48c7d0a5fd4e5513ec11265
This commit is contained in:
@@ -4606,7 +4606,25 @@ static int vop2_clk_set_parent_extend(struct vop2_video_port *vp,
|
||||
|
||||
hdmi1_phy_pll->vp_mask |= BIT(vp->id);
|
||||
} else if (output_if_is_dp(vcstate->output_if)) {
|
||||
if (vp->id == 2) {
|
||||
struct clk_hw *hw;
|
||||
struct clk_hw *p_hw;
|
||||
const char *name;
|
||||
|
||||
hw = __clk_get_hw(vp->dclk_parent);
|
||||
if (!hw)
|
||||
return -EINVAL;
|
||||
p_hw = clk_hw_get_parent(hw);
|
||||
if (!p_hw)
|
||||
return -EINVAL;
|
||||
name = clk_hw_get_name(p_hw);
|
||||
/*
|
||||
* For RK3588, if DP attached vp dclk parent is from v0pll, current vp
|
||||
* no need to use hdmi phy pll;
|
||||
* For RK3576, if DP attached vp dclk parent is from vpll, current vp
|
||||
* no need to use hdmi phy pll;
|
||||
*/
|
||||
if ((vop2->version == VOP_VERSION_RK3576 && !strcmp(name, "vpll")) ||
|
||||
(vop2->version == VOP_VERSION_RK3588 && !strcmp(name, "v0pll"))) {
|
||||
vop2_clk_set_parent(vp->dclk, vp->dclk_parent);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user