bcm27xx: update 6.1 patches to latest version
[openwrt/staging/dangole.git] / target / linux / bcm27xx / patches-6.1 / 950-0931-drm-vc4-hdmi-Enable-the-audio-clock.patch
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
5
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.
9
10 However, we were never enabling it, which was resulting in lockups on
11 the BCM2712.
12
13 Fixes: 632ee3aa8786 ("drm/vc4: hdmi: Add audio-related callbacks")
14 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
15 ---
16 drivers/gpu/drm/vc4/vc4_hdmi.c | 5 +++++
17 1 file changed, 5 insertions(+)
18
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
22 {
23 struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
24
25 + clk_disable_unprepare(vc4_hdmi->audio_clock);
26 clk_disable_unprepare(vc4_hdmi->hsm_rpm_clock);
27
28 return 0;
29 @@ -3666,6 +3667,10 @@ static int vc4_hdmi_runtime_resume(struc
30 goto err_disable_clk;
31 }
32
33 + ret = clk_prepare_enable(vc4_hdmi->audio_clock);
34 + if (ret)
35 + goto err_disable_clk;
36 +
37 if (vc4_hdmi->variant->reset)
38 vc4_hdmi->variant->reset(vc4_hdmi);
39