drm/i915/hdmi: Prune modes that require HDMI2.1 FRL
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 21 Jul 2022 08:46:45 +0000 (14:16 +0530)
committerUma Shankar <uma.shankar@intel.com>
Wed, 27 Jul 2022 05:17:42 +0000 (10:47 +0530)
HDMI2.1 requires some higher resolution video modes to be enumerated
only if HDMI2.1 Fixed Rate Link (FRL) is supported.
Current platforms do not support FRL transmission so prune modes that
require HDMI2.1 FRL.

v2: Fixed the condition to check for dotclock > 600.
Return MODE_CLOCK_HIGH as mode status.

Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> (v1)
Signed-off-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220721084645.3411219-1-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/display/intel_hdmi.c

index cb6898cbe1c8ff7efdb9b2d08fd598b2675621c9..872316ef895e31d06a6c3437ba0bd13f4f0e0cd7 100644 (file)
@@ -2000,6 +2000,15 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
                clock *= 2;
        }
 
+       /*
+        * HDMI2.1 requires higher resolution modes like 8k60, 4K120 to be
+        * enumerated only if FRL is supported. Current platforms do not support
+        * FRL so prune the higher resolution modes that require doctclock more
+        * than 600MHz.
+        */
+       if (clock > 600000)
+               return MODE_CLOCK_HIGH;
+
        ycbcr_420_only = drm_mode_is_420_only(&connector->display_info, mode);
 
        status = intel_hdmi_mode_clock_valid(connector, clock, has_hdmi_sink, ycbcr_420_only);