[PATCH RFC 16/25] drm/edid: Parse QMS TFR min/max flags from HDMI SCDS
Nicolas Frattaroli
nicolas.frattaroli at collabora.com
Mon Sep 21 08:51:42 PDT 2026
HDMI has two flags in the SCDS EDID extension that signal which minimum
and maximum refresh rate the sink wishes to use when doing QMS ("Quick
Media Switching").
How to parse these flags, and what they do, has been learned from the
publicly available libdisplay-info source code.
Add the definitions of where in the byte they are, the code for checking
for them, as well as two new booleans in drm_hdmi_info to store the
result.
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
---
drivers/gpu/drm/drm_edid.c | 6 ++++++
include/drm/drm_connector.h | 12 ++++++++++++
include/drm/drm_edid.h | 2 ++
3 files changed, 20 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5a7d3b7e65da..4fe754328b1c 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6332,6 +6332,12 @@ static void drm_parse_vrr_info(struct drm_display_info *info, const u8 *hf_scds)
if (!range->max_vfreq)
range->max_vfreq = (FIELD_GET(DRM_EDID_VRR_MAX_UPPER_MASK, hf_scds[9]) << 8) |
hf_scds[10];
+
+ if (pld_len < 12)
+ return;
+
+ info->hdmi.qms_tfr_min = !!(hf_scds[11] & DRM_EDID_QMS_TFR_MIN);
+ info->hdmi.qms_tfr_max = !!(hf_scds[11] & DRM_EDID_QMS_TFR_MAX);
}
/* Sink Capability Data Structure */
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index c97cf0625fda..8439c82db905 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -389,6 +389,18 @@ struct drm_hdmi_info {
/** @qms_capable: The sink supports Quick Media Switching */
bool qms_capable;
+
+ /**
+ * @qms_tfr_min: If set, the sink uses 24/1.001Hz as its minimum rate
+ * for QMS. If unset, @drm_display_info.monitor_range.min_vfreq is used.
+ */
+ bool qms_tfr_min;
+
+ /**
+ * @qms_tfr_max: If set, @drm_display_info.monitor_range.max_vfreq is
+ * used by the sink as its maximum rate for QMS. If unset, 60Hz is used.
+ */
+ bool qms_tfr_max;
};
/**
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index f1e2052cb08b..d339acd9ee52 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -269,6 +269,8 @@ struct detailed_timing {
#define DRM_EDID_VRR_MAX_UPPER_MASK 0xc0
#define DRM_EDID_VRR_MAX_LOWER_MASK 0xff
#define DRM_EDID_VRR_MIN_MASK 0x3f
+#define DRM_EDID_QMS_TFR_MIN (1 << 4)
+#define DRM_EDID_QMS_TFR_MAX (1 << 5)
/* DSC specific */
#define DRM_EDID_DSC_10BPC (1 << 0)
--
2.55.0
More information about the linux-arm-kernel
mailing list