Skip to content

Commit

Permalink
drm/vc4: Skip ULPS latching when we're in that ULPS state already.
Browse files Browse the repository at this point in the history
It seems that trying to go from unlatched to unlatched will time out
waiting for STOP, and we can just skip that.

Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
anholt committed Nov 21, 2017
1 parent 05dcc2a commit 8e3f6ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/vc4/vc4_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,11 @@ static void vc4_dsi_ulps(struct vc4_dsi *dsi, bool ulps)
(dsi->lanes > 2 ? DSI1_STAT_PHY_D2_STOP : 0) |
(dsi->lanes > 3 ? DSI1_STAT_PHY_D3_STOP : 0));
int ret;
bool ulps_currently_enabled = (DSI_PORT_READ(PHY_AFEC0) &
DSI_PORT_BIT(PHY_AFEC0_LATCH_ULPS));

if (ulps == ulps_currently_enabled)
return;

DSI_PORT_WRITE(STAT, stat_ulps);
DSI_PORT_WRITE(PHYC, DSI_PORT_READ(PHYC) | phyc_ulps);
Expand Down

0 comments on commit 8e3f6ce

Please sign in to comment.