@@ -4417,7 +4417,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;
@@ -97,6 +97,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;
@@ -23,6 +23,7 @@
#include <drm/drm_atomic_helper.h>
#include <drm/drm_damage_helper.h>
+#include <drm/drm_edid.h>
#include "display/intel_dp.h"
@@ -752,6 +753,24 @@ 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;
+
+ edid = intel_dp_get_edid(intel_dp);
+
+ /* The mfg:prod can be obtained from EDID byte [8-11].
+ * For instance, if the first bytes of EDID are
+ * "00 ff ff ff ff ff ff 00 4d 10 51 15 00 00 00 00",
+ * the mfg:prod is "4d 10 51 15".
+ *
+ * TODO: If the list grows more than three quirks, please make a quirk
+ * table.
+ */
+ if (edid && edid->mfg_id[0] == 0x4d && edid->mfg_id[1] == 0x10 &&
+ edid->prod_code[0] == 0x51 && edid->prod_code[1] == 0x15) {
+ drm_info_once(&dev_priv->drm,
+ "PSR2 sel fetch disabled\n");
+ return false;
+ }
if (!dev_priv->params.enable_psr2_sel_fetch &&
intel_dp->psr.debug != I915_PSR_DEBUG_ENABLE_SEL_FETCH) {
BugLink: https://bugs.launchpad.net/bugs/2007516 There's a panel on XPS 9320 flickers since PSR2 sel fetch became enabled by default on Linux kernel >= 5.16. Vendor & Product Identification: Manufacturer: SHP Model: 5457 Temporarily disable PSR2 sel fetch so the panel falls back to use PSR1 while Intel GFX devs are working on the issue [0]. [0] https://gitlab.freedesktop.org/drm/intel/-/issues/7836 Signed-off-by: Kai-Heng Feng <kai.heng.feng@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 | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-)