]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/rockchip: Don't change hdmi reference clock rate
authorDerek Foreman <derek.foreman@collabora.com>
Tue, 17 Dec 2024 20:17:07 +0000 (14:17 -0600)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 9 Jan 2025 23:33:06 +0000 (00:33 +0100)
The code that changes hdmi->ref_clk was accidentally copied from
downstream code that sets a different clock. We don't actually
want to set any clock here at all.

Setting this clock incorrectly leads to incorrect timings for
DDC, CEC, and HDCP signal generation.

No Fixes listed, as the theoretical timing error in DDC appears to
still be within tolerances and harmless - and HDCP and CEC are not
yet supported.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241217201708.3320673-1-derek.foreman@collabora.com
drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c

index 9916843a6ff3b34b5407bf7d2a73812f2a1844cb..f41151d49fcaf5351f986a2e95007b13da6b1a12 100644 (file)
@@ -89,7 +89,6 @@ struct rockchip_hdmi_qp {
        struct regmap *regmap;
        struct regmap *vo_regmap;
        struct rockchip_encoder encoder;
-       struct clk *ref_clk;
        struct dw_hdmi_qp *hdmi;
        struct phy *phy;
        struct gpio_desc *enable_gpio;
@@ -122,7 +121,6 @@ static void dw_hdmi_qp_rockchip_encoder_enable(struct drm_encoder *encoder)
        if (crtc && crtc->state) {
                rate = drm_hdmi_compute_mode_clock(&crtc->state->adjusted_mode,
                                                   8, HDMI_COLORSPACE_RGB);
-               clk_set_rate(hdmi->ref_clk, rate);
                /*
                 * FIXME: Temporary workaround to pass pixel clock rate
                 * to the PHY driver until phy_configure_opts_hdmi
@@ -515,17 +513,6 @@ static int dw_hdmi_qp_rockchip_bind(struct device *dev, struct device *master,
                return ret;
        }
 
-       for (i = 0; i < ret; i++) {
-               if (!strcmp(clks[i].id, "ref")) {
-                       hdmi->ref_clk = clks[1].clk;
-                       break;
-               }
-       }
-       if (!hdmi->ref_clk) {
-               drm_err(hdmi, "Missing ref clock\n");
-               return -EINVAL;
-       }
-
        hdmi->enable_gpio = devm_gpiod_get_optional(hdmi->dev, "enable",
                                                    GPIOD_OUT_HIGH);
        if (IS_ERR(hdmi->enable_gpio)) {