From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 00/19] drm: debugfs: Remove all files automatically on cleanup Date: Mon, 30 Jan 2017 09:58:48 +0100 Message-ID: <20170130085848.GQ3585@ulmo.ba.sec> References: <20170126225621.12314-1-noralf@tronnes.org> <20170127074934.7fvmfkxa7wioxwt4@phenom.ffwll.local> <20170127093616.GA21758@ulmo.ba.sec> <20170127140546.7urigfzjcnz6qajc@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0347905914==" Return-path: Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 236D26E394 for ; Mon, 30 Jan 2017 08:58:52 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id r18so4491857wmd.3 for ; Mon, 30 Jan 2017 00:58:52 -0800 (PST) In-Reply-To: <20170127140546.7urigfzjcnz6qajc@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter 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 List-Id: dri-devel@lists.freedesktop.org --===============0347905914== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YzdYn+D7cUqe+VA3" Content-Disposition: inline --YzdYn+D7cUqe+VA3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=C3=B8nnes 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. > > > >=20 > > > > Two drivers still use drm_debugfs_remove_files(): > > > > - tegra in it's connectors, not sure if I can remove it. > > >=20 > > > 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. > >=20 > > 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. >=20 > 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. >=20 > > 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. >=20 > 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? Thierry --YzdYn+D7cUqe+VA3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAliPAEgACgkQ3SOs138+ s6FCZBAAg4eqjsemmEATo4oCa3xCJjBpFCq2IdYuw6r7icXyjtS/jWvlRAKX2wLS whvn2EPoz4LHNmbCZBi9Qo4qpL++Rdrxtx2j+njZ/B983jEZckTb995zl60+uGJ6 BjHeYuF8X9++5yytio2UsNNzbBq63L6V160oI1rXXbTNzmFJZBFkgzkqXxEHfn1t wWQYGJR9eDnwpsnPwv3dEtFl8fPmRMM955Bh+2cRNejO4Jjyaeu/zuSGDroBiOjS n1sI8t6zexb4ueZ18QSJ7A/rDgAwyChqCp2ajNYhM2lwnynPzcX20uRwLsvj0GS5 uiktMbJGOj+//3RxR03lLBoTvwi6B3CMKSPsbODFhepYw4xaPt8yRBdvbUyHhPjm 1sQxkvac0RetY4wovpscrcj9Yx9AbkuJOBw6kny7nUPw3CoyQIxgF8+mSS+++q4F 70e1r/mhIQxo+QAuMUizf8oneeBSo69beoDX2dkKu2eARC+5MUpiYsn3N2zKx5Xr BrLlp6gSq+TfoD66gfjm7eeGE3u0DTrq4JaqlzHu1P6lG/iDham4yUFbYnM4l1aB MRr0/dHjmO1psH9vwBdwugjBv4BafHBJgd4S8rJcvMkKhC8LAiF9yDTMvUzHAzcz jDsDnE67LTPmQI+HucnhXzCc4uyzqL6LU9n5Och/twvEOO2iMOg= =bRtM -----END PGP SIGNATURE----- --YzdYn+D7cUqe+VA3-- --===============0347905914== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0347905914==--