From: Xela <git@xela.zone>
To: dri-devel@lists.freedesktop.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Jani Nikula <jani.nikula@intel.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
linux-kernel@vger.kernel.org, Xela <git@xela.zone>
Subject: [PATCH] drm/edid: Add HDR Static Metadata Type 1 quirk for LG UltraGear
Date: Sun, 23 Aug 2026 20:02:09 -0800 [thread overview]
Message-ID: <20260824040209.22517-1-git@xela.zone> (raw)
The LG UltraGear monitor (PNP ID GSM 0x7766) advertises HDR support in
its CTA-861 Extension block with SMPTE ST 2084 (PQ) EOTF support
(byte 0x9e = 0x05) and valid desired content luminance descriptors
(351 cd/m^2 max CLL/FALL at bytes 0xa0-0xa2).
However, due to a factory firmware bug, the HDR Static Metadata Data
Block descriptor byte (byte 0x9f) is reported as 0x00 instead of 0x01,
omitting the Static Metadata Type 1 capability bit (bit 0).
Because of this omitted bit, drm_parse_hdr_metadata_block() sets
metadata_type to 0. Consequently, drm_calculate_luminance_range()
rejects the block, and userspace attempts to perform atomic KMS commits
configuring HDR output metadata fail with -EINVAL (Error 22), preventing
compositors (Plasma, Gamescope, MPV) from engaging HDR on this display.
Introduce EDID_QUIRK_FORCE_HDR_STATIC_METADATA_TYPE1 to force the Static
Metadata Type 1 descriptor bit for displays with this defective EDID block,
and register the LG UltraGear (GSM 0x7766) in the EDID quirk table.
Signed-off-by: Xela <git@xela.zone>
---
drivers/gpu/drm/drm_edid.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 07970e5b5..dd279fad1 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,
+ /* Force Static Metadata Type 1 for HDR Static Metadata Data Block */
+ EDID_QUIRK_FORCE_HDR_STATIC_METADATA_TYPE1,
};
#define MICROSOFT_IEEE_OUI 0xca125c
@@ -195,6 +197,9 @@ static const struct edid_quirk {
/* LG 27GN950 */
EDID_QUIRK('G', 'S', 'M', 0x5b9a, BIT(EDID_QUIRK_CAP_DSC_15BPP)),
+ /* LG UltraGear (GSM 0x7766) */
+ EDID_QUIRK('G', 'S', 'M', 0x7766, BIT(EDID_QUIRK_FORCE_HDR_STATIC_METADATA_TYPE1)),
+
/* LGD panel of HP zBook 17 G2, eDP 10 bpc, but reports unknown bpc */
EDID_QUIRK('L', 'G', 'D', 764, BIT(EDID_QUIRK_FORCE_10BPC)),
@@ -5498,6 +5503,10 @@ drm_parse_hdr_metadata_block(struct drm_connector *connector, const u8 *db)
hdr_metadata->eotf = eotf_supported(db);
hdr_metadata->metadata_type = hdr_metadata_type(db);
+ if (drm_edid_has_internal_quirk(connector,
+ EDID_QUIRK_FORCE_HDR_STATIC_METADATA_TYPE1))
+ hdr_metadata->metadata_type |= BIT(HDMI_STATIC_METADATA_TYPE1);
+
if (len >= 4)
hdr_metadata->max_cll = db[4];
if (len >= 5)
--
2.54.0
reply other threads:[~2026-08-24 4:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260824040209.22517-1-git@xela.zone \
--to=git@xela.zone \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox