From 8add429d6f035cb9e07937b94e6979b4bd5f40e3 Mon Sep 17 00:00:00 2001 From: Hoegeun Kwon Date: Fri, 11 Sep 2020 13:39:40 +0900 Subject: [PATCH] drm/vc4: hdmi: Fix to use clk_set_min_rate There is a problem that rpi_firmware_transaction fails while setting the clock rate. Add the missing code applied to the mainline. Change-Id: I56bcb00037fc85bb01f8a876ccd26798b4bddb39 Signed-off-by: Hoegeun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/d757ddd6549da140f178563e5fd2bf1d129913fd.1599120059.git-series.maxime@cerno.tech --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 4c10427..bc6288d 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -671,7 +671,11 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder) return; } - ret = clk_set_rate(vc4_hdmi->pixel_bvb_clock, + /* + * FIXME: When the pixel freq is 594MHz (4k60), this needs to be setup + * at 150MHz. + */ + ret = clk_set_min_rate(vc4_hdmi->pixel_bvb_clock, (hsm_rate > VC4_HSM_MID_CLOCK ? 150000000 : 75000000)); if (ret) { DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret); -- 2.7.4