lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210723072414.17590-1-iivanov@suse.de>
Date:   Fri, 23 Jul 2021 09:24:14 +0200
From:   "Ivan T. Ivanov" <iivanov@...e.de>
To:     David Airlie <airlied@...ux.ie>
Cc:     Daniel Vetter <daniel@...ll.ch>, Emma Anholt <emma@...olt.net>,
        Maxime Ripard <mripard@...nel.org>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/vc4: hdmi: Add debugfs prefix

Without prefix debugfs can't properly create component
debug information tree when driver register more than
one component per device, in this case two. Fix this.

debugfs: Directory 'fef00700.hdmi' with parent 'vc4-hdmi-0' already present!

Signed-off-by: Ivan T. Ivanov <iivanov@...e.de>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index aab1b36ceb3c..62b057f88df5 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -1523,6 +1523,9 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 	struct snd_soc_dai_link *dai_link = &vc4_hdmi->audio.link;
 	struct snd_soc_card *card = &vc4_hdmi->audio.card;
 	struct device *dev = &vc4_hdmi->pdev->dev;
+#ifdef CONFIG_DEBUG_FS
+	struct snd_soc_component *comp;
+#endif
 	const __be32 *addr;
 	int index;
 	int ret;
@@ -1577,6 +1580,16 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 		return ret;
 	}
 
+#ifdef CONFIG_DEBUG_FS
+	comp = snd_soc_lookup_component(dev, vc4_hdmi_audio_cpu_dai_comp.name);
+	if (comp)
+		comp->debugfs_prefix = "cpu";
+
+	comp = snd_soc_lookup_component(dev, vc4_hdmi_audio_component_drv.name);
+	if (comp)
+		comp->debugfs_prefix = "codec";
+#endif
+
 	dai_link->cpus		= &vc4_hdmi->audio.cpu;
 	dai_link->codecs	= &vc4_hdmi->audio.codec;
 	dai_link->platforms	= &vc4_hdmi->audio.platform;
-- 
2.32.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ