Skip to contentSkip to conversation

Add quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

PATCH In review Werner Sembach 4 participants 13 messages Feb 22, 2023 – Feb 24, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Add quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly colored pixels is flickering.

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on known buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1 barebones.

#1 lore raw

PATCH 1/2 Add quirk to disable PSR 2 on a per device basis

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.

---
 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(-)
drivers/gpu/drm/i915/display/intel_psr.c +3 -1
index 5b678916e6db5..4607f3c4cf592 100644
@@ -37,6 +37,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)
@@ -851,7 +852,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 */
drivers/gpu/drm/i915/display/intel_quirks.c +6 -0
index 6e48d3bcdfec5..ce6d0fe6448f5 100644
@@ -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;
drivers/gpu/drm/i915/display/intel_quirks.h +1 -0
index 10a4d163149fd..2e0b788a44a1e 100644
@@ -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);
Signature · 1 line
2.34.1
#2 lore raw

PATCH 2/2 Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

In reply to Werner Sembach

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly colored pixels is flickering.

PSR 1 is working fine however.

---
 drivers/gpu/drm/i915/display/intel_quirks.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/i915/display/intel_quirks.c +8 -0
index ce6d0fe6448f5..eeb32d3189f5c 100644
@@ -65,6 +65,10 @@ static void quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915)
 	drm_info(&i915->drm, "Applying no pps backlight power quirk\n");
 }
 
+/*
+ * Tongfang PHxTxX1 and PHxTQx1 devices have support for PSR 2 but it is broken
+ * on Linux. PSR 1 however works just fine.
+ */
 static void quirk_no_psr2(struct drm_i915_private *i915)
 {
 	intel_set_quirk(i915, QUIRK_NO_PSR2);
@@ -205,6 +209,10 @@ static struct intel_quirk intel_quirks[] = {
 	/* ECS Liva Q2 */
 	{ 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
 	{ 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
+
+	/* Tongfang PHxTxX1 and PHxTQx1/TUXEDO InfinityBook 14 Gen6 */
+	{ 0x9a49, 0x1d05, 0x1105, quirk_no_psr2 },
+	{ 0x9a49, 0x1d05, 0x114c, quirk_no_psr2 },
 };
 
 void intel_init_quirks(struct drm_i915_private *i915)
Signature · 1 line
2.34.1
maintainer
#3 lore raw

Re: [Intel-gfx] [PATCH 2/2] Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

Quoted 7 lines · Werner Sembach

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly colored pixels is flickering.

PSR 1 is working fine however.

I wonder if this is really about the panel's PSR2 or about the userspace there not marking the dirtyfb? I know I know... it is not userspace fault...

But I wonder if the case you got here highlights the fact that we have a substantial bug in the i915 itself in regards to PSR2 API.

Jose, Jouni, ideas on how to check what could be happening here?

oh, btw, Werner, do we have an open gilab issue for this?

Thanks,
Rodrigo.

Quoted 36 lines
---
 drivers/gpu/drm/i915/display/intel_quirks.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/gpu/drm/i915/display/intel_quirks.c +8 -0
index ce6d0fe6448f5..eeb32d3189f5c 100644
@@ -65,6 +65,10 @@ static void quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915)
 	drm_info(&i915->drm, "Applying no pps backlight power quirk\n");
 }
 
+/*
+ * Tongfang PHxTxX1 and PHxTQx1 devices have support for PSR 2 but it is broken
+ * on Linux. PSR 1 however works just fine.
+ */
 static void quirk_no_psr2(struct drm_i915_private *i915)
 {
 	intel_set_quirk(i915, QUIRK_NO_PSR2);
@@ -205,6 +209,10 @@ static struct intel_quirk intel_quirks[] = {
 	/* ECS Liva Q2 */
 	{ 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
 	{ 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
+
+	/* Tongfang PHxTxX1 and PHxTQx1/TUXEDO InfinityBook 14 Gen6 */
+	{ 0x9a49, 0x1d05, 0x1105, quirk_no_psr2 },
+	{ 0x9a49, 0x1d05, 0x114c, quirk_no_psr2 },
 };
 
 void intel_init_quirks(struct drm_i915_private *i915)
Signature · 1 line
2.34.1
#4 lore raw

Re: [Intel-gfx] [PATCH 2/2] Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

Quoted 17 lines · Rodrigo Vivi
Quoted 10 lines · Werner Sembach

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly
colored pixels is flickering.

PSR 1 is working fine however.

I wonder if this is really about the panel's PSR2 or about the userspace
there not marking the dirtyfb? I know I know... it is not userspace fault...

Quoted 5 lines

But I wonder if the case you got here highlights the fact that we have
a substantial bug in the i915 itself in regards to PSR2 API.

Jose, Jouni, ideas on how to check what could be happening here?

There is already fix for this (Thanks to Werner Sembach for testing the patch):

https://patchwork.freedesktop.org/series/114217/

Quoted 2 lines

oh, btw, Werner, do we have an  open gilab issue for this?

https://gitlab.freedesktop.org/drm/intel/-/issues/7347

Quoted 47 lines

Thanks,
Rodrigo.

Quoted 43 lines

---
 drivers/gpu/drm/i915/display/intel_quirks.c | 8 ++++++++

 1 file changed, 8 insertions(+)
drivers/gpu/drm/i915/display/intel_quirks.c +0 -0
index ce6d0fe6448f5..eeb32d3189f5c 100644
@@ -65,6 +65,10 @@ static void
 quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915)

        drm_info(&i915->drm, "Applying no pps backlight power quirk\n");
 }

+/*
+ * Tongfang PHxTxX1 and PHxTQx1 devices have support for PSR 2 but it is broken
+ * on Linux. PSR 1 however works just fine.
+ */
 static void quirk_no_psr2(struct drm_i915_private *i915) {
        intel_set_quirk(i915, QUIRK_NO_PSR2);

drivers/gpu/drm/i915/display/intel_quirks.c +0 -0
@@ -205,6 +209,10 @@ static struct intel_quirk intel_quirks[] = {
         /* ECS Liva Q2 */

        { 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
        { 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time },
+
+       /* Tongfang PHxTxX1 and PHxTQx1/TUXEDO InfinityBook 14 Gen6 */
+       { 0x9a49, 0x1d05, 0x1105, quirk_no_psr2 },
+       { 0x9a49, 0x1d05, 0x114c, quirk_no_psr2 },
 };

 void intel_init_quirks(struct drm_i915_private *i915)

Signature · 1 line
2.34.1
#5 lore raw

Re: [Intel-gfx] [PATCH 2/2] Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

Am 23.02.23 um 07:27 schrieb Hogander, Jouni:

Quoted 21 lines · Rodrigo Vivi
Quoted 20 lines · Werner Sembach
Quoted 10 lines

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly
colored pixels is flickering.

PSR 1 is working fine however.

I wonder if this is really about the panel's PSR2 or about the userspace
there not marking the dirtyfb? I know I know... it is not userspace fault...

But I wonder if the case you got here highlights the fact that we have
a substantial bug in the i915 itself in regards to PSR2 API.

Quoted 5 lines
Quoted 1 line

Jose, Jouni, ideas on how to check what could be happening here?

There is already fix for this (Thanks to Werner Sembach for testing the patch):

https://patchwork.freedesktop.org/series/114217/

Yes, thanks for creating that patch ^^

I posted this quirk patch just as an possible alternative for stable if that other patch is considered not suitable for it (lets wait and see).

And to get some feedback if something like this could be a viable workaround if similar bugs appear in the future.

Quoted 49 lines
Quoted 2 lines

oh, btw, Werner, do we have an  open gilab issue for this?

https://gitlab.freedesktop.org/drm/intel/-/issues/7347

Quoted 45 lines

Thanks,
Rodrigo.

Quoted 42 lines
---
  drivers/gpu/drm/i915/display/intel_quirks.c | 8 ++++++++
  1 file changed, 8 insertions(+)
drivers/gpu/drm/i915/display/intel_quirks.c +2 -0
index ce6d0fe6448f5..eeb32d3189f5c 100644
@@ -65,6 +65,10 @@ static void
 quirk_no_pps_backlight_power_hook(struct drm_i915_private *i915)
         drm_info(&i915->drm, "Applying no pps backlight power
 quirk\n");
  }
 
+/*
+ * Tongfang PHxTxX1 and PHxTQx1 devices have support for PSR 2 but

it is broken
+ * on Linux. PSR 1 however works just fine.
+ */
 static void quirk_no_psr2(struct drm_i915_private *i915) {
        intel_set_quirk(i915, QUIRK_NO_PSR2);

drivers/gpu/drm/i915/display/intel_quirks.c +4 -0
@@ -205,6 +209,10 @@ static struct intel_quirk intel_quirks[] = {
         /* ECS Liva Q2 */
         { 0x3185, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time
 },
         { 0x3184, 0x1019, 0xa94d, quirk_increase_ddi_disabled_time
 },
+
+       /* Tongfang PHxTxX1 and PHxTQx1/TUXEDO InfinityBook 14 Gen6
 */
+       { 0x9a49, 0x1d05, 0x1105, quirk_no_psr2 },
+       { 0x9a49, 0x1d05, 0x114c, quirk_no_psr2 },

 };

 void intel_init_quirks(struct drm_i915_private *i915)

Signature · 1 line
2.34.1
#6 lore raw

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Add quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1

In reply to Werner Sembach
== Series Details ==

== Series Details ==

Series: Add quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1
URL : https://patchwork.freedesktop.org/series/114256/
State : failure

== Summary ==

Error: patch https://patchwork.freedesktop.org/api/1.0/series/114256/revisions/1/mbox/ not applied
Applying: Add quirk to disable PSR 2 on a per device basis
Applying: Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1
error: sha1 information is lacking or useless (drivers/gpu/drm/i915/display/intel_quirks.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Apply quirk to disable PSR 2 on Tongfang PHxTxX1 and PHxTQx1 When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

#7 lore raw
In reply to Werner Sembach

Am 22.02.23 um 15:17 schrieb Werner Sembach:

Quoted 6 lines

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly colored pixels is flickering.

Quoted 9 lines

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on known buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1 barebones.

Parralel to this there is a patch fixing the root cause of this issue: https://gitlab.freedesktop.org/drm/intel/-/issues/7347#note_1785094

So this quirk might only be relevant for stable kernels, depending on when that other patch gets merged.

#8 lore raw
In reply to Werner Sembach
Quoted 9 lines · Werner Sembach

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly
colored pixels is flickering.

Quoted 6 lines

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on known
buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1 barebones.

I've been thinking something similar as there is still at least one issue which seems to be like panel side issue:

https://gitlab.freedesktop.org/drm/intel/-/issues/7836

Did you considered dpcd_quirk_list in drivers/gpu/drm/drm_dp_helper.c?

I'm not sure which one is more correct though...

Quoted 5 lines
#9 lore raw

Am 23.02.23 um 19:26 schrieb Hogander, Jouni:

Quoted 16 lines · Werner Sembach
Quoted 9 lines

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly
colored pixels is flickering.

Quoted 6 lines

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on known
buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1 barebones.

Quoted 8 lines

I've been thinking something similar as there is still at least one issue which seems to be like panel side issue:

https://gitlab.freedesktop.org/drm/intel/-/issues/7836

Did you considered dpcd_quirk_list in drivers/gpu/drm/drm_dp_helper.c?

I'm not sure which one is more correct though...

Imho, since the proper fix lies within the Intel driver the quirk should also lie within the Intel driver, because even if the panel has the same problem combined with an AMD or NVIDIA card the proper fix for them will most likely be land in the same kernel version. So there could be a period where you no longer want the quirk for devices combining the panel with an Intel gpu but still with an AMD GPU or vice versa.

Quoted 5 lines
Quoted 5 lines
#10 lore raw

Am 23.02.23 um 19:56 schrieb Werner Sembach:

Quoted 21 lines

Am 23.02.23 um 19:26 schrieb Hogander, Jouni:

Quoted 19 lines · Werner Sembach
Quoted 9 lines

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly
colored pixels is flickering.

Quoted 6 lines

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on known
buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1 barebones.

I've been thinking something similar as there is still at least one issue which seems to be like panel side issue:

Quoted 6 lines
Quoted 5 lines

https://gitlab.freedesktop.org/drm/intel/-/issues/7836

Did you considered dpcd_quirk_list in drivers/gpu/drm/drm_dp_helper.c?

I'm not sure which one is more correct though...

Imho, since the proper fix lies within the Intel driver the quirk should also lie within the Intel driver, because even if the panel has the same problem combined with an AMD or NVIDIA card the proper fix for them will most likely be land in the same kernel version. So there could be a period where you no longer want the quirk for devices combining the panel with an Intel gpu but still with an AMD GPU or vice versa.

*the proper fix for them will most likely not be in the same kernel version.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
#11 lore raw
In reply to Werner Sembach

Am 23.02.23 um 19:56 schrieb Werner Sembach:

Quoted 21 lines

Am 23.02.23 um 19:26 schrieb Hogander, Jouni:

Quoted 19 lines · Werner Sembach
Quoted 9 lines

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of randomly
colored pixels is flickering.

Quoted 6 lines

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on known
buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1 barebones.

I've been thinking something similar as there is still at least one issue which seems to be like panel side issue:

Quoted 6 lines
Quoted 5 lines

https://gitlab.freedesktop.org/drm/intel/-/issues/7836

Did you considered dpcd_quirk_list in drivers/gpu/drm/drm_dp_helper.c?

I'm not sure which one is more correct though...

Imho, since the proper fix lies within the Intel driver the quirk should also lie within the Intel driver, because even if the panel has the same problem combined with an AMD or NVIDIA card the proper fix for them will most likely be land in the same kernel version. So there could be a period where you no longer want the quirk for devices combining the panel with an Intel gpu but still with an AMD GPU or vice versa.

*the proper fix for them will most likely not be in the same kernel version.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
#12 lore raw
Quoted 45 lines · Werner Sembach

Am 23.02.23 um 19:56 schrieb Werner Sembach:

Quoted 32 lines

Am 23.02.23 um 19:26 schrieb Hogander, Jouni:

Quoted 24 lines · Werner Sembach
Quoted 11 lines

On these Barebones PSR 2 is recognized as supported but is very buggy:
- Upper third of screen does sometimes not updated, resulting in
disappearing cursors or ghosts of already closed Windows saying behind.
- Approximately 40 px from the bottom edge a 3 pixel wide strip of
randomly
colored pixels is flickering.

Quoted 8 lines

PSR 1 is working fine however.

This patchset introduces a new quirk to disable PSR 2 specifically on
known
buggy devices and applies it to the Tongfang PHxTxX1 and PHxTQx1
barebones.

I've been thinking something similar as there is still at least one
issue which seems to be like panel side issue:

Quoted 6 lines

https://gitlab.freedesktop.org/drm/intel/-/issues/7836

Did you considered dpcd_quirk_list in
drivers/gpu/drm/drm_dp_helper.c?

I'm not sure which one is more correct though...

Quoted 11 lines

Imho, since the proper fix lies within the Intel driver the quirk should also
lie within the Intel driver, because even if the panel has the same problem
combined with an AMD or NVIDIA card the proper fix for them will most likely
be land in the same kernel version. So there could be a period where you no
longer want the quirk for devices combining the panel with an Intel gpu but
still with an AMD GPU or vice versa.

Quoted 2 lines

*the proper fix for them will most likely not be in the same kernel version.

Yeah, you are right here. Let's target fixing rootcause for your setup. First patch from your set could be anyways used for issue mentioned above.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

BR,

Jouni Högander