drm/vc4: hdmi: Introduce an output_enabled flag
authorMaxime Ripard <maxime@cerno.tech>
Tue, 19 Oct 2021 15:31:58 +0000 (17:31 +0200)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:03:44 +0000 (16:03 +0000)
commit105cfac92dc6efb586349db56e2f2304b5681fb4
treedd72b66dc75929a0e39c0a7e64f3a8238393c593
parentedf9b71beebd9ebb869d65933955832c4285769c
drm/vc4: hdmi: Introduce an output_enabled flag

We currently poke at encoder->crtc in the ALSA code path to determine
whether the HDMI output is enabled or not, and thus whether we should
allow the audio output.

However, that pointer is deprecated and shouldn't really be used by
atomic drivers anymore. Since we have the infrastructure in place now,
let's just create a flag that we toggle to report whether the controller
is currently enabled and use that instead of encoder->crtc in ALSA.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_hdmi.h