public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: liviu.dudau@arm.com, linux@armlinux.org.uk,
	dri-devel@lists.freedesktop.org, bskeggs@redhat.com,
	tomi.valkeinen@ti.com, jsarha@ti.com,
	linux+etnaviv@armlinux.org.uk, alexander.deucher@amd.com,
	daniel.vetter@intel.com, vincent.abriou@st.com,
	christian.koenig@amd.com, kraxel@redhat.com
Subject: Re: [PATCH 00/19] drm: debugfs: Remove all files automatically on cleanup
Date: Mon, 30 Jan 2017 10:10:15 +0100	[thread overview]
Message-ID: <20170130091015.GS3585@ulmo.ba.sec> (raw)
In-Reply-To: <20170130090344.ti2yx5eyyh5puy32@phenom.ffwll.local>


[-- Attachment #1.1: Type: text/plain, Size: 3375 bytes --]

On Mon, Jan 30, 2017 at 10:03:44AM +0100, Daniel Vetter wrote:
> On Mon, Jan 30, 2017 at 09:58:48AM +0100, Thierry Reding wrote:
> > On Fri, Jan 27, 2017 at 03:05:46PM +0100, Daniel Vetter wrote:
> > > On Fri, Jan 27, 2017 at 10:36:16AM +0100, Thierry Reding wrote:
> > > > On Fri, Jan 27, 2017 at 08:49:34AM +0100, Daniel Vetter wrote:
> > > > > On Thu, Jan 26, 2017 at 11:56:02PM +0100, Noralf Trønnes wrote:
> > > > > > This patchset removes the need for drivers to clean up their debugfs
> > > > > > files on exit. It is done automatically in drm_debugfs_cleanup().
> > > > > > This funtion is also called should the driver error out in it's
> > > > > > drm_driver.debugfs_init callback.
> > > > > > 
> > > > > > Two drivers still use drm_debugfs_remove_files():
> > > > > > - tegra in it's connectors, not sure if I can remove it.
> > > > > 
> > > > > I read through them, and they're removed on the component device nodes
> > > > > stuff. That looks somewhat fishy from a lifetime point of view, and I
> > > > > think removing all that code would be better, too.
> > > > 
> > > > What makes you think that's problematic from a lifetime point of view?
> > > > The component device is tied to the DRM device, so these callbacks are
> > > > called at the right time.
> > > 
> > > debugfs is a userspace interface, which should disappear when
> > > drm_dev_unregister gets called. I'm not sure at all whether that lines up
> > > with the cleanup of all your component nodes, but otoh it's rather
> > > academic since you can't hotplug a tegra.
> > > 
> > > > That said, I think it's safe to remove the other debugfs files from
> > > > Tegra. It might not be possible to remove the cleanup functions
> > > > altogether, though, because they have to do a special dance involving
> > > > kmemdup() drm_debugfs_create_files() and kfree() in order to support
> > > > debugfs files for multiple instances of subdevices.
> > > 
> > > Hm, that entire "do debugfs on the minor" thing makes almost never sense.
> > > All the things we have left in modern drivers are either per-fd, or
> > > per-device. Nothing of interest is per-minor. Or do you mean something
> > > else?
> > 
> > I'm not sure I understand what you're saying. We have plenty of code
> > that adds debugfs files to the connector's debugfs entry. And that's
> > within the minor's debugfs root.
> > 
> > Am I missing something?
> 
> Per-connector entries are fine, per-minor imo not.

Most, if not all, debugfs files in Tegra a per-connector. We have a
couple that are per-CRTC. And then we have two files that are on the
minor, which is something I had copied from i915, if I remember
correctly, though I can't seem to find the original anymore. Maybe
that was moved somewhere else in the meantime?

> This is a historical accident, but it also doesn't really hurt anyone.
> I think it'd make much more sense to move everything into a
> per-devices entry (with maybe backwards compat links from minor to
> devices).

With per-device entries you mean rooted at the device backing the CRTC,
encoder, connector, ...?

> But really, this is 100% orthogonal to the cleanup here.

If we want to get rid of the remainder of the cleanup, then it's not
entirely orthogonal anymore. =)

Not to say that this cleanup isn't useful in its own right.

Thierry

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

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-01-30  9:10 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 22:56 [PATCH 00/19] drm: debugfs: Remove all files automatically on cleanup Noralf Trønnes
2017-01-26 22:56 ` [PATCH 01/19] " Noralf Trønnes
2017-01-27  7:59   ` Daniel Vetter
2017-01-26 22:56 ` [PATCH 02/19] drm: drm_minor_register(): Clean up debugfs on failure Noralf Trønnes
2017-01-26 22:56 ` [PATCH 03/19] drm/atomic: Remove drm_atomic_debugfs_cleanup() Noralf Trønnes
2017-01-27  8:49   ` Daniel Vetter
2017-01-26 22:56 ` [PATCH 04/19] drm/amd/amdgpu: Remove drm_debugfs_remove_files() call Noralf Trønnes
2017-01-27  8:12   ` Christian König
2017-01-26 22:56 ` [PATCH 05/19] drm/armada: Remove armada_drm_debugfs_cleanup() Noralf Trønnes
2017-01-26 22:56 ` [PATCH 06/19] drm/etnaviv: allow build with COMPILE_TEST Noralf Trønnes
2017-01-27  9:57   ` Lucas Stach
2017-01-27 14:24     ` Daniel Vetter
2017-01-26 22:56 ` [PATCH 07/19] drm/etnaviv: Remove etnaviv_debugfs_cleanup() Noralf Trønnes
2017-01-27  9:57   ` Lucas Stach
2017-01-26 22:56 ` [PATCH 08/19] drm/hdlcd: Remove hdlcd_debugfs_cleanup() Noralf Trønnes
2017-01-27 11:47   ` Local user for Liviu Dudau
2017-01-26 22:56 ` [PATCH 09/19] drm/msm: Remove drm_debugfs_remove_files() calls Noralf Trønnes
2017-01-27  7:52   ` Daniel Vetter
2017-01-26 22:56 ` [PATCH 10/19] drm/nouveau: Remove nouveau_drm_debugfs_cleanup() Noralf Trønnes
2017-01-26 22:56 ` [PATCH 11/19] drm/omap: Remove omap_debugfs_cleanup() Noralf Trønnes
2017-01-27  8:06   ` Tomi Valkeinen
2017-01-26 22:56 ` [PATCH 12/19] drm/radeon: Remove drm_debugfs_remove_files() call Noralf Trønnes
2017-01-27  8:10   ` Christian König
2017-01-26 22:56 ` [PATCH 13/19] drm/sti: Remove drm_debugfs_remove_files() calls Noralf Trønnes
2017-01-27 10:38   ` Vincent ABRIOU
2017-01-26 22:56 ` [PATCH 14/19] drm/tegra: Remove tegra_debugfs_cleanup() Noralf Trønnes
2017-01-27  7:53   ` Daniel Vetter
2017-01-27  9:37   ` Thierry Reding
2017-01-26 22:56 ` [PATCH 15/19] drm/tilcdc: Remove tilcdc_debugfs_cleanup() Noralf Trønnes
2017-01-27 10:03   ` Jyri Sarha
2017-01-26 22:56 ` [PATCH 16/19] drm/vc4: Remove vc4_debugfs_cleanup() Noralf Trønnes
2017-01-27 17:56   ` Eric Anholt
2017-01-30  8:49     ` Daniel Vetter
2017-01-26 22:56 ` [PATCH 17/19] drm/virtio: Remove virtio_gpu_debugfs_takedown() Noralf Trønnes
2017-01-26 22:56 ` [PATCH 18/19] drm/qxl: Remove qxl_debugfs_takedown() Noralf Trønnes
2017-01-26 22:56 ` [PATCH 19/19] drm/i915: Remove i915_debugfs_unregister() Noralf Trønnes
2017-01-27  7:49 ` [PATCH 00/19] drm: debugfs: Remove all files automatically on cleanup Daniel Vetter
2017-01-27  9:36   ` Thierry Reding
2017-01-27 14:05     ` Daniel Vetter
2017-01-30  8:58       ` Thierry Reding
2017-01-30  9:03         ` Daniel Vetter
2017-01-30  9:10           ` Thierry Reding [this message]
2017-03-07 23:08             ` Daniel Vetter
2017-01-27 14:23   ` Noralf Trønnes
2017-01-27 14:29     ` Daniel Vetter
2017-03-01 14:31       ` Daniel Vetter
2017-03-01 22:55         ` Noralf Trønnes

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=20170130091015.GS3585@ulmo.ba.sec \
    --to=thierry.reding@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=kraxel@redhat.com \
    --cc=linux+etnaviv@armlinux.org.uk \
    --cc=linux@armlinux.org.uk \
    --cc=liviu.dudau@arm.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=vincent.abriou@st.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox