drm/vc4: hdmi: Disable audio if dmas property is present but empty
authorPhil Elwell <phil@raspberrypi.org>
Mon, 13 Jun 2022 14:47:44 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:22:53 +0000 (14:22 +0200)
commit97049e69f5a848fe4f71aa4982265e6124a9610b
treedc48d912b2867d886e9bef22c4ce136333ef7e44
parent8589a83c0ae9d4ddd253e2ed07c0aae11894e479
drm/vc4: hdmi: Disable audio if dmas property is present but empty

commit db2b927f8668adf3ac765e0921cd2720f5c04172 upstream.

The dmas property is used to hold the dmaengine channel used for audio
output.

Older device trees were missing that property, so if it's not there we
disable the audio output entirely.

However, some overlays have set an empty value to that property, mostly
to workaround the fact that overlays cannot remove a property. Let's add
a test for that case and if it's empty, let's disable it as well.

Cc: <stable@vger.kernel.org>
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Link: https://lore.kernel.org/r/20220613144800.326124-18-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vc4/vc4_hdmi.c