Skip to content

Commit bec6d72

Browse files
Aradhya BhatiaSasha Levin
authored andcommitted
drm/bridge: cdns-dsi: Fix phy de-init and flag it so
commit fd2611c upstream. The driver code doesn't have a Phy de-initialization path as yet, and so it does not clear the phy_initialized flag while suspending. This is a problem because after resume the driver looks at this flag to determine if a Phy re-initialization is required or not. It is in fact required because the hardware is resuming from a suspend, but the driver does not carry out any re-initialization causing the D-Phy to not work at all. Call the counterparts of phy_init() and phy_power_on(), that are phy_exit() and phy_power_off(), from _bridge_post_disable(), and clear the flags so that the Phy can be initialized again when required. Fixes: fced5a3 ("drm/bridge: cdns: Convert to phy framework") Cc: [email protected] Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Tested-by: Tomi Valkeinen <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Signed-off-by: Aradhya Bhatia <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5d2ee12 commit bec6d72

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/bridge/cdns-dsi.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,11 @@ static void cdns_dsi_bridge_post_disable(struct drm_bridge *bridge)
718718
struct cdns_dsi_input *input = bridge_to_cdns_dsi_input(bridge);
719719
struct cdns_dsi *dsi = input_to_dsi(input);
720720

721+
dsi->phy_initialized = false;
722+
dsi->link_initialized = false;
723+
phy_power_off(dsi->dphy);
724+
phy_exit(dsi->dphy);
725+
721726
pm_runtime_put(dsi->base.dev);
722727
}
723728

@@ -1187,7 +1192,6 @@ static int __maybe_unused cdns_dsi_suspend(struct device *dev)
11871192
clk_disable_unprepare(dsi->dsi_sys_clk);
11881193
clk_disable_unprepare(dsi->dsi_p_clk);
11891194
reset_control_assert(dsi->dsi_p_rst);
1190-
dsi->link_initialized = false;
11911195
return 0;
11921196
}
11931197

0 commit comments

Comments
 (0)