search for: drm_debugfs_create_files

Displaying 20 results from an estimated 28 matches for "drm_debugfs_create_files".

2020 Feb 18
1
[PATCH] drm/nouveau: remove checks for return value of debugfs functions
As there is no need to check for the return value of debugfs_create_file and drm_debugfs_create_files, remove unnecessary checks and error handling in nouveau_drm_debugfs_init. Signed-off-by: Wambui Karuga <wambui.karugax at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/nouve...
2020 Feb 27
0
[PATCH 09/21] drm/nouveau: remove checks for return value of debugfs functions
Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to ever check for the the return value of debugfs_create_file() and drm_debugfs_create_files(). Therefore, remove unnecessary checks and error handling in nouveau_drm_debugfs_init. These changes also enable nouveau_drm_debugfs_init() to be declared as void. Signed-...
2020 Mar 10
0
[PATCH v2 11/17] drm/nouveau: make nouveau_drm_debugfs_init() return 0
Since 987d65d01356 (drm: debugfs: make drm_debugfs_create_files() never fail), there is no need to ever check for the the return value of debugfs_create_file() and drm_debugfs_create_files(). Therefore, remove unnecessary checks and error handling in nouveau_drm_debugfs_init() and have the function return 0 directly. v2: have nouveau_drm_debugfs_init() return...
2018 Aug 28
0
[PATCH v2 1/4] drm/debugfs: Add support for dynamic debugfs initialization
...llbacks, as they will have already been destroyed + */ + if (!minor->debugfs_callbacks_done) { + cb->cleanup_cb(cb->data); + list_del(&cb->list); + kfree(cb); + } + mutex_unlock(&minor->debugfs_callback_lock); +} +EXPORT_SYMBOL(drm_debugfs_unregister_callback); /** * drm_debugfs_create_files - Initialize a given set of debugfs files for DRM @@ -126,12 +240,24 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count, } EXPORT_SYMBOL(drm_debugfs_create_files); +int drm_debugfs_alloc(struct drm_minor *minor) +{ + INIT_LIST_HEAD(&minor->debugfs_callback_list)...
2020 Feb 09
3
[PATCH] nouveau: no need to check return value of debugfs_create functions
...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_debugfs_files[i].fops); drm_debugfs_create_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES, -- 2.25.0
2015 Nov 09
0
[PATCH v2 1/5] debugfs: add infrastructure to add files with other fops than only read
...;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_minor *minor) { - drm_debugfs_create_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES, + int i, ret; + + for (i = 0; i < ARRAY_SIZE(nouveau_debugfs_files); i++) { + ret = nouveau_debugfs_create_file(minor, &nouveau_debugfs_files[i]); + + if (ret) + return ret; + } + + return drm_debugfs_create_files(nouveau_debugfs_list, NOUVE...
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):
2011 Oct 30
1
[PATCH] drm: serialize access to debugs_nodes.list
...5 +++++ include/drm/drmP.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 9d2668a..1144fbe 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -120,7 +120,9 @@ int drm_debugfs_create_files(struct drm_info_list *files, int count, tmp->minor = minor; tmp->dent = ent; tmp->info_ent = &files[i]; + mutex_lock(&minor->debugfs_nodes.mutex); list_add(&(tmp->list), &(minor->debugfs_nodes.list)); + mutex_unlock(&minor->debugfs_nodes.mutex)...
2023 Jul 20
1
[PATCH drm-misc-next v8 02/12] drm: debugfs: provide infrastructure to dump a DRM GPU VA space
...tinue; + + seq_printf(m, " | 0x%016llx | 0x%016llx | 0x%016llx | 0x%016llx | 0x%016llx\n", + va->va.addr, va->va.range, va->va.addr + va->va.range, + (u64)va->gem.obj, va->gem.offset); + } + + return 0; +} +EXPORT_SYMBOL(drm_debugfs_gpuva_info); /** * drm_debugfs_create_files - Initialize a given set of debugfs files for DRM diff --git a/include/drm/drm_debugfs.h b/include/drm/drm_debugfs.h index 7616f457ce70..cb2c1956a214 100644 --- a/include/drm/drm_debugfs.h +++ b/include/drm/drm_debugfs.h @@ -34,6 +34,22 @@ #include <linux/types.h> #include <linux/seq_f...
2019 Jun 13
0
[PATCH] nouveau: no need to check return value of debugfs_create functions
...au_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_debugfs_files[i].fops); ret = drm_debugfs_create_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES, -- 2.22.0
2020 Feb 13
2
[PATCH] nouveau: no need to check return value of debugfs_create functions
...!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_debugfs_files[i].fops); > > drm_debugfs_create_files(nouveau_debugfs_list, > NOUVEAU_DEBUGFS_ENTRIES, >
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
2020 Apr 15
1
[PATCH 27/59] drm/qxl: Don't use drm_device->dev_private
...list_for_each_entry(bo, &qdev->gem.objects, list) { @@ -83,8 +83,7 @@ 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 @@...
2020 Apr 03
1
[PATCH 31/44] drm/qxl: Don't use drm_device->dev_private
...list_for_each_entry(bo, &qdev->gem.objects, list) { @@ -83,8 +83,7 @@ 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 @@...
2019 Sep 11
4
[PATCH v2 0/4] Merge VRAM MM and GEM VRAM source files
VRAM MM and GEM VRAM are only used with each other. This patch set moves VRAM MM into GEM VRAM source files and cleans up the helper's public interface. Version 2 of the patch set doesn't contain functional changes. I'm reposting due to the rebasing onto the debugfs patches. v2: * updated for debugfs support * fixed typos in comments Thomas Zimmermann (4): drm/vram: Move VRAM
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
2018 May 24
3
[PATCH] gpu: Consistently use octal not symbolic permissions
...minor->debugfs_root, minor->dev, &fops_reg_w); if (!de) return -ENOMEM; diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index b2482818fee8..84c91018a398 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -99,7 +99,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count, ret = -1; goto fail; } - ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, + ent = debugfs_create_file(files[i].name, S_IFREG | 0444, root, tmp, &drm_debugfs_fops); if (!ent) { DRM_ERROR("Cannot create /sys...
2018 May 25
0
[PATCH] gpu: Consistently use octal not symbolic permissions
...;dev, &fops_reg_w); > if (!de) > return -ENOMEM; > diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c > index b2482818fee8..84c91018a398 100644 > --- a/drivers/gpu/drm/drm_debugfs.c > +++ b/drivers/gpu/drm/drm_debugfs.c > @@ -99,7 +99,7 @@ int drm_debugfs_create_files(const struct drm_info_list *files, int count, > ret = -1; > goto fail; > } > - ent = debugfs_create_file(files[i].name, S_IFREG | S_IRUGO, > + ent = debugfs_create_file(files[i].name, S_IFREG | 0444, > root, tmp, &drm_debugfs_fops); > if (!ent)...
2015 Mar 24
10
[PATCH] Add virtio gpu driver.
...e_drv.sync_seq); + return 0; +} + +static struct drm_info_list virtio_gpu_debugfs_list[] = { + { "irq_fence", virtio_gpu_debugfs_irq_info, 0, NULL }, +}; + +#define VIRTIO_GPU_DEBUGFS_ENTRIES ARRAY_SIZE(virtio_gpu_debugfs_list) + +int +virtio_gpu_debugfs_init(struct drm_minor *minor) +{ + drm_debugfs_create_files(virtio_gpu_debugfs_list, + VIRTIO_GPU_DEBUGFS_ENTRIES, + minor->debugfs_root, minor); + return 0; +} + +void +virtio_gpu_debugfs_takedown(struct drm_minor *minor) +{ + drm_debugfs_remove_files(virtio_gpu_debugfs_list, + VIRTIO_GPU_DEBUGFS_ENTRIES, + minor); +} diff --git a/driver...