search for: debugfs_lookup

Displaying 12 results from an estimated 12 matches for "debugfs_lookup".

2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...> > r535_gsp_retain_logging() will just keep going trying to create debugfs > > entries, because a root of NULL is actually valid, and the entries are > > created in /sys/kernel/debug/0000:65:00.0/ instead of > > /sys/kernel/debug/dri/0000:65:00.0/ > > This is because debugfs_lookup() doesn't return an ERR_PTR, but NULL. It'd > probably better go along with what is documented in [1] if debugfs_lookup() > would return ERR_PTR(-ENOENT) if no entry was found. > > (This is where I was heading to in my previous reply.) So I'm not sure what you're askin...
2024 Jul 31
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...;gsp->blob_rm)) { > > > + nvkm_warn(&gsp->subdev, "all logging buffers are empty\n"); > > > + return; > > > + } > > > + > > > + /* Find the 'dri' root debugfs entry. Every GPU has a dentry under it */ > > > + root = debugfs_lookup("dri", NULL); > > > + if (IS_ERR(root)) { > > > > I don't think this can ever happen. This entry is created in drm_core_init(). Oh, I see how this reads. I think I didn't quite finish the reply. Sorry for the confusion. > > So first, the check is wro...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...b_rm) && is_empty(&gsp->blob_rm)) { > > + nvkm_warn(&gsp->subdev, "all logging buffers are empty\n"); > > + return; > > + } > > + > > + /* Find the 'dri' root debugfs entry. Every GPU has a dentry under it */ > > + root = debugfs_lookup("dri", NULL); > > + if (IS_ERR(root)) { > > I don't think this can ever happen. This entry is created in drm_core_init(). So first, the check is wrong. It should be "if (!root)". However, I think it can happen. drm_core_init() does not fail if debugfs_create...
2020 Feb 27
0
[PATCH 09/21] drm/nouveau: remove checks for return value of debugfs functions
...ret) - return ret; + drm_debugfs_create_files(nouveau_debugfs_list, + NOUVEAU_DEBUGFS_ENTRIES, + minor->debugfs_root, minor); /* Set the size of the vbios since we know it, and it's confusing to * userspace if it wants to seek() but the file has a length of 0 */ dentry = debugfs_lookup("vbios.rom", minor->debugfs_root); if (!dentry) - return 0; + return; d_inode(dentry)->i_size = drm->vbios.length; dput(dentry); - - return 0; } int diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.h b/drivers/gpu/drm/nouveau/nouveau_debugfs.h index 8909c010e8ea...
2018 Aug 28
0
[PATCH v2 3/4] drm/dp_mst: Add dp_mst_status debugfs node for all drivers
..._debugfs_init_data *init_data = data; + struct drm_dp_mst_topology_mgr *mgr = init_data->mgr; + struct drm_minor *minor = mgr->dev->primary; + struct dentry *root; + bool put_ref = false; + + /* Create the dp_mst directory for this device if it doesn't exist + * already + */ + root = debugfs_lookup("dp_mst", minor->debugfs_root); + if (root) { + put_ref = true; + } else { + root = debugfs_create_dir("dp_mst", minor->debugfs_root); + if (!root || IS_ERR(root)) + return; + } + + mgr->debugfs = debugfs_create_dir(init_data->connector_name, root); + if (!mgr-&...
2018 Sep 19
3
[PATCH 0/2] drm/nouveau: Allow parsing vbios.rom with nvbios from debugfs
This is a small patch series that adds a strap_peek file into our debugfs, and sets the size of the vbios.rom debugfs file so that nvbios can easily be used to parse the vbios even on systems where the normal BIOS retrieval methods (for example, laptops that need ACPI to access the vbios for the nvidia GPU) won't work. This should make it a little easier to collect vbioses. Lyude Paul (2):
2024 Aug 02
1
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release the buffer without needing the nvkm_gsp. This is needed so that we can retain DMA buffers even after the nvkm_gsp object is deleted. Signed-off-by: Timur Tabi <ttabi at nvidia.com> --- Notes: v2: added get/put_device calls
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...is_empty(&gsp->blob_rm) && is_empty(&gsp->blob_rm)) { > + nvkm_warn(&gsp->subdev, "all logging buffers are empty\n"); > + return; > + } > + > + /* Find the 'dri' root debugfs entry. Every GPU has a dentry under it */ > + root = debugfs_lookup("dri", NULL); > + if (IS_ERR(root)) { I don't think this can ever happen. This entry is created in drm_core_init(). > + /* No debugfs, or no root dentry for DRM */ > + nvkm_warn(&gsp->subdev, "could not find debugfs dri root\n"); > + return; > + }...
2024 Jul 29
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...sp->blob_intr) && + is_empty(&gsp->blob_rm) && is_empty(&gsp->blob_rm)) { + nvkm_warn(&gsp->subdev, "all logging buffers are empty\n"); + return; + } + + /* Find the 'dri' root debugfs entry. Every GPU has a dentry under it */ + root = debugfs_lookup("dri", NULL); + if (IS_ERR(root)) { + /* No debugfs, or no root dentry for DRM */ + nvkm_warn(&gsp->subdev, "could not find debugfs dri root\n"); + return; + } + + /* Create a new debugfs root. It has the same name as the old one */ + dir = debugfs_create_dir(dev_name(...
2024 Jun 12
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release the buffer without needing the nvkm_gsp. This is needed so that we can retain DMA buffers even after the nvkm_gsp object is deleted. Signed-off-by: Timur Tabi <ttabi at nvidia.com> --- v2: rebased to drm-misc-next
2018 Aug 28
4
[PATCH v2 0/4] drm/dp_mst: Add DP MST debugfs nodes for all drivers
This is the next version of my patch series for teaching DRM how to automatically create debugfs nodes for drivers with MST topologies. This was originally intended just for nouveau, but has since been expanded to all DRM drivers. Changes since previous version: - Fix documentation error that got noticed by the kbuild bot in "drm/dp_mst: Pass entire connector to
2024 Jul 29
2
[PATCH 1/2] [v2] drm/nouveau: retain device pointer in nvkm_gsp_mem object
Store the struct device pointer used to allocate the DMA buffer in the nvkm_gsp_mem object. This allows nvkm_gsp_mem_dtor() to release the buffer without needing the nvkm_gsp. This is needed so that we can retain DMA buffers even after the nvkm_gsp object is deleted. Signed-off-by: Timur Tabi <ttabi at nvidia.com> v2: added get/put_device calls ---