mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/bridge: analogix_dp: Fix unbalanced phy_power_on
Change-Id: I25b6967f651e2eab9a10029f4b241b8ed8d50b59 Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
@@ -853,10 +853,14 @@ static int analogix_dp_loader_protect(struct drm_connector *connector, bool on)
|
||||
|
||||
if (dp->plat_data->panel)
|
||||
drm_panel_loader_protect(dp->plat_data->panel, on);
|
||||
if (on)
|
||||
|
||||
if (on) {
|
||||
pm_runtime_get_sync(dp->dev);
|
||||
else
|
||||
phy_power_on(dp->phy);
|
||||
} else {
|
||||
phy_power_off(dp->phy);
|
||||
pm_runtime_put(dp->dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1197,7 +1201,7 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
|
||||
|
||||
dp->phy = devm_phy_get(dp->dev, "dp");
|
||||
if (IS_ERR(dp->phy)) {
|
||||
dev_err(dp->dev, "no DP phy configured\n");
|
||||
dev_dbg(dp->dev, "no DP phy configured\n");
|
||||
ret = PTR_ERR(dp->phy);
|
||||
if (ret) {
|
||||
/*
|
||||
@@ -1259,8 +1263,6 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
phy_power_on(dp->phy);
|
||||
|
||||
if (dp->plat_data->panel) {
|
||||
if (drm_panel_prepare(dp->plat_data->panel)) {
|
||||
DRM_ERROR("failed to setup the panel\n");
|
||||
|
||||
Reference in New Issue
Block a user