From e50eabf923499b17c9cb6ddfa071d5cb4ef73d56 Mon Sep 17 00:00:00 2001 From: Guochun Huang Date: Mon, 3 Jun 2024 15:41:43 +0800 Subject: [PATCH] drm/rockchip: dsi2: set phy mode in .loader_protect helper if the mode of the PHY is not set in .loader_protect helper, when entering sleep mode for the first time bring up with display logo, the PHY will not be able to shut down completely and accurately because it does not know in which mode it is operating, resulting in some power consumption. Change-Id: If5606c24fd2a542936cdb2f1c3d4e380d6c3889a Signed-off-by: Guochun Huang --- drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c index 434a6cf03969..4945d7e420f6 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c @@ -1057,6 +1057,10 @@ dw_mipi_dsi2_encoder_atomic_check(struct drm_encoder *encoder, static void dw_mipi_dsi2_loader_protect(struct dw_mipi_dsi2 *dsi2, bool on) { + if (dsi2->dcphy) + if (!dsi2->c_option) + phy_set_mode(dsi2->dcphy, PHY_MODE_MIPI_DPHY); + if (on) { pm_runtime_get_sync(dsi2->dev); phy_init(dsi2->dcphy);