[PATCH 1/9] drm/drm_edid: Avoid HDMI2.1 VICs in AVI Infoframe for older HDMI sinks
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Mon Oct 17 08:43:04 UTC 2022
Modify the check for CEA modes, to avoid writing VICs added in
CTA-861-G (meant for HDMI2.1) in AVI infoframes for older HDMI sinks.
This patch also adds a function to determine if sink is HDMI2.1
and uses corrects the drm message to show HDMI2.1 sink detetction.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
drivers/gpu/drm/drm_edid.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 47465b9765f1..d3b9f9fb6c6b 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6758,6 +6758,18 @@ void drm_set_preferred_mode(struct drm_connector *connector,
}
EXPORT_SYMBOL(drm_set_preferred_mode);
+static bool is_hdmi21_sink(const struct drm_connector *connector)
+{
+ /*
+ * FIXME: sil-sii8620 doesn't have a connector around when
+ * we need one, so we have to be prepared for a NULL connector.
+ */
+ if (!connector)
+ return true;
+
+ return connector->display_info.hdmi.max_frl_rate_per_lane ? true : false;
+}
+
static bool is_hdmi2_sink(const struct drm_connector *connector)
{
/*
@@ -6807,8 +6819,18 @@ static u8 drm_mode_cea_vic(const struct drm_connector *connector,
* HDMI 1.4 VIC range: 1 <= VIC <= 64 (CEA-861-D) but
* HDMI 2.0 VIC range: 1 <= VIC <= 107 (CEA-861-F). So we
* have to make sure we dont break HDMI 1.4 sinks.
+ * Similarly,
+ * HDMI 2.1 VIC range: 1 <= VIC <= 219 (CEA-861-G), we have
+ * to make sure we dont break HDMI2.0 sinks.
*/
- if (!is_hdmi2_sink(connector) && vic > 64)
+
+ if (!is_hdmi21_sink(connector) && !is_hdmi2_sink(connector) && vic > 64)
+ return 0;
+
+ if (!is_hdmi21_sink(connector) && vic > 107)
+ return 0;
+
+ if (vic > 219)
return 0;
return vic;
--
2.25.1
More information about the Intel-gfx-trybot
mailing list