[PATCH v2] drm/bridge: analogix_dp: Keep PHY powered between driver bind/unbind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch f0a8b49c03d2 ("drm/bridge: analogix dp: Fix runtime PM state on
driver bind") fixed unbalanced call to phy_power_on() in analogix_dp_bind()
function by calling phy_power_off() at the end of bind operation.

However it turned out that having PHY powered is required for proper DRM
display pipeline initialization on Peach-Pit Chromebook2 board, as this
board freezes otherwise when PHY power off is called in bind. Fix this by
keeping PHY powered for the whole bind/unbind driver life cycle. The
freeze is probably related to the fact that the display pipeline (Exynos
FIMD CTRC -> Exynos/Analogix DP bridge -> PS8625 dp2lvds bridge -> B116XW03
panel) is already configured and enabled by the bootloader and requires
reset of all components for proper shutdown.

Having PHY powered is also needed for proper EDID handling, which has been
fixed by commit 510353a63796 ("drm/bridge: analogix dp: Fix runtime PM state
in get_modes() callback").

Fixes: f0a8b49c03d2 ("drm/bridge: analogix dp: Fix runtime PM state on driver bind")
Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
---
Changelog:
v2:
- added comment in the code about Chromebook2 Peach-PIT issue
---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
index a8905049b9da..5b6c04c44f01 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
@@ -1419,8 +1419,11 @@ int analogix_dp_bind(struct device *dev, struct drm_device *drm_dev,
 		goto err_disable_pm_runtime;
 	}
 
-	phy_power_off(dp->phy);
 	pm_runtime_put(dev);
+	/*
+	 * intentionally keep PHY powered on, Chromebook2 Peach-PIT board
+	 * freezes otherwise
+	 */
 
 	return 0;
 
@@ -1452,6 +1455,7 @@ void analogix_dp_unbind(struct device *dev, struct device *master,
 
 	drm_dp_aux_unregister(&dp->aux);
 	pm_runtime_disable(dev);
+	phy_power_off(dp->phy);
 	clk_disable_unprepare(dp->clock);
 }
 EXPORT_SYMBOL_GPL(analogix_dp_unbind);
-- 
2.15.0

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux