Merge branch 'for-6.9/amd-sfh' into for-linus
[sfrench/cifs-2.6.git] / drivers / gpu / drm / i915 / display / intel_psr.c
index 8f702c3fc62d483e6ba92d4d02537576975441ae..57bbf3e3af92fbb0325d0c41765f7a0f0d0ac806 100644 (file)
@@ -1525,8 +1525,18 @@ static void intel_psr_enable_source(struct intel_dp *intel_dp,
         * can rely on frontbuffer tracking.
         */
        mask = EDP_PSR_DEBUG_MASK_MEMUP |
-              EDP_PSR_DEBUG_MASK_HPD |
-              EDP_PSR_DEBUG_MASK_LPSP;
+              EDP_PSR_DEBUG_MASK_HPD;
+
+       /*
+        * For some unknown reason on HSW non-ULT (or at least on
+        * Dell Latitude E6540) external displays start to flicker
+        * when PSR is enabled on the eDP. SR/PC6 residency is much
+        * higher than should be possible with an external display.
+        * As a workaround leave LPSP unmasked to prevent PSR entry
+        * when external displays are active.
+        */
+       if (DISPLAY_VER(dev_priv) >= 8 || IS_HASWELL_ULT(dev_priv))
+               mask |= EDP_PSR_DEBUG_MASK_LPSP;
 
        if (DISPLAY_VER(dev_priv) < 20)
                mask |= EDP_PSR_DEBUG_MASK_MAX_SLEEP;