mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
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>
This commit is contained in:
@@ -1066,10 +1066,12 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *hdmi)
|
|||||||
struct device *dev = &hdmi->pdev->dev;
|
struct device *dev = &hdmi->pdev->dev;
|
||||||
const __be32 *addr;
|
const __be32 *addr;
|
||||||
int ret;
|
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,
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user