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)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:17 +0000 (08:47 -0400)
commitf73aca83fd83ab6270ce170e3ac8268b90e48fec
tree99efc36255f6aa8ddd01598a2c68f09186ccfb1f
parentf11f9ff8a7c97b2a3990c7322304627d9b58d362
drm/vc4: hdmi: Move the HSM clock enable to runtime_pm

[ Upstream commit 411efa18e4b03840553ff58ad9b4621b82a30c04 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_hdmi.c