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)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 25 Oct 2021 13:33:40 +0000 (15:33 +0200)
commit0f5251339eda7f7eb7bd4467607ae1d01b24e129
tree83014473dc215e3b81c95073ea47e89786ea64a0
parentc86b41214362e8e715e1343e16d5d6af0562db05
drm/vc4: hdmi: Make sure the controller is powered in detect

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
drivers/gpu/drm/vc4/vc4_hdmi.c