drm/vc4: hdmi: Make sure the device is powered with CEC
authorMaxime Ripard <maxime@cerno.tech>
Tue, 29 Jun 2021 09:41:57 +0000 (11:41 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 2 Jul 2021 15:45:04 +0000 (16:45 +0100)
commitecdd08fd9bba06045eb94922149cdad23eb3820a
tree14c90b9b0abda300c9b8314b39af75860beae78d
parent9d540111387a0069d622585af2264ab0f3ae602f
drm/vc4: hdmi: Make sure the device is powered with CEC

Similarly to what we encountered with the detect hook with DRM, nothing
actually prevents any of the CEC callback from being run while the HDMI
output is disabled.

However, this is an issue since any register access to the controller
when it's powered down will result in a silent hang.

Let's make sure we run the runtime_pm hooks when the CEC adapter is
opened and closed by the userspace to avoid that issue.

Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hdmi.c