Skip to contentSkip to conversation

Fix 144hz display mode missing on MSI MAG273R

PATCH New Michał Szolc 2 participants 4 messages Jul 23

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

cover Fix 144hz display mode missing on MSI MAG273R

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(-)
Signature · 1 line
2.55.0
#1 lore raw

PATCH 1/2 drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk

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

---
 drivers/gpu/drm/drm_edid.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_edid.c +4 -1
index df3c25bac761..774530b081d2 100644
@@ -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;
Signature · 1 line
2.55.0
#2 lore raw

Re: [PATCH 1/2] drm: add a EDID_QUIRK_IGNORE_STEREO_FLAG quirk

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…

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 <[email protected]>

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.

Quoted 13 lines
drivers/gpu/drm/drm_edid.c +2 -0
index 07970e5b5f65e..4720217f99bff 100644
@@ -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

[ ... ]

drivers/gpu/drm/drm_edid.c static struct drm_display_mode *drm_mode_detailed(struct drm_connector *connecto · line 3544

Quoted 7 lines
drivers/gpu/drm/drm_edid.c +2 -1
@@ -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?

Quoted 3 lines
drivers/gpu/drm/drm_edid.c +0 -0
 		drm_dbg_kms(dev, "[CONNECTOR:%d:%s] Stereo mode not supported\n",
 			    connector->base.id, connector->name);
 		return NULL;
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH 2/2 drm: mark MSI MAG273R with the EDID_QUIRK_IGNORE_STEREO_FLAG quirk

In reply to Michał Szolc

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.

---
 drivers/gpu/drm/drm_edid.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_edid.c +3 -0
index 774530b081d2..54116a14053a 100644
@@ -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.
Signature · 1 line
2.55.0