All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] drm/debugfs: Make the debugfs structure more generic
@ 2023-01-16 10:28 Maíra Canal
  2023-01-16 10:28 ` [PATCH 1/6] drm/debugfs: Introduce wrapper for debugfs list Maíra Canal
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Maíra Canal @ 2023-01-16 10:28 UTC (permalink / raw)
  To: Daniel Vetter, David Airlie, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Liviu Dudau, Brian Starkey,
	Noralf Trønnes, Emma Anholt, Melissa Wen, Rodrigo Siqueira,
	Jani Nikula
  Cc: Maíra Canal, André Almeida, dri-devel

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.

[1] https://lore.kernel.org/dri-devel/20230111173748.752659-1-mcanal@igalia.com/T/

Any feedback is welcomed!

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_list
  drm/debugfs: Create wrapper to add files to debugfs list
  drm/debugfs: Create wrapper to register debugfs
  drm/debugfs: Make the struct drm_debugfs_entry independent of DRM
    device
  drm/debugfs: Make the show callback pass the pointer to the right
    object

 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         | 74 ++++++++++++++++-----------
 drivers/gpu/drm/drm_drv.c             |  7 +--
 drivers/gpu/drm/drm_framebuffer.c     |  4 +-
 drivers/gpu/drm/drm_gem_vram_helper.c |  2 +-
 drivers/gpu/drm/drm_internal.h        | 11 ++++
 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              | 10 +---
 18 files changed, 110 insertions(+), 102 deletions(-)

-- 
2.39.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-01-16 11:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-16 10:28 [PATCH 0/6] drm/debugfs: Make the debugfs structure more generic Maíra Canal
2023-01-16 10:28 ` [PATCH 1/6] drm/debugfs: Introduce wrapper for debugfs list Maíra Canal
2023-01-16 10:28 ` [PATCH 2/6] drm/debugfs: Make drm_device use the struct drm_debugfs_list Maíra Canal
2023-01-16 10:58   ` Jani Nikula
2023-01-16 10:28 ` [PATCH 3/6] drm/debugfs: Create wrapper to add files to debugfs list Maíra Canal
2023-01-16 10:59   ` Jani Nikula
2023-01-16 10:28 ` [PATCH 4/6] drm/debugfs: Create wrapper to register debugfs Maíra Canal
2023-01-16 10:28 ` [PATCH 5/6] drm/debugfs: Make the struct drm_debugfs_entry independent of DRM device Maíra Canal
2023-01-16 10:28 ` [PATCH 6/6] drm/debugfs: Make the show callback pass the pointer to the right object Maíra Canal

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.