]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
UBUNTU: SAUCE: drm/i915/display/psr: Disable PSR2 sel fetch on panel SHP 5457
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Fri, 24 Feb 2023 16:18:20 +0000 (00:18 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Thu, 9 Mar 2023 14:58:29 +0000 (15:58 +0100)
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>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp.h
drivers/gpu/drm/i915/display/intel_psr.c

index 75070eb07d4bfa97587a173b29fb25582cd00389..1e6eed6c8f0e3bcb5dbab855e7241ce5cdc83d3d 100644 (file)
@@ -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;
index a54902c713a34c6507caa3b47bf81525cb2c6c9f..b0cedd70104c8d76cb8db43da480e7f028e2bfa7 100644 (file)
@@ -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;
index 5b678916e6db598b22c501e08622b05c4c714024..5414b3426ace8b57cf081530538c0e2b62dc4227 100644 (file)
@@ -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) {