Skip to content

DRM_SET_CLIENT_NAME ioctl

Pierre-Eric Pelloux-Prayer amd-gfx dri-devel 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 7 repliesIn review
  2. v46 patches 6 repliesSuperseded
  3. v36 patches 16 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v23 patches7 repliesSuperseded
v13 patches6 repliesSuperseded

Changes in v5 from the cover letter

* patches 1, 4 and 6 were slightly reworked based on Tvrtko' suggestions.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6drm: add DRM_SET_CLIENT_NAME ioctldrivers/gpu/drm/drm_debugfs.c drivers/gpu/drm/drm_file.c drivers/gpu/drm/drm_ioctl.c +2 more+92 -40 replies
2/6drm: use drm_file client_name in fdinfoDocumentation/gpu/drm-usage-stats.rst drivers/gpu/drm/drm_file.c+10 -00 replies
3/6drm/amdgpu: delay the use of amdgpu_vm_set_task_infodrivers/gpu/drm/amd/amdgpu/amdgpu_cs.c+3 -30 replies
4/6drm/amdgpu: alloc and init vm::task_info from first submitdrivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+13 -162 replies
5/6drm/amdgpu: make process_name a flexible arraydrivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c drivers/gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +10 more+24 -151 reply
6/6drm/amdgpu: use drm_file::name in task_info::process_descdrivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +3 more+34 -112 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by.

PatchTvrtko UrsulinDmitry OsipenkoChristian König
1/6R-b R-b
2/6R-b R-b
3/6
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/6] DRM_SET_CLIENT_NAME ioctl

v5 of this series which is adding a new ioctl to let userspace associate a free-form name to a drm_file.

Having this name is useful when debugging or tracking resource usage; in particular when using virtio native-context driver, where a single process (say QEMU), uses 1 drm_file per-guest application.
With this change, fdinfo and other tools can map each drm_file activity to the guest application.

virglrenderer MR using this new ioctl to associate the context "debug_name" to the fd:
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1428

Changes since v4:
* patches 1, 4 and 6 were slightly reworked based on Tvrtko' suggestions.

v4: https://lists.freedesktop.org/archives/dri-devel/2024-September/471695.html

Pierre-Eric Pelloux-Prayer (6):
drm: add DRM_SET_CLIENT_NAME ioctl
drm: use drm_file client_name in fdinfo drm/amdgpu: delay the use of amdgpu_vm_set_task_info drm/amdgpu: alloc and init vm::task_info from first submit drm/amdgpu: make process_name a flexible array drm/amdgpu: use drm_file::name in task_info::process_desc

 Documentation/gpu/drm-usage-stats.rst         |  5 ++
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h    |  1 +
 .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c  |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c        |  6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   |  2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_dev_coredump.c  |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c       |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c        | 67 +++++++++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h        |  4 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c        |  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c        |  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c        |  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c         |  2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c         |  2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c        |  2 +-
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c      |  2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_events.c       |  2 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |  3 +
 drivers/gpu/drm/drm_debugfs.c                 | 14 ++--
 drivers/gpu/drm/drm_file.c                    | 10 +++
 drivers/gpu/drm/drm_ioctl.c                   | 51 ++++++++++++++
 include/drm/drm_file.h                        |  9 +++
 include/uapi/drm/drm.h                        | 17 +++++
 23 files changed, 172 insertions(+), 42 deletions(-)
Signature · 1 line
2.40.1