[PATCH 2/2] [v7] drm/nouveau: expose GSP-RM logging buffers via debugfs
Danilo Krummrich
dakr at kernel.org
Sat Aug 3 09:27:22 UTC 2024
On Sat, Aug 03, 2024 at 03:23:48AM +0000, Timur Tabi wrote:
> On Sat, 2024-08-03 at 02:00 +0200, Danilo Krummrich wrote:
> > > + /* Each GPU has a subdir based on its device name, so find it */
> > > + struct drm_device *drm_dev = dev_get_drvdata(dev);
> >
> > In drm-misc-next dev_get_drvdata() returns a struct nouveau_drm.
> > Interestingly,
> > things do not blow up however.
> >
> > Instead, I noticed that your debugfs entries are created in the debugfs
> > root,
> > instead of "dri/<PCI_ID>/".
>
> Woah.
>
> > I think we shouldn't try to use the DRI debugfs directory anyway to avoid
> > DRM
> > layer dependencies in nvkm. Let's create our own nouveau one, like you did
> > in
> > earlier versions of this patch.
>
> So what path should I use?
I think we should just create "nouveau/<PCI_ID>/" instead and not mess with the
DRI stuff at all.
>
> So what it's supposed to do is create a sort of "shadow" dri/<PCI_ID>/ path
> that overlays the existing one. So when the module deletes the original
> dri/<PCI_ID>/, the one I create replaces it automatically. I think it's a
> neat feature. The path to the debugfs entries stays the same whether or not
> they're migrated.
>
> > Please also make sure to test your patches on a recent drm-misc-next branch.
>
> Will do.
More information about the Nouveau
mailing list