Skip to content

Commit 31dc1e8

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
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: #2489 Signed-off-by: Phil Elwell <[email protected]>
1 parent 9fc2dad commit 31dc1e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/vc4/vc4_hdmi.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,10 +2037,12 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
20372037
const __be32 *addr;
20382038
int index;
20392039
int ret;
2040+
int len;
20402041

2041-
if (!of_find_property(dev->of_node, "dmas", NULL)) {
2042+
if (!of_find_property(dev->of_node, "dmas", &len) ||
2043+
len == 0) {
20422044
dev_warn(dev,
2043-
"'dmas' DT property is missing, no HDMI audio\n");
2045+
"'dmas' DT property is missing or empty, no HDMI audio\n");
20442046
return 0;
20452047
}
20462048

0 commit comments

Comments
 (0)