1 From 0da58dfbd2cc2cfa14a629787b9ba6fa10b5f666 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 29 Mar 2023 15:26:52 +0100
4 Subject: [PATCH] drm/vc4: hdmi: Enable the audio clock
6 The audio clock is used by the HDMI controller driver and we were using
7 it to get its audio rate and compute the dividers needed to reach a
8 given audio sample rate.
10 However, we were never enabling it, which was resulting in lockups on
13 Fixes: 632ee3aa8786 ("drm/vc4: hdmi: Add audio-related callbacks")
14 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
16 drivers/gpu/drm/vc4/vc4_hdmi.c | 5 +++++
17 1 file changed, 5 insertions(+)
19 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
20 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
21 @@ -3625,6 +3625,7 @@ static int vc4_hdmi_runtime_suspend(stru
23 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
25 + clk_disable_unprepare(vc4_hdmi->audio_clock);
26 clk_disable_unprepare(vc4_hdmi->hsm_rpm_clock);
29 @@ -3666,6 +3667,10 @@ static int vc4_hdmi_runtime_resume(struc
33 + ret = clk_prepare_enable(vc4_hdmi->audio_clock);
35 + goto err_disable_clk;
37 if (vc4_hdmi->variant->reset)
38 vc4_hdmi->variant->reset(vc4_hdmi);