[PATCH] drm:dw-mipi-dsi: avoid invalidating config by removing dw_mipi_dsi_set_mode

shu.sansan@163.com posted 1 patch 2 weeks, 2 days ago
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] drm:dw-mipi-dsi: avoid invalidating config by removing dw_mipi_dsi_set_mode
Posted by shu.sansan@163.com 2 weeks, 2 days ago
From: guofu wan <lizwan0412@gmail.com>

The dw_mipi_dsi_set_mode() function performs a DSI power-off operation via
dsi_write(dsi, DSI_PWR_UP, RESET), which invalidates all previously
applied configurations.

Since the original code already handles the command mode configuration
within dw_mipi_dsi_command_mode_config(), re-invoking the set_mode
function is redundant and counterproductive. Removing this call ensures
that the driver directly executes dsi_write(dsi, DSI_PWR_UP, POWERUP),
preserving the existing settings.

Signed-off-by: guofu wan <shu.sansan@163.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index 8fc2e282ff11..b02373f16bed 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -1015,8 +1015,7 @@ static void dw_mipi_dsi_mode_set(struct dw_mipi_dsi *dsi,
 
 	dw_mipi_dsi_wait_for_two_frames(adjusted_mode);
 
-	/* Switch to cmd mode for panel-bridge pre_enable & panel prepare */
-	dw_mipi_dsi_set_mode(dsi, 0);
+	dsi_write(dsi, DSI_PWR_UP, POWERUP);
 
 	if (phy_ops->power_on)
 		phy_ops->power_on(dsi->plat_data->priv_data);
-- 
2.17.1