Patch "drm/vc4: hdmi: Disable audio if dmas property is present but empty" has been added to the 5.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/vc4: hdmi: Disable audio if dmas property is present but empty

to the 5.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-vc4-hdmi-disable-audio-if-dmas-property-is-prese.patch
and it can be found in the queue-5.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 78f1cd97e0c8ffa01b96be7ef7893e038cd96508
Author: Phil Elwell <phil@xxxxxxxxxxxxxxx>
Date:   Mon Jun 13 16:47:44 2022 +0200

    drm/vc4: hdmi: Disable audio if dmas property is present but empty
    
    [ Upstream commit db2b927f8668adf3ac765e0921cd2720f5c04172 ]
    
    The dmas property is used to hold the dmaengine channel used for audio
    output.
    
    Older device trees were missing that property, so if it's not there we
    disable the audio output entirely.
    
    However, some overlays have set an empty value to that property, mostly
    to workaround the fact that overlays cannot remove a property. Let's add
    a test for that case and if it's empty, let's disable it as well.
    
    Cc: <stable@xxxxxxxxxxxxxxx>
    Signed-off-by: Phil Elwell <phil@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220613144800.326124-18-maxime@xxxxxxxxxx
    Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index ce9d16666d91..6b4f42332d95 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -2035,12 +2035,12 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 	struct device *dev = &vc4_hdmi->pdev->dev;
 	struct platform_device *codec_pdev;
 	const __be32 *addr;
-	int index;
+	int index, len;
 	int ret;
 
-	if (!of_find_property(dev->of_node, "dmas", NULL)) {
+	if (!of_find_property(dev->of_node, "dmas", &len) || !len) {
 		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;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux