aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.14/950-0203-drm-vc4-Skip-ULPS-latching-when-we-re-in-that-ULPS-s.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-4.14/950-0203-drm-vc4-Skip-ULPS-latching-when-we-re-in-that-ULPS-s.patch')
-rw-r--r--target/linux/brcm2708/patches-4.14/950-0203-drm-vc4-Skip-ULPS-latching-when-we-re-in-that-ULPS-s.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.14/950-0203-drm-vc4-Skip-ULPS-latching-when-we-re-in-that-ULPS-s.patch b/target/linux/brcm2708/patches-4.14/950-0203-drm-vc4-Skip-ULPS-latching-when-we-re-in-that-ULPS-s.patch
new file mode 100644
index 0000000000..b01062c1b2
--- /dev/null
+++ b/target/linux/brcm2708/patches-4.14/950-0203-drm-vc4-Skip-ULPS-latching-when-we-re-in-that-ULPS-s.patch
@@ -0,0 +1,28 @@
+From c86b5da9e8c4ca0fedd6cdbfc70cdc5f61b5d711 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@anholt.net>
+Date: Tue, 31 Oct 2017 11:33:10 -0700
+Subject: [PATCH 203/454] 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>
+---
+ drivers/gpu/drm/vc4/vc4_dsi.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- 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->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);