[PATCH 2/2] [v3] drm/nouveau: expose GSP-RM logging buffers via debugfs

Timur Tabi ttabi at nvidia.com
Tue Feb 13 17:10:30 UTC 2024


On Tue, 2024-02-13 at 17:57 +0100, Danilo Krummrich wrote:

+       struct debugfs_blob_wrapper blob_init;

+       struct debugfs_blob_wrapper blob_intr;

+       struct debugfs_blob_wrapper blob_rm;

+       struct debugfs_blob_wrapper blob_pmu;

+       struct dentry *debugfs_logging_dir;


I think we should not create those from within the nvkm layer, but rather pass

them down through nvkm_device_pci_new().

Should they be created in nvkm_device_pci_new() also, even though we have no idea whether GSP is involved at that point?



Lifecycle wise I think we should ensure that removing the Nouveau kernel module

also cleans up those buffers. Even though keep-gsp-logging is considered unsafe,

we shouldn't leak memory.

I agree, but then there needs to be some way to keep these debugfs entries until the driver unloads.  I don't know how to do that without creating some ugly global variables.



For instance, can we allocate corresponding buffers in the driver layer, copy

things over and keep those buffers until nouveau_drm_exit()? This would also

avoid exposing those DMA buffers via debugfs.

The whole point behind this patch is to expose the buffers via debugfs.  How else should they be exposed?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20240213/e1f9bc7a/attachment.htm>


More information about the Nouveau mailing list