X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0632-drm-vc4-A-present-but-empty-dmas-disables-audio.patch;fp=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0632-drm-vc4-A-present-but-empty-dmas-disables-audio.patch;h=2d38456ae6108f55dfc002abd84323eb030b9163;hb=c2308a7e4adbb2acc8ff149f91d1ca46801c135e;hp=0000000000000000000000000000000000000000;hpb=67dcc43f3a22dc3a7ac07a7065971b426feeb043;p=openwrt%2Fstaging%2Fchunkeey.git diff --git a/target/linux/brcm2708/patches-4.19/950-0632-drm-vc4-A-present-but-empty-dmas-disables-audio.patch b/target/linux/brcm2708/patches-4.19/950-0632-drm-vc4-A-present-but-empty-dmas-disables-audio.patch new file mode 100644 index 0000000000..2d38456ae6 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0632-drm-vc4-A-present-but-empty-dmas-disables-audio.patch @@ -0,0 +1,33 @@ +From 8befbf55f2668a4dae739588ed3c0b0d06fccacd Mon Sep 17 00:00:00 2001 +From: Phil Elwell +Date: Wed, 31 Jul 2019 17:36:34 +0100 +Subject: [PATCH] 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 +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -1087,10 +1087,12 @@ static int vc4_hdmi_audio_init(struct vc + 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; + } +