mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
|
From 2d7f59a15d02ba254ffde801992305b491d3481f Mon Sep 17 00:00:00 2001
|
||
|
From: Phil Elwell <phil@raspberrypi.org>
|
||
|
Date: Wed, 31 Jul 2019 17:36:34 +0100
|
||
|
Subject: [PATCH 447/552] 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 <phil@raspberrypi.org>
|
||
|
---
|
||
|
drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++++--
|
||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||
|
index 16a2e214a1b3..7fc9c8b1258e 100644
|
||
|
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||
|
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
|
||
|
@@ -2043,10 +2043,12 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
|
||
|
const __be32 *addr;
|
||
|
int index;
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
--
|
||
|
2.33.0
|
||
|
|