drm/vc4: hdmi: Make sure the controller is powered in detect
authorMaxime Ripard <maxime@cerno.tech>
Wed, 22 Sep 2021 12:54:19 +0000 (14:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:03:04 +0000 (11:03 +0100)
commite3e8f46f36e057404657d1b9858fa7473a967d81
tree4e344b0ef552095678ba350c0df2fbbe86598c95
parentb9b1fbe61ff1b9c9715804c0d5ef9e26a2b20f86
drm/vc4: hdmi: Make sure the controller is powered in detect

[ Upstream commit 0f5251339eda7f7eb7bd4467607ae1d01b24e129 ]

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>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Tested-by: Michael Stapelberg <michael@stapelberg.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210922125419.4125779-6-maxime@cerno.tech
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_hdmi.c