]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY
authorJavier Martinez Canillas <javierm@redhat.com>
Wed, 20 May 2026 14:43:44 +0000 (16:43 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Thu, 21 May 2026 09:45:53 +0000 (11:45 +0200)
Replace the driver local defines with the shared constants defined in the
<linux/hdmi.h> header for the minimum and maximum TMDS character rates.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260520144424.1633354-9-javierm@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c

index a86ff370636972168124da19e114f0acab2249d2..05c3ffad858dd43d6e508c19c1bbe2a8be392937 100644 (file)
@@ -12,9 +12,6 @@
 #define HDMI_VCO_MAX_FREQ                      12000000000UL
 #define HDMI_VCO_MIN_FREQ                      8000000000UL
 
-#define HDMI_PCLK_MAX_FREQ                     600000000
-#define HDMI_PCLK_MIN_FREQ                     25000000
-
 #define HDMI_HIGH_FREQ_BIT_CLK_THRESHOLD       3400000000UL
 #define HDMI_DIG_FREQ_BIT_CLK_THRESHOLD                1500000000UL
 #define HDMI_MID_FREQ_BIT_CLK_THRESHOLD                750000000UL
@@ -649,7 +646,8 @@ static int hdmi_8998_pll_prepare(struct clk_hw *hw)
 static int hdmi_8998_pll_determine_rate(struct clk_hw *hw,
                                        struct clk_rate_request *req)
 {
-       req->rate = clamp_t(unsigned long, req->rate, HDMI_PCLK_MIN_FREQ, HDMI_PCLK_MAX_FREQ);
+       req->rate = clamp_t(unsigned long, req->rate, HDMI_TMDS_CHAR_RATE_MIN_HZ,
+                           HDMI_2_0_TMDS_CHAR_RATE_MAX_HZ);
 
        return 0;
 }