From: Phil Elwell Date: Wed, 31 Jul 2019 16:36:34 +0000 (+0100) Subject: drm/vc4: A present but empty dmas disables audio X-Git-Tag: accepted/tizen/unified/20200709.164653~994 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81da133586449ae1d8e1a931a38216d188841c98;p=platform%2Fkernel%2Flinux-rpi.git drm/vc4: A present but empty dmas disables audio Overlays are unable to remove properties in the base DTB, but they can overwrite them. Allow a present but empty 'dmas' property to also disable the HDMI audio interface. See: https://github.com/raspberrypi/linux/issues/2489 Signed-off-by: Phil Elwell --- diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index d5f5ba4..0c3d9d2 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1066,10 +1066,12 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *hdmi) struct device *dev = &hdmi->pdev->dev; const __be32 *addr; int ret; + int len; - if (!of_find_property(dev->of_node, "dmas", NULL)) { + if (!of_find_property(dev->of_node, "dmas", &len) || + len == 0) { dev_warn(dev, - "'dmas' DT property is missing, no HDMI audio\n"); + "'dmas' DT property is missing or empty, no HDMI audio\n"); return 0; }