[PATCH 1/2] Add quirk to disable PSR 2 on a per device basis
Jouni Högander
jouni.hogander at intel.com
Mon Feb 27 09:43:52 UTC 2023
From: Werner Sembach <wse at tuxedocomputers.com>
This adds the possibility to disable PSR 2 explicitly using the intel
quirk table for devices where PSR 2 is borked, but PSR 1 works fine.
Signed-off-by: Werner Sembach <wse at tuxedocomputers.com>
Cc: <stable at vger.kernel.org>
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/i915/display/intel_psr.c | 4 +++-
drivers/gpu/drm/i915/display/intel_quirks.c | 6 ++++++
drivers/gpu/drm/i915/display/intel_quirks.h | 1 +
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 6d8cf3198382..3e7bd1f56c8e 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -36,6 +36,7 @@
#include "intel_psr.h"
#include "intel_snps_phy.h"
#include "skl_universal_plane.h"
+#include "intel_quirks.h"
/**
* DOC: Panel Self Refresh (PSR/SRD)
@@ -865,7 +866,8 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
int crtc_vdisplay = crtc_state->hw.adjusted_mode.crtc_vdisplay;
int psr_max_h = 0, psr_max_v = 0, max_bpp = 0;
- if (!intel_dp->psr.sink_psr2_support)
+ if (!intel_dp->psr.sink_psr2_support ||
+ intel_has_quirk(dev_priv, QUIRK_NO_PSR2))
return false;
/* JSL and EHL only supports eDP 1.3 */
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.c b/drivers/gpu/drm/i915/display/intel_quirks.c
index a280448df771..4b3833a93a77 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.c
+++ b/drivers/gpu/drm/i915/display/intel_quirks.c
@@ -65,6 +65,12 @@ static void quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915)
drm_info(&i915->drm, "Applying no pps backlight power quirk\n");
}
+static void quirk_no_psr2(struct drm_i915_private *i915)
+{
+ intel_set_quirk(i915, QUIRK_NO_PSR2);
+ drm_info(&i915->drm, "Applying No PSR 2 quirk\n");
+}
+
struct intel_quirk {
int device;
int subsystem_vendor;
diff --git a/drivers/gpu/drm/i915/display/intel_quirks.h b/drivers/gpu/drm/i915/display/intel_quirks.h
index 10a4d163149f..2e0b788a44a1 100644
--- a/drivers/gpu/drm/i915/display/intel_quirks.h
+++ b/drivers/gpu/drm/i915/display/intel_quirks.h
@@ -17,6 +17,7 @@ enum intel_quirk_id {
QUIRK_INVERT_BRIGHTNESS,
QUIRK_LVDS_SSC_DISABLE,
QUIRK_NO_PPS_BACKLIGHT_POWER_HOOK,
+ QUIRK_NO_PSR2,
};
void intel_init_quirks(struct drm_i915_private *i915);
--
2.34.1
More information about the Intel-gfx-trybot
mailing list