aboutsummaryrefslogtreecommitdiff
path: root/include/drm/drm_device.h
diff options
context:
space:
mode:
authorGravatar Maíra Canal <mcanal@igalia.com> 2022-12-19 09:06:15 -0300
committerGravatar Maíra Canal <mairacanal@riseup.net> 2022-12-22 14:56:28 -0300
commit1c9cacbea880513a896aee65a5c58007bcb55653 (patch)
tree215f9fa061e360c2223b810af82baa99331f523f /include/drm/drm_device.h
parentdrm/ast: Init iosys_map pointer as I/O memory for damage handling (diff)
downloadlinux-1c9cacbea880513a896aee65a5c58007bcb55653.tar.gz
linux-1c9cacbea880513a896aee65a5c58007bcb55653.tar.bz2
linux-1c9cacbea880513a896aee65a5c58007bcb55653.zip
drm/debugfs: create device-centered debugfs functions
Introduce the ability to track requests for the addition of DRM debugfs files at any time and have them added all at once during drm_dev_register(). Drivers can add DRM debugfs files to a device-managed list and, during drm_dev_register(), all added files will be created at once. Now, the drivers can use the functions drm_debugfs_add_file() and drm_debugfs_add_files() to create DRM debugfs files instead of using the drm_debugfs_create_files() function. Co-developed-by: Wambui Karuga <wambui.karugax@gmail.com> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Melissa Wen <mwen@igalia.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Maíra Canal <mairacanal@riseup.net> Link: https://patchwork.freedesktop.org/patch/msgid/20221219120621.15086-2-mcanal@igalia.com
Diffstat (limited to 'include/drm/drm_device.h')
-rw-r--r--include/drm/drm_device.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
index 9923c7a6885e..fa6af1d57929 100644
--- a/include/drm/drm_device.h
+++ b/include/drm/drm_device.h
@@ -295,6 +295,21 @@ struct drm_device {
*/
struct drm_fb_helper *fb_helper;
+ /**
+ * @debugfs_mutex:
+ *
+ * Protects &debugfs_list access.
+ */
+ struct mutex debugfs_mutex;
+
+ /**
+ * @debugfs_list:
+ *
+ * List of debugfs files to be created by the DRM device. The files
+ * must be added during drm_dev_register().
+ */
+ struct list_head debugfs_list;
+
/* Everything below here is for legacy driver, never use! */
/* private: */
#if IS_ENABLED(CONFIG_DRM_LEGACY)