Displaying 20 results from an estimated 40 matches for "debugfs_root".
2020 Feb 18
1
[PATCH] drm/nouveau: remove checks for return value of debugfs functions
...minor *minor)
{
struct nouveau_drm *drm = nouveau_drm(minor->dev);
struct dentry *dentry;
- int i, ret;
+ int i;
for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
- dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
- S_IRUGO | S_IWUSR,
- minor->debugfs_root, minor->dev,
- nouveau_debugfs_files[i].fops);
- if (!dentry)
- return -ENOMEM;
+ debugfs_create_file(nouveau_debugfs_files[i].name,
+ S_IRUGO | S_IWUSR,
+ minor->debugfs_root, minor->dev,
+ nouveau_debugfs_files[i].fops);
}
- ret = drm_debugfs_create_...
2020 Feb 27
0
[PATCH 09/21] drm/nouveau: remove checks for return value of debugfs functions
...minor *minor)
{
struct nouveau_drm *drm = nouveau_drm(minor->dev);
struct dentry *dentry;
- int i, ret;
+ int i;
for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
- dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
- S_IRUGO | S_IWUSR,
- minor->debugfs_root, minor->dev,
- nouveau_debugfs_files[i].fops);
- if (!dentry)
- return -ENOMEM;
+ debugfs_create_file(nouveau_debugfs_files[i].name,
+ S_IRUGO | S_IWUSR,
+ minor->debugfs_root, minor->dev,
+ nouveau_debugfs_files[i].fops);
}
- ret = drm_debugfs_create_...
2018 Aug 28
0
[PATCH v2 1/4] drm/debugfs: Add support for dynamic debugfs initialization
...oid (*cleanup_cb)(void *),
+ void *data, struct drm_debugfs_callback **out)
+{
+ int ret = 0;
+
+ mutex_lock(&minor->debugfs_callback_lock);
+ if (minor->debugfs_callbacks_done) {
+ /* debugfs is already setup, so just handle the callback
+ * immediately
+ */
+ if (minor->debugfs_root)
+ (*init)(data);
+ (*cleanup_cb)(data);
+ goto out_unlock;
+ }
+
+ *out = kzalloc(sizeof(**out), GFP_KERNEL);
+ if (!*out) {
+ ret = -ENOMEM;
+ goto out_unlock;
+ }
+
+ (*out)->init = init;
+ (*out)->cleanup_cb = cleanup_cb;
+ (*out)->data = data;
+ list_add(&(*out)->list, &a...
2018 May 24
3
[PATCH] gpu: Consistently use octal not symbolic permissions
.../drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 69a2b25b3696..696a2617930f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -2160,11 +2160,10 @@ static int amdgpu_ttm_debugfs_init(struct amdgpu_device *adev)
struct dentry *ent, *root = minor->debugfs_root;
for (count = 0; count < ARRAY_SIZE(ttm_debugfs_entries); count++) {
- ent = debugfs_create_file(
- ttm_debugfs_entries[count].name,
- S_IFREG | S_IRUGO, root,
- adev,
- ttm_debugfs_entries[count].fops);
+ ent = debugfs_create_file(ttm_debugfs_entries[count].name,
+ S_IFR...
2018 May 25
0
[PATCH] gpu: Consistently use octal not symbolic permissions
...u/amdgpu_ttm.c
> index 69a2b25b3696..696a2617930f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -2160,11 +2160,10 @@ static int amdgpu_ttm_debugfs_init(struct amdgpu_device *adev)
> struct dentry *ent, *root = minor->debugfs_root;
>
> for (count = 0; count < ARRAY_SIZE(ttm_debugfs_entries); count++) {
> - ent = debugfs_create_file(
> - ttm_debugfs_entries[count].name,
> - S_IFREG | S_IRUGO, root,
> - adev,
> - ttm_debugfs_entries[count].fops);
> + ent = debugfs_create_file(ttm_...
2020 Feb 09
3
[PATCH] nouveau: no need to check return value of debugfs_create functions
...veau_debugfs.c
@@ -224,14 +224,10 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
struct dentry *dentry;
int i;
- for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
- dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
- S_IRUGO | S_IWUSR,
- minor->debugfs_root, minor->dev,
- nouveau_debugfs_files[i].fops);
- if (!dentry)
- return -ENOMEM;
- }
+ for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++)
+ debugfs_create_file(nouveau_debugfs_files[i].name,
+ S_IRUGO | S_IWUSR, minor->debugfs_root,
+ minor->dev, nouveau_d...
2020 Mar 10
0
[PATCH v2 11/17] drm/nouveau: make nouveau_drm_debugfs_init() return 0
...minor *minor)
{
struct nouveau_drm *drm = nouveau_drm(minor->dev);
struct dentry *dentry;
- int i, ret;
+ int i;
for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
- dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
- S_IRUGO | S_IWUSR,
- minor->debugfs_root, minor->dev,
- nouveau_debugfs_files[i].fops);
- if (!dentry)
- return -ENOMEM;
+ debugfs_create_file(nouveau_debugfs_files[i].name,
+ S_IRUGO | S_IWUSR,
+ minor->debugfs_root, minor->dev,
+ nouveau_debugfs_files[i].fops);
}
- ret = drm_debugfs_create_...
2011 Oct 30
1
[PATCH] drm: serialize access to debugs_nodes.list
...inor->debugfs_nodes.mutex);
}
return 0;
@@ -149,6 +151,7 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
int ret;
INIT_LIST_HEAD(&minor->debugfs_nodes.list);
+ mutex_init(&minor->debugfs_nodes.mutex);
sprintf(name, "%d", minor_id);
minor->debugfs_root = debugfs_create_dir(name, root);
if (!minor->debugfs_root) {
@@ -194,6 +197,7 @@ int drm_debugfs_remove_files(struct drm_info_list *files, int count,
struct drm_info_node *tmp;
int i;
+ mutex_lock(&minor->debugfs_nodes.mutex);
for (i = 0; i < count; i++) {
list_for_each_s...
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
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):
2015 Nov 09
0
[PATCH v2 1/5] debugfs: add infrastructure to add files with other fops than only read
...debugfs_files *ndf)
+{
+ struct drm_info_node *node;
+
+ node = kmalloc(sizeof(*node), GFP_KERNEL);
+
+ if (node == NULL)
+ return -ENOMEM;
+
+ node->minor = minor;
+ node->info_ent = (const void *)ndf->fops;
+ node->dent = debugfs_create_file(ndf->name, S_IRUGO | S_IWUSR, minor->debugfs_root,
+ node, ndf->fops);
+
+ if (!node->dent) {
+ kfree(node);
+ return -ENOMEM;
+ }
+
+ mutex_lock(&minor->debugfs_lock);
+ list_add(&node->list, &minor->debugfs_list);
+ mutex_unlock(&minor->debugfs_lock);
+
+ return 0;
+}
+
int
nouveau_debugfs_init(struct drm_...
2019 Jun 13
0
[PATCH] nouveau: no need to check return value of debugfs_create functions
...debugfs.c
@@ -224,14 +224,10 @@ nouveau_drm_debugfs_init(struct drm_minor *minor)
struct dentry *dentry;
int i, ret;
- for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
- dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
- S_IRUGO | S_IWUSR,
- minor->debugfs_root, minor->dev,
- nouveau_debugfs_files[i].fops);
- if (!dentry)
- return -ENOMEM;
- }
+ for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++)
+ debugfs_create_file(nouveau_debugfs_files[i].name,
+ S_IRUGO | S_IWUSR, minor->debugfs_root,
+ minor->dev, nouveau_d...
2018 Aug 28
0
[PATCH v2 3/4] drm/dp_mst: Add dp_mst_status debugfs node for all drivers
...t 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->debugfs)
+ goto out_dput;
+
+ debugfs_c...
2020 Feb 13
2
[PATCH] nouveau: no need to check return value of debugfs_create functions
...@ nouveau_drm_debugfs_init(struct drm_minor *minor)
> struct dentry *dentry;
> int i;
>
> - for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) {
> - dentry = debugfs_create_file(nouveau_debugfs_files[i].name,
> - S_IRUGO | S_IWUSR,
> - minor->debugfs_root, minor->dev,
> - nouveau_debugfs_files[i].fops);
> - if (!dentry)
> - return -ENOMEM;
> - }
> + for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++)
> + debugfs_create_file(nouveau_debugfs_files[i].name,
> + S_IRUGO | S_IWUSR, minor->debugfs_root...
2011 Oct 09
11
[PATCH 01/10]: nouveau: assorted fixes
Hi,
Here is my patch queue I accumulated over quite a long time.
Patches 1-6 are bugfixes, and rest is mostly RFC.
Comments are welcome.
Best regards,
Maxim Levitsky
2024 Oct 29
1
[PATCH 2/2] [v8] drm/nouveau: expose GSP-RM logging buffers via debugfs
...struct debugfs_blob_wrapper *blob)
> > +{
> > + struct dentry *dir;
>
> I think `dir` is confusing, what about `dent` or `entry`?
Here's a count of the most popular names for this type:
10 struct dentry *ddir;
18 struct dentry *d;
21 struct dentry *debugfs_root;
31 struct dentry *dbgfs_dir;
39 struct dentry *debugfs_dir;
50 struct dentry *dentry;
55 struct dentry *debugfs;
55 struct dentry *dir;
64 struct dentry *root;
As you can see, 'dir' is the second most popular name. So I think it's
fine.
Besides, c...
2024 Jul 30
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...ct dentry *dir_intr = NULL, *dir_rm = NULL, *dir_pmu = NULL;
> + struct device *dev = gsp->subdev.device->dev;
> +
> + /* Each GPU has a subdir based on its device name, so find it */
> + struct drm_device *drm_dev = dev_get_drvdata(dev);
> +
> + if (!drm_dev || !drm_dev->debugfs_root) {
I don't think we need any of those checks, please remove them.
> + nvkm_error(&gsp->subdev, "could not find debugfs path\n");
> + return;
> + }
> +
> + dir = drm_dev->debugfs_root;
> +
> + gsp->blob_init.data = gsp->loginit.data;
> + gsp-...
2024 Jul 29
1
[PATCH 2/2] [v6] drm/nouveau: expose GSP-RM logging buffers via debugfs
...dentry *dir, *dir_init;
+ struct dentry *dir_intr = NULL, *dir_rm = NULL, *dir_pmu = NULL;
+ struct device *dev = gsp->subdev.device->dev;
+
+ /* Each GPU has a subdir based on its device name, so find it */
+ struct drm_device *drm_dev = dev_get_drvdata(dev);
+
+ if (!drm_dev || !drm_dev->debugfs_root) {
+ nvkm_error(&gsp->subdev, "could not find debugfs path\n");
+ return;
+ }
+
+ dir = drm_dev->debugfs_root;
+
+ gsp->blob_init.data = gsp->loginit.data;
+ gsp->blob_init.size = gsp->loginit.size;
+ gsp->blob_intr.data = gsp->logintr.data;
+ gsp->blob_in...
2015 Nov 09
5
[PATCH v2 0/5] move pstate interface to debugfs
I made a little changes in this series:
1. merge the two last patches together
2. unify the private data interface with the drm debugfs one
now it should be very obvious for a new dev on how to add new files to debugfs
and how to get access to the nouveau structs
Karol Herbst (5):
debugfs: add infrastructure to add files with other fops than only
read
debugfs: rename functions to
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