drm/vc4: hdmi: Make sure the controller is powered in detect
authorMaxime Ripard <maxime@cerno.tech>
Tue, 25 May 2021 09:10:59 +0000 (11:10 +0200)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:47:17 +0000 (08:47 -0400)
commitcf593548759465bb3c40cedfe0913a150ca6bda8
tree135a713f50bfff109726a21802af98ffa1d51c4d
parentf73aca83fd83ab6270ce170e3ac8268b90e48fec
drm/vc4: hdmi: Make sure the controller is powered in detect

[ Upstream commit 9984d6664ce9dcbbc713962539eaf7636ea246c2 ]

If the HPD GPIO is not available and drm_probe_ddc fails, we end up
reading the HDMI_HOTPLUG register, but the controller might be powered
off resulting in a CPU hang. Make sure we have the power domain and the
HSM clock powered during the detect cycle to prevent the hang from
happening.

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