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 <hero.huang@rock-chips.com>
This commit is contained in:
Guochun Huang
2024-06-03 15:41:43 +08:00
committed by Tao Huang
parent c8094ce9fd
commit e50eabf923

View File

@@ -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);