All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix 144hz display mode missing on MSI MAG273R
@ 2026-07-23 22:03 Michał Szolc
  2026-07-23 22:03 ` [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk Michał Szolc
  2026-07-23 22:04 ` [PATCH 2/2] drm: mark MSI MAG273R with the " Michał Szolc
  0 siblings, 2 replies; 4+ messages in thread
From: Michał Szolc @ 2026-07-23 22:03 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: dri-devel, linux-kernel

Hi,

This set of two patches works around a incorrect EDID table presnet on
my MSI MAG273R display. Because of how the table marks the mode as stereo,
even though it's definetly not, a otherwise completely valid 1920x1080 144hz
mode gets rejected as unsupported. This adds a new EDID quirk flag and marks
this display with it, which resolves the issue and makes the mode available
which matches other operating systems.

Best regards,
Michał Szolc

Michał Szolc (2):
  drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk
  drm: mark MSI MAG273R with the EDID_QUIRK_IGNORE_STEREO_FLAG quirk

 drivers/gpu/drm/drm_edid.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk
  2026-07-23 22:03 [PATCH 0/2] Fix 144hz display mode missing on MSI MAG273R Michał Szolc
@ 2026-07-23 22:03 ` Michał Szolc
  2026-07-23 22:33   ` sashiko-bot
  2026-07-23 22:04 ` [PATCH 2/2] drm: mark MSI MAG273R with the " Michał Szolc
  1 sibling, 1 reply; 4+ messages in thread
From: Michał Szolc @ 2026-07-23 22:03 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: dri-devel, linux-kernel

This quirk is meant for screens with EDID tables that misrepresent
certain modes as stereo which causes them to be incorrectly ignored.

Signed-off-by: Michał Szolc <undefine@undefine.pl>
---
 drivers/gpu/drm/drm_edid.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index df3c25bac761..774530b081d2 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -96,6 +96,8 @@ enum drm_edid_internal_quirk {
 	EDID_QUIRK_NON_DESKTOP,
 	/* Cap the DSC target bitrate to 15bpp */
 	EDID_QUIRK_CAP_DSC_15BPP,
+	/* Ignore stereo flag of modes */
+	EDID_QUIRK_IGNORE_STEREO_FLAG,
 };
 
 #define MICROSOFT_IEEE_OUI	0xca125c
@@ -3538,7 +3540,8 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_connector *connecto
 	if (hactive < 64 || vactive < 64)
 		return NULL;
 
-	if (pt->misc & DRM_EDID_PT_STEREO) {
+	if (pt->misc & DRM_EDID_PT_STEREO &&
+		!drm_edid_has_internal_quirk(connector, EDID_QUIRK_IGNORE_STEREO_FLAG)) {
 		drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Stereo mode not supported\n",
 			    connector->base.id, connector->name);
 		return NULL;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm: mark MSI MAG273R with the EDID_QUIRK_IGNORE_STEREO_FLAG quirk
  2026-07-23 22:03 [PATCH 0/2] Fix 144hz display mode missing on MSI MAG273R Michał Szolc
  2026-07-23 22:03 ` [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk Michał Szolc
@ 2026-07-23 22:04 ` Michał Szolc
  1 sibling, 0 replies; 4+ messages in thread
From: Michał Szolc @ 2026-07-23 22:04 UTC (permalink / raw)
  To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter
  Cc: dri-devel, linux-kernel

This monitor incorrectly marks it's 1920x1080 144hz mode as stereo,
which makes 144hz unavailable. Adding this quirk makes the EDID parser
accept that mode which makes 144hz work as intended.

Signed-off-by: Michał Szolc <undefine@undefine.pl>
---
 drivers/gpu/drm/drm_edid.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 774530b081d2..54116a14053a 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -278,6 +278,9 @@ static const struct edid_quirk {
 	/* LQ116M1JW10 displays noise when 8 bpc, but display fine as 6 bpc */
 	EDID_QUIRK('S', 'H', 'P', 0x154c, BIT(EDID_QUIRK_FORCE_6BPC)),
 
+	/* MSI MAG273R reports mode as stereo even though it's usable as 2D */
+	EDID_QUIRK('M', 'S', 'I', 15542, BIT(EDID_QUIRK_IGNORE_STEREO_FLAG)),
+
 	/*
 	 * @drm_edid_internal_quirk entries end here, following with the
 	 * @drm_edid_quirk entries.
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk
  2026-07-23 22:03 ` [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk Michał Szolc
@ 2026-07-23 22:33   ` sashiko-bot
  0 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-07-23 22:33 UTC (permalink / raw)
  To: Michał Szolc; +Cc: dri-devel

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly introduced `EDID_QUIRK_IGNORE_STEREO_FLAG` quirk is never assigned to any panel in the `edid_quirk_list`, making the added logic dead code.
--

--- Patch [1]: [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk ---
commit c12c9b1e2a3442319892a911d6fc20a3c6916841
Author: Michał Szolc <undefine@undefine.pl>

drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk
    
This commit introduces a new EDID quirk meant to ignore the stereo flag
for screens that misrepresent certain modes.

> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 07970e5b5f65e..4720217f99bff 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -96,6 +96,8 @@ enum drm_edid_internal_quirk {
>  	EDID_QUIRK_NON_DESKTOP,
>  	/* Cap the DSC target bitrate to 15bpp */
>  	EDID_QUIRK_CAP_DSC_15BPP,
> +	/* Ignore stereo flag of modes */
> +	EDID_QUIRK_IGNORE_STEREO_FLAG,
>  };
>  
>  #define MICROSOFT_IEEE_OUI	0xca125c

[ ... ]

> @@ -3538,7 +3540,8 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_connector *connecto
>  	if (hactive < 64 || vactive < 64)
>  		return NULL;
>  
> -	if (pt->misc & DRM_EDID_PT_STEREO) {
> +	if (pt->misc & DRM_EDID_PT_STEREO &&
> +		!drm_edid_has_internal_quirk(connector, EDID_QUIRK_IGNORE_STEREO_FLAG)) {

[Severity: Medium]
Is this new quirk missing an entry in the edid_quirk_list[] array?

Because the quirk is internal to drm_edid.c and isn't currently mapped to any 
specific vendor or product IDs in edid_quirk_list[], the call to 
drm_edid_has_internal_quirk() will unconditionally evaluate to false. This makes
the newly introduced logic unreachable.

Should a specific display panel be added to edid_quirk_list[] in this patch to
utilize the fix?

>  		drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Stereo mode not supported\n",
>  			    connector->base.id, connector->name);
>  		return NULL;

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260723220400.17190-1-undefine@undefine.pl?part=1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-23 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 22:03 [PATCH 0/2] Fix 144hz display mode missing on MSI MAG273R Michał Szolc
2026-07-23 22:03 ` [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk Michał Szolc
2026-07-23 22:33   ` sashiko-bot
2026-07-23 22:04 ` [PATCH 2/2] drm: mark MSI MAG273R with the " Michał Szolc

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.