search for: drm_minor

Displaying 20 results from an estimated 70 matches for "drm_minor".

2018 Aug 28
0
[PATCH v2 1/4] drm/debugfs: Add support for dynamic debugfs initialization
...this function should take care to add a symmetric call to + * @drm_debugfs_unregister_callback to handle destroying a registered callback + * in case the resources for the user of this function are destroyed before + * debugfs root is initialized. + * + */ +int +drm_debugfs_register_callback(struct drm_minor *minor, + void (*init)(void *), + void (*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...
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
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
2020 Feb 27
0
[PATCH 09/21] drm/nouveau: remove checks for return value of debugfs functions
...dex 7dfbbbc1beea..63cb5e432f8a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -217,39 +217,33 @@ static const struct nouveau_debugfs_files { {"pstate", &nouveau_pstate_fops}, }; -int +void nouveau_drm_debugfs_init(struct drm_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->debug...
2009 Oct 08
2
[PATCH] drm/nouveau: Add DRM_NOUVEAU_DEBUG option
...bugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -33,7 +33,6 @@ #include "drmP.h" #include "nouveau_drv.h" -#if defined(CONFIG_DEBUG_FS) static int nouveau_debugfs_channel_info(struct seq_file *m, void *data) { @@ -154,4 +153,3 @@ nouveau_debugfs_takedown(struct drm_minor *minor) drm_debugfs_remove_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES, minor); } -#endif diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 327f01a..5e9d38a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouve...
2011 Oct 30
1
[PATCH] drm: serialize access to debugs_nodes.list
...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); } 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 dr...
2015 Nov 09
0
[PATCH v2 1/5] debugfs: add infrastructure to add files with other fops than only read
...rm_info_list nouveau_debugfs_list[] = { }; #define NOUVEAU_DEBUGFS_ENTRIES ARRAY_SIZE(nouveau_debugfs_list) +static const struct nouveau_debugfs_files { + const char *name; + const struct file_operations *fops; +} nouveau_debugfs_files[] = {}; + + +static int +nouveau_debugfs_create_file(struct drm_minor *minor, + const struct nouveau_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->na...
2016 Jan 13
2
[PATCH] debugfs: don't emit parameter names
...ebugfs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drm/nouveau/nouveau_debugfs.h b/drm/nouveau/nouveau_debugfs.h index 52c7161..b8c03ff 100644 --- a/drm/nouveau/nouveau_debugfs.h +++ b/drm/nouveau/nouveau_debugfs.h @@ -34,13 +34,13 @@ nouveau_drm_debugfs_cleanup(struct drm_minor *minor) } static inline int -nouveau_debugfs_init(struct nouveau_drm *) +nouveau_debugfs_init(struct nouveau_drm *drm) { return 0; } static inline void -nouveau_debugfs_fini(struct nouveau_drm *) +nouveau_debugfs_fini(struct nouveau_drm *drm) { } -- 2.7.0
2012 Apr 25
5
[PATCH v2 4/4] drm/nouveau: gpu lockup recovery
...play_dumb_map_offset(struct drm_file *, struct drm_device *, uint32_t handle, uint64_t *offset); int nouveau_display_dumb_destroy(struct drm_file *, struct drm_device *, uint32_t handle); +/* nouveau_reset.c */ +#ifdef CONFIG_DRM_NOUVEAU_DEBUG +void nouveau_reset_debugfs_fini(struct drm_minor *minor); +void nouveau_reset_debugfs_init(struct drm_minor *minor); +#else +static inline void nouveau_reset_debugfs_fini(struct drm_minor *minor) {} +static inline void nouveau_reset_debugfs_init(struct drm_minor *minor) {} +#endif +int nouveau_reset_device(struct drm_device *dev); +static inline...
2009 Oct 08
0
[PATCH] Add an option for Nouveau debugfs output that depends on DEBUG_FS and update help entry for Nouveau KMS
...bugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -33,7 +33,6 @@ #include "drmP.h" #include "nouveau_drv.h" -#if defined(CONFIG_DEBUG_FS) static int nouveau_debugfs_channel_info(struct seq_file *m, void *data) { @@ -154,4 +153,3 @@ nouveau_debugfs_takedown(struct drm_minor *minor) drm_debugfs_remove_files(nouveau_debugfs_list, NOUVEAU_DEBUGFS_ENTRIES, minor); } -#endif diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 327f01a..5e9d38a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouve...
2012 Apr 22
2
[RFC PATCH 5/5] drm/nouveau: gpu lockup recovery
...play_dumb_map_offset(struct drm_file *, struct drm_device *, uint32_t handle, uint64_t *offset); int nouveau_display_dumb_destroy(struct drm_file *, struct drm_device *, uint32_t handle); +/* nouveau_reset.c */ +#ifdef CONFIG_DRM_NOUVEAU_DEBUG +void nouveau_reset_debugfs_fini(struct drm_minor *minor); +void nouveau_reset_debugfs_init(struct drm_minor *minor); +#else +static inline void nouveau_reset_debugfs_fini(struct drm_minor *minor) {} +static inline void nouveau_reset_debugfs_init(struct drm_minor *minor) {} +#endif +int nouveau_reset_device(struct drm_device *dev); +static inline...
2018 May 24
3
[PATCH] gpu: Consistently use octal not symbolic permissions
...== TTM_PL_VRAM) diff --git a/drivers/gpu/drm/armada/armada_debugfs.c b/drivers/gpu/drm/armada/armada_debugfs.c index 6758c3a83de2..9be396e4b6dd 100644 --- a/drivers/gpu/drm/armada/armada_debugfs.c +++ b/drivers/gpu/drm/armada/armada_debugfs.c @@ -118,12 +118,12 @@ int armada_drm_debugfs_init(struct drm_minor *minor) if (ret) return ret; - de = debugfs_create_file("reg", S_IFREG | S_IRUSR, + de = debugfs_create_file("reg", S_IFREG | 0400, minor->debugfs_root, minor->dev, &fops_reg_r); if (!de) return -ENOMEM; - de = debugfs_create_file("reg_wr"...
2018 May 25
0
[PATCH] gpu: Consistently use octal not symbolic permissions
...--git a/drivers/gpu/drm/armada/armada_debugfs.c b/drivers/gpu/drm/armada/armada_debugfs.c > index 6758c3a83de2..9be396e4b6dd 100644 > --- a/drivers/gpu/drm/armada/armada_debugfs.c > +++ b/drivers/gpu/drm/armada/armada_debugfs.c > @@ -118,12 +118,12 @@ int armada_drm_debugfs_init(struct drm_minor *minor) > if (ret) > return ret; > > - de = debugfs_create_file("reg", S_IFREG | S_IRUSR, > + de = debugfs_create_file("reg", S_IFREG | 0400, > minor->debugfs_root, minor->dev, &fops_reg_r); > if (!de) > return -ENOMEM; &...
2020 Feb 09
3
[PATCH] nouveau: no need to check return value of debugfs_create functions
...etions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 080e964d49aa..d1c82fc45a68 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_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...
2020 Feb 18
1
[PATCH] drm/nouveau: remove checks for return value of debugfs functions
...etions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/nouveau_debugfs.c index 7dfbbbc1beea..15a3d40edf02 100644 --- a/drivers/gpu/drm/nouveau/nouveau_debugfs.c +++ b/drivers/gpu/drm/nouveau/nouveau_debugfs.c @@ -222,22 +222,18 @@ nouveau_drm_debugfs_init(struct drm_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->debug...
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):
2019 Jun 14
3
[PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere
....postclose = amdgpu_driver_postclose_kms, diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index af60c6d7a5f4..74240cc1c300 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -135,8 +135,7 @@ static int arcpgu_debugfs_init(struct drm_minor *minor) #endif static struct drm_driver arcpgu_drm_driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | - DRIVER_ATOMIC, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, .name = "arcpgu", .desc = "ARC PGU Controller", .date...
2019 Jun 14
3
[PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere
....postclose = amdgpu_driver_postclose_kms, diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index af60c6d7a5f4..74240cc1c300 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -135,8 +135,7 @@ static int arcpgu_debugfs_init(struct drm_minor *minor) #endif static struct drm_driver arcpgu_drm_driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | - DRIVER_ATOMIC, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, .name = "arcpgu", .desc = "ARC PGU Controller", .date...
2019 Jun 14
3
[PATCH 06/59] drm/prime: Actually remove DRIVER_PRIME everywhere
....postclose = amdgpu_driver_postclose_kms, diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c index af60c6d7a5f4..74240cc1c300 100644 --- a/drivers/gpu/drm/arc/arcpgu_drv.c +++ b/drivers/gpu/drm/arc/arcpgu_drv.c @@ -135,8 +135,7 @@ static int arcpgu_debugfs_init(struct drm_minor *minor) #endif static struct drm_driver arcpgu_drm_driver = { - .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME | - DRIVER_ATOMIC, + .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, .name = "arcpgu", .desc = "ARC PGU Controller", .date...
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