From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: Jeffrey Hugo <quic_jhugo@quicinc.com>,
daniel.vetter@ffwll.ch, Oded Gabbay <ogabbay@kernel.org>,
mcanal@igalia.com, dri-devel@lists.freedesktop.org,
mwen@igalia.com, mairacanal@riseup.net,
jacek.lawrynowicz@linux.intel.com, wambui.karugax@gmail.com,
maxime@cerno.tech
Subject: Re: [PATCH 3/3] drm/debugfs: remove dev->debugfs_list and debugfs_mutex
Date: Tue, 14 Feb 2023 13:46:03 +0100 [thread overview]
Message-ID: <20230214124603.GA2827732@linux.intel.com> (raw)
In-Reply-To: <20230214121951.GD2824715@linux.intel.com>
On Tue, Feb 14, 2023 at 01:19:51PM +0100, Stanislaw Gruszka wrote:
> On Thu, Feb 09, 2023 at 09:18:38AM +0100, Christian König wrote:
> > -void drm_debugfs_late_register(struct drm_device *dev)
> > -{
> > - struct drm_minor *minor = dev->primary;
> > - struct drm_debugfs_entry *entry, *tmp;
> > -
> > - if (!minor)
> > - return;
> > -
> > - list_for_each_entry_safe(entry, tmp, &dev->debugfs_list, list) {
> > - debugfs_create_file(entry->file.name, 0444,
> > - minor->debugfs_root, entry, &drm_debugfs_entry_fops);
> > - list_del(&entry->list);
> > - }
> > }
> >
> > int drm_debugfs_remove_files(const struct drm_info_list *files, int count,
> > @@ -343,9 +321,13 @@ void drm_debugfs_add_file(struct drm_device *dev, const char *name,
> > entry->file.data = data;
> > entry->dev = dev;
> >
> > - mutex_lock(&dev->debugfs_mutex);
> > - list_add(&entry->list, &dev->debugfs_list);
> > - mutex_unlock(&dev->debugfs_mutex);
> > + debugfs_create_file(name, 0444, dev->primary->debugfs_root, entry,
> > + &drm_debugfs_entry_fops);
> > +
> > + /* TODO: This should probably only be a symlink */
> > + if (dev->render)
> > + debugfs_create_file(name, 0444, dev->render->debugfs_root,
> > + entry, &drm_debugfs_entry_fops);
>
> For accel we would need conditional check for DRM_MINOR_ACCEL here as
> well.
Actually my comment make no sense, since we do not have minor pointer
here. What is needed is additional dev->accel code like for dev->render,
perhaps also make dev->primary conditional.
Alternatively we can just create separate helper: accel_debugfs_add_file.
> With this change and one from first patch, drm_debugfs_add_file() should
> work for accel as well. We could get rid of debugfs_init from accel_debugfs_init().
>
> However we still need support for writable files. I think we can just
> add helper for providing debugfs dir to drivers i.e:
>
> struct dentry *accel_debugfs_dir(struct drm_device *drm)
> {
> return drm->accel->debugfs_root;
> }
or just this :-)
Regards
Stanislaw
next prev parent reply other threads:[~2023-02-14 12:46 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 [this message]
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
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=20230214124603.GA2827732@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=jacek.lawrynowicz@linux.intel.com \
--cc=mairacanal@riseup.net \
--cc=maxime@cerno.tech \
--cc=mcanal@igalia.com \
--cc=mwen@igalia.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.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.