From: "Maíra Canal" <mcanal@igalia.com>
To: "Daniel Vetter" <daniel@ffwll.ch>,
"David Airlie" <airlied@gmail.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Brian Starkey" <brian.starkey@arm.com>,
"Noralf Trønnes" <noralf@tronnes.org>,
"Melissa Wen" <mwen@igalia.com>,
"Rodrigo Siqueira" <rodrigosiqueiramelo@gmail.com>,
"Jani Nikula" <jani.nikula@linux.intel.com>
Cc: "Maíra Canal" <mcanal@igalia.com>,
"André Almeida" <andrealmeid@igalia.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v3 0/6] drm/debugfs: Make the debugfs structure more generic
Date: Tue, 31 Jan 2023 16:58:20 -0300 [thread overview]
Message-ID: <20230131195825.677487-1-mcanal@igalia.com> (raw)
This series is the first step to introduce a debugfs structure to KMS objects
and it is inspired by the feedback provided in [1]. Thanks, Jani and Daniel for
all the feedback provided!
This first step is making the current API more generic and preparing it to
receive the KMS objects in the future. Moreover, this will help to avoid
copypasting when expanding the API.
Make the debug structure more generic by:
- Passing the right pointer to the functions as an explicit parameter. So, the
show function signature should be
int show(struct seq_file *m, struct drm_device *dev, void *data)
Note that with this approach, the show callback doesn't need to use the struct
drm_debugfs_entry anymore.
- Switch the pointer in struct drm_debugfs_entry to void *, so that, in the
future, the struct drm_debugfs_entry can receive different types of DRM
objects (struct drm_device, struct drm_connector, struct drm_crtc...).
- Switch the show callback pointer to void * and cast it in the show callback
wrapper. This way in the future we can create different callback wrappers and
cast each one to the proper function signature.
- Add a struct wrapper for debugfs_list and debugfs_mutex, and also create
helpers to init the list, destroy the list, register the list's files and add
files to the list.
v1 -> v2: https://lore.kernel.org/dri-devel/20230116102815.95063-1-mcanal@igalia.com/T/
- Use forward declaration instead of the header (Jani Nikula).
- Make the struct drm_debugfs_files a pointer in struct drm_device (Jani Nikula).
- Change the parameter order of `drm_debugfs_files_add` (Jani Nikula).
- s/struct drm_debugfs_list/struct drm_debugfs_files (Jani Nikula).
v2 -> v3: https://lore.kernel.org/dri-devel/20230130123008.287141-1-mcanal@igalia.com/T/
- Fix compilation errors for CONFIG_DEBUG_FS=n (kernel test robot).
[1] https://lore.kernel.org/dri-devel/20230111173748.752659-1-mcanal@igalia.com/T/
Best Regards,
- Maíra Canal
Maíra Canal (6):
drm/debugfs: Introduce wrapper for debugfs list
drm/debugfs: Make drm_device use the struct drm_debugfs_files
drm/debugfs: Create wrapper to add files to debugfs list
drm/debugfs: Create wrapper to register debugfs
drm/debugfs: Make the show callback pass the pointer to the right
object
drm/debugfs: Make the struct drm_debugfs_entry independent of DRM
device
drivers/gpu/drm/arm/hdlcd_drv.c | 8 +--
drivers/gpu/drm/drm_atomic.c | 4 +-
drivers/gpu/drm/drm_client.c | 5 +-
drivers/gpu/drm/drm_debugfs.c | 81 +++++++++++++++++----------
drivers/gpu/drm/drm_drv.c | 7 ++-
drivers/gpu/drm/drm_framebuffer.c | 4 +-
drivers/gpu/drm/drm_gem_vram_helper.c | 5 +-
drivers/gpu/drm/drm_internal.h | 12 ++++
drivers/gpu/drm/gud/gud_drv.c | 5 +-
drivers/gpu/drm/v3d/v3d_debugfs.c | 16 ++----
drivers/gpu/drm/vc4/vc4_bo.c | 4 +-
drivers/gpu/drm/vc4/vc4_debugfs.c | 6 +-
drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +-
drivers/gpu/drm/vc4/vc4_hvs.c | 8 +--
drivers/gpu/drm/vc4/vc4_v3d.c | 4 +-
drivers/gpu/drm/vkms/vkms_drv.c | 4 +-
include/drm/drm_debugfs.h | 34 ++++++++---
include/drm/drm_device.h | 12 +---
18 files changed, 120 insertions(+), 105 deletions(-)
--
2.39.1
next reply other threads:[~2023-01-31 20:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-31 19:58 Maíra Canal [this message]
2023-01-31 19:58 ` [PATCH v3 1/6] drm/debugfs: Introduce wrapper for debugfs list Maíra Canal
2023-02-08 18:06 ` Daniel Vetter
2023-02-08 18:19 ` Daniel Vetter
2023-02-08 18:39 ` Maíra Canal
2023-02-08 18:58 ` Daniel Vetter
2023-01-31 19:58 ` [PATCH v3 2/6] drm/debugfs: Make drm_device use the struct drm_debugfs_files Maíra Canal
2023-01-31 19:58 ` [PATCH v3 3/6] drm/debugfs: Create wrapper to add files to debugfs list Maíra Canal
2023-01-31 19:58 ` [PATCH v3 4/6] drm/debugfs: Create wrapper to register debugfs Maíra Canal
2023-01-31 19:58 ` [PATCH v3 5/6] drm/debugfs: Make the show callback pass the pointer to the right object Maíra Canal
2023-02-08 18:12 ` Daniel Vetter
2023-02-08 18:17 ` Daniel Vetter
2023-02-08 19:16 ` Maíra Canal
2023-01-31 19:58 ` [PATCH v3 6/6] drm/debugfs: Make the struct drm_debugfs_entry independent of DRM device Maíra Canal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230131195825.677487-1-mcanal@igalia.com \
--to=mcanal@igalia.com \
--cc=airlied@gmail.com \
--cc=andrealmeid@igalia.com \
--cc=brian.starkey@arm.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=noralf@tronnes.org \
--cc=rodrigosiqueiramelo@gmail.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.