search for: debugfs_root

Displaying 20 results from an estimated 32 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
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
2016 Apr 11
0
[PATCH] nouveau: Switch perms from macros to octal notations, module params readable to everyone
....c @@ -204,7 +204,7 @@ nouveau_debugfs_create_file(struct drm_minor *minor, node->minor = minor; node->info_ent = (const void *)ndf->fops; - node->dent = debugfs_create_file(ndf->name, S_IRUGO | S_IWUSR, + node->dent = debugfs_create_file(ndf->name, 0644, minor->debugfs_root, node, ndf->fops); if (!node->dent) { kfree(node); diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index d06877d..2166bdc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -63,24 +63,24 @@ MODUL...
2020 Apr 15
1
[PATCH 27/59] drm/qxl: Don't use drm_device->dev_private
...@ void qxl_debugfs_init(struct drm_minor *minor) { #if defined(CONFIG_DEBUG_FS) - struct qxl_device *dev = - (struct qxl_device *) minor->dev->dev_private; + struct qxl_device *dev = to_qxl(minor->dev); drm_debugfs_create_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES, minor->debugfs_root, minor); diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 09583a08e141..1082cd5d2fd4 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -221,7 +221,7 @@ static int qxl_add_mode(struct drm_connector *connector, bool p...
2012 Apr 25
5
[PATCH v2 4/4] drm/nouveau: gpu lockup recovery
..._priv->debugfs.reset = NULL; + } +} + + +void nouveau_reset_debugfs_init(struct drm_minor *minor) +{ + struct drm_device *dev = minor->dev; + struct drm_nouveau_private *dev_priv = dev->dev_private; + + dev_priv->debugfs.reset = debugfs_create_file("reset", 0200, + minor->debugfs_root, dev, &nouveau_reset_fops); + if (IS_ERR_OR_NULL(dev_priv->debugfs.reset)) + dev_priv->debugfs.reset = NULL; + +} +#endif + +int nouveau_reset_device(struct drm_device *dev) +{ + struct drm_nouveau_private *dev_priv = dev->dev_private; + + if (mutex_trylock(&dev_priv->reset_loc...
2020 Apr 03
1
[PATCH 31/44] drm/qxl: Don't use drm_device->dev_private
...@ void qxl_debugfs_init(struct drm_minor *minor) { #if defined(CONFIG_DEBUG_FS) - struct qxl_device *dev = - (struct qxl_device *) minor->dev->dev_private; + struct qxl_device *dev = to_qxl(minor->dev); drm_debugfs_create_files(qxl_debugfs_list, QXL_DEBUGFS_ENTRIES, minor->debugfs_root, minor); diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 09583a08e141..1082cd5d2fd4 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -221,7 +221,7 @@ static int qxl_add_mode(struct drm_connector *connector, bool p...