Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Reject unsupported TMDS rates on ICL+

ICL+ PLLs can't genenerate certain frequencies. Running the PLL
algorithms through for all frequencies 25-594MHz we see a gap just
above 500 MHz. Specifically 500-522.8MHZ for TC PLLs, and 500-533.2
MHz for combo PHY PLLs. Reject those frequencies hdmi_port_clock_valid()
so that we properly filter out unsupported modes and/or color depths
for HDMI.

Cc: stable@vger.kernel.org
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5247
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220311212845.32358-1-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>

+9
+9
drivers/gpu/drm/i915/display/intel_hdmi.c
··· 1837 1837 bool has_hdmi_sink) 1838 1838 { 1839 1839 struct drm_i915_private *dev_priv = intel_hdmi_to_i915(hdmi); 1840 + enum phy phy = intel_port_to_phy(dev_priv, hdmi_to_dig_port(hdmi)->base.port); 1840 1841 1841 1842 if (clock < 25000) 1842 1843 return MODE_CLOCK_LOW; ··· 1856 1855 1857 1856 /* CHV DPLL can't generate 216-240 MHz */ 1858 1857 if (IS_CHERRYVIEW(dev_priv) && clock > 216000 && clock < 240000) 1858 + return MODE_CLOCK_RANGE; 1859 + 1860 + /* ICL+ combo PHY PLL can't generate 500-533.2 MHz */ 1861 + if (intel_phy_is_combo(dev_priv, phy) && clock > 500000 && clock < 533200) 1862 + return MODE_CLOCK_RANGE; 1863 + 1864 + /* ICL+ TC PHY PLL can't generate 500-532.8 MHz */ 1865 + if (intel_phy_is_tc(dev_priv, phy) && clock > 500000 && clock < 532800) 1859 1866 return MODE_CLOCK_RANGE; 1860 1867 1861 1868 /*