From 30a1c6044a183f155b2c92e166922e949d685f06 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 2 Feb 2024 03:38:12 +0000 Subject: [PATCH] drm/i915/psr: Only allow PSR in LPSP mode on HSW non-ULT From Ville Syrjala 02cfae7d62783614b433ec93b2ccf9d9fba212ff in linux-6.6.y/6.6.15 f9f031dd21a7ce13a13862fa5281d32e1029c70f in mainline linux --- sys/dev/pci/drm/i915/display/intel_psr.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/pci/drm/i915/display/intel_psr.c b/sys/dev/pci/drm/i915/display/intel_psr.c index f479589ca4c..702c6a80cad 100644 --- a/sys/dev/pci/drm/i915/display/intel_psr.c +++ b/sys/dev/pci/drm/i915/display/intel_psr.c @@ -1400,8 +1400,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; -- 2.20.1