dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: hdmi: Add debugfs prefix
@ 2021-07-23  7:24 Ivan T. Ivanov
  2021-07-28 11:54 ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan T. Ivanov @ 2021-07-23  7:24 UTC (permalink / raw)
  To: David Airlie; +Cc: dri-devel, Emma Anholt, linux-kernel

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@suse.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: hdmi: Add debugfs prefix
  2021-07-23  7:24 [PATCH] drm/vc4: hdmi: Add debugfs prefix Ivan T. Ivanov
@ 2021-07-28 11:54 ` Maxime Ripard
  2021-07-29  6:46   ` Ivan T. Ivanov
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2021-07-28 11:54 UTC (permalink / raw)
  To: Ivan T. Ivanov; +Cc: David Airlie, dri-devel, Emma Anholt, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 552 bytes --]

Hi,

On Fri, Jul 23, 2021 at 09:24:14AM +0200, Ivan T. Ivanov wrote:
> 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@suse.de>

Thanks for your patch.

However, that part changed fairly significantly recently so you'll need
to rebase it on top of the drm-misc-next (or linux-next)

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: hdmi: Add debugfs prefix
  2021-07-28 11:54 ` Maxime Ripard
@ 2021-07-29  6:46   ` Ivan T. Ivanov
  2021-07-29 12:38     ` Ivan T. Ivanov
  0 siblings, 1 reply; 4+ messages in thread
From: Ivan T. Ivanov @ 2021-07-29  6:46 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: David Airlie, dri-devel, Emma Anholt, linux-kernel

Quoting Maxime Ripard (2021-07-28 14:54:19)
> Hi,
> 
> On Fri, Jul 23, 2021 at 09:24:14AM +0200, Ivan T. Ivanov wrote:
> > 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@suse.de>
> 
> Thanks for your patch.
> 
> However, that part changed fairly significantly recently so you'll need
> to rebase it on top of the drm-misc-next (or linux-next)
> 

Thanks, will do.

Regards,
Ivan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/vc4: hdmi: Add debugfs prefix
  2021-07-29  6:46   ` Ivan T. Ivanov
@ 2021-07-29 12:38     ` Ivan T. Ivanov
  0 siblings, 0 replies; 4+ messages in thread
From: Ivan T. Ivanov @ 2021-07-29 12:38 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: David Airlie, dri-devel, Emma Anholt, linux-kernel

Hi,

Quoting Ivan T. Ivanov (2021-07-29 09:46:23)
> Quoting Maxime Ripard (2021-07-28 14:54:19)
> > Hi,
> > 
> > On Fri, Jul 23, 2021 at 09:24:14AM +0200, Ivan T. Ivanov wrote:
> > > 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@suse.de>
> > 
> > Thanks for your patch.
> > 
> > However, that part changed fairly significantly recently so you'll need
> > to rebase it on top of the drm-misc-next (or linux-next)
> > 
> 
> Thanks, will do.
> 

It looks like this patch is not relevant anymore.

Side note: vc4_hdmi_audio_component_drv and related definitions
seems unused.

Regards,
Ivan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-29 12:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23  7:24 [PATCH] drm/vc4: hdmi: Add debugfs prefix Ivan T. Ivanov
2021-07-28 11:54 ` Maxime Ripard
2021-07-29  6:46   ` Ivan T. Ivanov
2021-07-29 12:38     ` Ivan T. Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).