OSDN Git Service

drm/vc4: hdmi: Move the HSM clock enable to runtime_pm
authorMaxime Ripard <maxime@cerno.tech>
Tue, 25 May 2021 09:10:58 +0000 (11:10 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 16 Jun 2021 12:24:11 +0000 (14:24 +0200)
commit411efa18e4b03840553ff58ad9b4621b82a30c04
treea03023c7dfd419c84972eb93737dbed536acb5b5
parentc336a5ee984708db4826ef9e47d184e638e29717
drm/vc4: hdmi: Move the HSM clock enable to runtime_pm

In order to access the HDMI controller, we need to make sure the HSM
clock is enabled. If we were to access it with the clock disabled, the
CPU would completely hang, resulting in an hard crash.

Since we have different code path that would require it, let's move that
clock enable / disable to runtime_pm that will take care of the
reference counting for us.

Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210525091059.234116-3-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_hdmi.c