All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel@lists.freedesktop.org, mwen@igalia.com,
	mairacanal@riseup.net, maxime@cerno.tech, daniel.vetter@ffwll.ch,
	wambui.karugax@gmail.com
Subject: Re: Try to address the drm_debugfs issues
Date: Mon, 13 Feb 2023 19:16:51 +0100	[thread overview]
Message-ID: <20230213181651.GA2822143@linux.intel.com> (raw)
In-Reply-To: <613b9aec-7105-ca2d-13cd-16ddd85a6fda@igalia.com>

On Thu, Feb 09, 2023 at 10:06:25AM -0300, Maíra Canal wrote:
> > > [    3.872026] debugfs: File 'v3d_ident' in directory '0' already present!
> > > [    3.872064] debugfs: File 'v3d_ident' in directory '128' already present!
> > > [    3.872078] debugfs: File 'v3d_regs' in directory '0' already present!
> > > [    3.872087] debugfs: File 'v3d_regs' in directory '128' already present!
> > > [    3.872097] debugfs: File 'measure_clock' in directory '0' already present!
> > > [    3.872105] debugfs: File 'measure_clock' in directory '128' already present!
> > > [    3.872116] debugfs: File 'bo_stats' in directory '0' already present!
> > > [    3.872124] debugfs: File 'bo_stats' in directory '128' already present!
> > > 
> > > It looks like the render node is being added twice, since this doesn't happen
> > > for vc4 and vkms.
> > 
> > Thanks for the feedback and yes that's exactly what I meant with that I haven't looked into all code paths.
> > 
> > Could it be that v3d registers it's debugfs files from the debugfs_init callback?
> 
> Although this is true, I'm not sure if this is the reason why the files are
> being registered twice, as this doesn't happen to vc4, and it also uses the
> debugfs_init callback. I believe it is somewhat related to the fact that
> v3d is the primary node and the render node.

Yes, this seems to be because ->debugfs_init = v3d_debugfs_init() uses
drm_debugfs_add_files() which create files for both primary and render.
And ->debugfs_init is called via drm_minor_register() also for both
when registering. 

Probably need to change debugfs_init callback to create files just
for one minor. And if we don't want to use minor pointer directly in
drivers, the callback can take debugfs dir as argument.

Regards
Stanislaw

  parent reply	other threads:[~2023-02-13 18:17 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09  8:18 Try to address the drm_debugfs issues Christian König
2023-02-09  8:18 ` [PATCH 1/3] drm/debugfs: separate debugfs creation into init and register Christian König
2023-02-14 11:56   ` Stanislaw Gruszka
2023-02-09  8:18 ` [PATCH 2/3] drm/debugfs: split registration into dev and minor Christian König
2023-02-09 11:12   ` Maíra Canal
2023-02-09 12:03     ` Christian König
2023-02-09  8:18 ` [PATCH 3/3] drm/debugfs: remove dev->debugfs_list and debugfs_mutex Christian König
2023-02-14 12:19   ` Stanislaw Gruszka
2023-02-14 12:46     ` Stanislaw Gruszka
2023-02-16 11:33   ` Daniel Vetter
2023-02-16 11:37     ` Daniel Vetter
2023-02-16 16:00     ` Christian König
2023-02-16 16:46       ` Jani Nikula
2023-02-16 16:56         ` Christian König
2023-02-16 17:08           ` Jani Nikula
2023-02-16 19:54             ` Daniel Vetter
2023-02-17  9:22               ` Christian König
2023-02-17 10:01                 ` Stanislaw Gruszka
2023-02-17 19:38                   ` Daniel Vetter
2023-02-17 19:55                     ` Christian König
2023-02-22 13:33                     ` Stanislaw Gruszka
2023-02-16 16:37     ` Stanislaw Gruszka
2023-02-16 17:06       ` Jani Nikula
2023-02-16 19:56         ` Daniel Vetter
2023-02-17 10:35         ` Stanislaw Gruszka
2023-02-17 10:49           ` Jani Nikula
2023-02-17 11:36             ` Stanislaw Gruszka
2023-02-17 11:54               ` Christian König
2023-02-17 12:37                 ` Jani Nikula
2023-02-17 15:55                   ` Christian König
2023-02-17 19:42                     ` Daniel Vetter
2023-02-17 19:49                       ` Christian König
2023-02-09 11:23 ` Try to address the drm_debugfs issues Maíra Canal
2023-02-09 12:13   ` Christian König
2023-02-09 13:06     ` Maíra Canal
2023-02-09 14:06       ` Christian König
2023-02-09 14:19         ` Maxime Ripard
2023-02-09 15:52           ` Christian König
2023-02-09 18:48             ` Maxime Ripard
2023-02-10 12:07               ` Christian König
2023-02-10 12:18                 ` Maxime Ripard
2023-02-10 13:10                   ` Christian König
2023-02-16 11:34         ` Daniel Vetter
2023-02-16 16:31           ` Christian König
2023-02-16 19:57             ` Daniel Vetter
2023-02-13 18:16       ` Stanislaw Gruszka [this message]
2023-02-13 19:59         ` Christian König
2023-02-14  8:59 ` Stanislaw Gruszka
2023-02-14  9:28   ` Christian König
2023-02-14 11:46     ` Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230213181651.GA2822143@linux.intel.com \
    --to=stanislaw.gruszka@linux.intel.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=mairacanal@riseup.net \
    --cc=maxime@cerno.tech \
    --cc=mcanal@igalia.com \
    --cc=mwen@igalia.com \
    --cc=wambui.karugax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.