[J] [PATCH 10/10] UBUNTU: SAUCE: drm/i915/display/psr: Reinstate fix for TGL + AUO panel flicker
Kai-Heng Feng
kai.heng.feng at canonical.com
Tue Aug 2 02:29:55 UTC 2022
BugLink: https://bugs.launchpad.net/bugs/1983297
Enabling PSR2 selective fetch regressed ADL + BOE panel [1], so it's
more plausible to only enable the feature on TGL + specific AUO panel.
However, commits from upstream stable make the quirk [2] stop working,
so this time full fix for PSR2 selective fetch is backported.
5.17+ kernels don't have this issue, only Jammy 5.15 and OEM 5.14 need
this quirk to be applied.
[1] https://bugs.launchpad.net/bugs/1979626
[2] https://bugs.launchpad.net/bugs/1980087
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
drivers/gpu/drm/i915/display/intel_dp.h | 2 ++
drivers/gpu/drm/i915/display/intel_psr.c | 12 ++++++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 45ce9846ab973..4df6234bb083f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -4012,7 +4012,7 @@ bool intel_digital_port_connected(struct intel_encoder *encoder)
return is_connected;
}
-static struct edid *
+struct edid *
intel_dp_get_edid(struct intel_dp *intel_dp)
{
struct intel_connector *intel_connector = intel_dp->attached_connector;
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 3dd6ebc2f6b14..de5f59785a75e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -96,6 +96,8 @@ void intel_read_dp_sdp(struct intel_encoder *encoder,
unsigned int type);
bool intel_digital_port_connected(struct intel_encoder *encoder);
+struct edid *intel_dp_get_edid(struct intel_dp *intel_dp);
+
static inline unsigned int intel_dp_unused_lane_mask(int lane_count)
{
return ~((1 << lane_count) - 1) & 0xf;
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 2cedb7e88a176..e962a3ccbb035 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -719,6 +719,18 @@ static bool intel_psr2_sel_fetch_config_valid(struct intel_dp *intel_dp,
struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
+ struct edid *edid;
+ int i;
+
+ edid = intel_dp_get_edid(intel_dp);
+
+ if (edid->mfg_id[0] == 0x06 && edid->mfg_id[1] == 0xaf &&
+ edid->prod_code[0] == 0x8c && edid->prod_code[1] == 0xcd &&
+ IS_TIGERLAKE(dev_priv)) {
+ drm_info_once(&dev_priv->drm,
+ "PSR2 sel fetch enabled for TGL + AUO panel\n");
+ return crtc_state->enable_psr2_sel_fetch = true;
+ }
if (!dev_priv->params.enable_psr2_sel_fetch &&
intel_dp->psr.debug != I915_PSR_DEBUG_ENABLE_SEL_FETCH) {
--
2.36.1
More information about the kernel-team
mailing list