]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
authorJavier Martinez Canillas <javierm@redhat.com>
Wed, 20 May 2026 14:43:39 +0000 (16:43 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 21 May 2026 09:45:52 +0000 (11:45 +0200)
Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
constant defined in the <linux/hdmi.h> header.

The local define incorrectly referenced HDMI 1.4, but the 340 MHz
maximum TMDS character rate was actually introduced in HDMI 1.3.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260520144424.1633354-4-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c

index 0dbb1274360945088f578a366dbf6ab560677df1..1c214a8e6dc2db7a700c3ca9872f9adde3ebd334 100644 (file)
@@ -38,8 +38,6 @@
 #define DDC_CI_ADDR            0x37
 #define DDC_SEGMENT_ADDR       0x30
 
-#define HDMI14_MAX_TMDSCLK     340000000
-
 #define SCRAMB_POLL_DELAY_MS   3000
 
 /*
@@ -835,9 +833,9 @@ dw_hdmi_qp_bridge_tmds_char_rate_valid(const struct drm_bridge *bridge,
        /*
         * TODO: when hdmi->no_hpd is 1 we must not support modes that
         * require scrambling, including every mode with a clock above
-        * HDMI14_MAX_TMDSCLK.
+        * HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ.
         */
-       if (rate > HDMI14_MAX_TMDSCLK) {
+       if (rate > HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ) {
                dev_dbg(hdmi->dev, "Unsupported TMDS char rate: %lld\n", rate);
                return MODE_CLOCK_HIGH;
        }