Skip to content

Commit 5a84f5f

Browse files
committed
drm/vc4: dsi: Don't reset the host until post_disable
Some DSI peripheral drivers wish to send commands in the post_disable or panel unprepare callback. These are called after the DSI host's disable call, but before the host's post_disable if pre_enable_prev_first is set. Don't reset the block until post_disable to allow these commands to be sent. Signed-off-by: Dave Stevenson <[email protected]>
1 parent c4d229c commit 5a84f5f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Diff for: drivers/gpu/drm/vc4/vc4_dsi.c

+7-8
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,13 @@ static void vc4_dsi_bridge_disable(struct drm_bridge *bridge,
818818
disp0_ctrl = DSI_PORT_READ(DISP0_CTRL);
819819
disp0_ctrl &= ~DSI_DISP0_ENABLE;
820820
DSI_PORT_WRITE(DISP0_CTRL, disp0_ctrl);
821+
}
822+
823+
static void vc4_dsi_bridge_post_disable(struct drm_bridge *bridge,
824+
struct drm_bridge_state *state)
825+
{
826+
struct vc4_dsi *dsi = bridge_to_vc4_dsi(bridge);
827+
struct device *dev = &dsi->pdev->dev;
821828

822829
/* Reset the DSI and all its fifos. */
823830
DSI_PORT_WRITE(CTRL, DSI_CTRL_SOFT_RESET_CFG |
@@ -828,14 +835,6 @@ static void vc4_dsi_bridge_disable(struct drm_bridge *bridge,
828835
DSI_PORT_BIT(PHY_AFEC0_PD) |
829836
DSI_PORT_BIT(AFEC0_PD_ALL_LANES));
830837

831-
}
832-
833-
static void vc4_dsi_bridge_post_disable(struct drm_bridge *bridge,
834-
struct drm_bridge_state *state)
835-
{
836-
struct vc4_dsi *dsi = bridge_to_vc4_dsi(bridge);
837-
struct device *dev = &dsi->pdev->dev;
838-
839838
clk_disable_unprepare(dsi->pll_phy_clock);
840839
clk_disable_unprepare(dsi->escape_clock);
841840
clk_disable_unprepare(dsi->pixel_clock);

0 commit comments

Comments
 (0)