Fix 144hz display mode missing on MSI MAG273R
Subsystems (2)
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
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
@@ -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 *connectoif (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
[email protected]
AI reviewRe: [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@@ -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 *connectoif (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
-0drm_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
PATCH 2/2 drm: mark MSI MAG273R with the EDID_QUIRK_IGNORE_STEREO_FLAG quirk
In reply to Michał SzolcThis 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
@@ -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