aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_dsi.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2017-10-31 15:32:57 -0400
committerEric Anholt <eric@anholt.net>2018-04-30 16:57:13 -0400
commit1825067e2b49c984d4b1a77f3720a7ae2576d226 (patch)
tree069bb98c31282403b009f4e286d2897ab64ebc32 /drivers/gpu/drm/vc4/vc4_dsi.c
parent5e7854bd036ec9b8d8a861def32ecbfd97ca4e77 (diff)
drm/vc4: Skip ULPS latching when we're in that ULPS state already.
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> Link: https://patchwork.freedesktop.org/patch/msgid/20171031193258.17373-1-eric@anholt.net Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_dsi.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_dsi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
index 94085f8bcd68..8aa897835118 100644
--- a/drivers/gpu/drm/vc4/vc4_dsi.c
+++ b/drivers/gpu/drm/vc4/vc4_dsi.c
@@ -753,6 +753,11 @@ static void vc4_dsi_ulps(struct vc4_dsi *dsi, bool ulps)
753 (dsi->lanes > 2 ? DSI1_STAT_PHY_D2_STOP : 0) | 753 (dsi->lanes > 2 ? DSI1_STAT_PHY_D2_STOP : 0) |
754 (dsi->lanes > 3 ? DSI1_STAT_PHY_D3_STOP : 0)); 754 (dsi->lanes > 3 ? DSI1_STAT_PHY_D3_STOP : 0));
755 int ret; 755 int ret;
756 bool ulps_currently_enabled = (DSI_PORT_READ(PHY_AFEC0) &
757 DSI_PORT_BIT(PHY_AFEC0_LATCH_ULPS));
758
759 if (ulps == ulps_currently_enabled)
760 return;
756 761
757 DSI_PORT_WRITE(STAT, stat_ulps); 762 DSI_PORT_WRITE(STAT, stat_ulps);
758 DSI_PORT_WRITE(PHYC, DSI_PORT_READ(PHYC) | phyc_ulps); 763 DSI_PORT_WRITE(PHYC, DSI_PORT_READ(PHYC) | phyc_ulps);