Skip to content

Introduce debugfs device-centered functions

Maíra Canal dri-devel lkml 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 4 repliesIn review
  2. v36 patches 3 repliesSuperseded
  3. v26 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v16 patches5 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/debugfs: create device-centered debugfs functionsdrivers/gpu/drm/drm_debugfs.c drivers/gpu/drm/drm_drv.c include/drm/drm_debugfs.h +1 more+129 -01 reply
2/7drm: use new debugfs device-centered functions on DRM core filesdrivers/gpu/drm/drm_atomic.c drivers/gpu/drm/drm_client.c drivers/gpu/drm/drm_debugfs.c +2 more+28 -340 replies
3/7drm/debugfs: create debugfs late register functionsdrivers/gpu/drm/drm_debugfs.c drivers/gpu/drm/drm_internal.h drivers/gpu/drm/drm_mode_config.c+21 -00 replies
4/7drm/vc4: use new debugfs device-centered functionsdrivers/gpu/drm/vc4/vc4_bo.c drivers/gpu/drm/vc4/vc4_crtc.c drivers/gpu/drm/vc4/vc4_debugfs.c +8 more+37 -1160 replies
5/7drm/v3d: use new debugfs device-centered functionsdrivers/gpu/drm/v3d/v3d_debugfs.c+10 -120 replies
6/7drm/vkms: use new debugfs device-centered functionsdrivers/gpu/drm/vkms/vkms_drv.c+6 -110 replies
7/7drm/todo: update the debugfs clean up taskDocumentation/gpu/todo.rst+2 -70 replies

Reviews trailers per patch

3 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMaxime RipardMelissa Wen
SeriesR-b
1/7R-b
2/7R-b
3/7
4/7R-b
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/7] Introduce debugfs device-centered functions

This series introduces the initial structure to make DRM debugfs more device-centered and it is the first step to drop the drm_driver->debugfs_init hooks in the future [1].

Currently, DRM debugfs files are created using drm_debugfs_create_files() on request. The first patch of this series makes it possible for DRM devices for creating debugfs files during drm_dev_register(). For it, it introduces two new functions that can be used by the drivers: drm_debugfs_add_files() and drm_debugfs_add_file(). The requests are added to a list and are created all at once during drm_dev_register(). Moreover, the first patch was based on this RFC series [2].

The main difference between the RFC series and the current series is the creation of a new fops structure to accommodate the new structs and, also, the creation of a new drm_debugfs_open. Moreover, the new series uses device-managed allocation, returns memory allocation errors, and converts more drivers to the new structure.

Moreover, since v3, the ability to create debugfs files at late_register hooks was added. In previous versions, modeset components weren't able to create debugfs files at late_register hooks as the registration of drm_minor happens before the registration of the modeset abstractions. So, the third patch fixes this problem by adding a drm_debugfs_late_register() function. Thanks to Melissa Wen for catching this problem!

Apart from the third patch, the series looks similiar from its last version.

[1] https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/todo.rst#n506
[2] https://lore.kernel.org/dri-devel/[email protected]/

Best Regards,
- Maíra Canal

---

v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/T/#t

- Fix compilation errors in the second patch (kernel test robot).
- Drop debugfs_init hook from vkms (Maíra Canal).
- Remove return values and error handling to debugfs related functions (Jani Nikula).
- Remove entry from list after the file is created, so that drm_debugfs_init can be called more than once (Maíra Canal).

v2 -> v3: https://lore.kernel.org/dri-devel/[email protected]/

- Rebase on top of drm-misc-next

v3 -> v4: https://lore.kernel.org/dri-devel/[email protected]/

- Add Maxime's Reviewed-by tags
- Add the ability to create debugfs files at late_register hooks (Melissa Wen).

---

Maíra Canal (7):
drm/debugfs: create device-centered debugfs functions
drm: use new debugfs device-centered functions on DRM core files drm/debugfs: create debugfs late register functions drm/vc4: use new debugfs device-centered functions drm/v3d: use new debugfs device-centered functions drm/vkms: use new debugfs device-centered functions drm/todo: update the debugfs clean up task

 Documentation/gpu/todo.rst            |   9 +--
 drivers/gpu/drm/drm_atomic.c          |  11 ++-
 drivers/gpu/drm/drm_client.c          |  11 ++-
 drivers/gpu/drm/drm_debugfs.c         | 102 +++++++++++++++++++++++---
 drivers/gpu/drm/drm_drv.c             |   3 +
 drivers/gpu/drm/drm_framebuffer.c     |  11 ++-
 drivers/gpu/drm/drm_gem_vram_helper.c |  11 ++-
 drivers/gpu/drm/drm_internal.h        |   5 ++
 drivers/gpu/drm/drm_mode_config.c     |   2 +
 drivers/gpu/drm/v3d/v3d_debugfs.c     |  22 +++---
 drivers/gpu/drm/vc4/vc4_bo.c          |  10 +--
 drivers/gpu/drm/vc4/vc4_crtc.c        |   7 +-
 drivers/gpu/drm/vc4/vc4_debugfs.c     |  36 ++-------
 drivers/gpu/drm/vc4/vc4_dpi.c         |   5 +-
 drivers/gpu/drm/vc4/vc4_drv.c         |   1 -
 drivers/gpu/drm/vc4/vc4_drv.h         |  32 ++------
 drivers/gpu/drm/vc4/vc4_dsi.c         |   6 +-
 drivers/gpu/drm/vc4/vc4_hdmi.c        |  12 +--
 drivers/gpu/drm/vc4/vc4_hvs.c         |  24 ++----
 drivers/gpu/drm/vc4/vc4_v3d.c         |  14 +---
 drivers/gpu/drm/vc4/vc4_vec.c         |   6 +-
 drivers/gpu/drm/vkms/vkms_drv.c       |  17 ++---
 include/drm/drm_debugfs.h             |  41 +++++++++++
 include/drm/drm_device.h              |  15 ++++
 24 files changed, 233 insertions(+), 180 deletions(-)
Signature · 1 line
2.38.1