drm/vc4: hdmi: Prevent clock unbalance
authorMaxime Ripard <maxime@cerno.tech>
Fri, 7 May 2021 15:05:09 +0000 (17:05 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jul 2021 07:44:57 +0000 (09:44 +0200)
commit98bd09d928b370bf5d72a920974db7310404839c
treefb5e651de0fa6b78147d4c667a8108c95658d045
parenta2b8835cb4d1cdae988a12f148896ea28e9820df
drm/vc4: hdmi: Prevent clock unbalance

commit 5b006000423667ef0f55721fc93e477b31f22d28 upstream.

Since we fixed the hooks to disable the encoder at boot, we now have an
unbalanced clk_disable call at boot since we never enabled them in the
first place.

Let's mimic the state of the hardware and enable the clocks at boot if
the controller is enabled to get the use-count right.

Cc: <stable@vger.kernel.org> # v5.10+
Fixes: 09c438139b8f ("drm/vc4: hdmi: Implement finer-grained hooks")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210507150515.257424-7-maxime@cerno.tech
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vc4/vc4_hdmi.c