[PATCH v1 0/2] debugfs support for pt base for each vm

Christian König christian.koenig at amd.com
Fri Jun 13 09:00:23 UTC 2025



On 6/13/25 09:15, Sunil Khatri wrote:
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/clients
>              command  tgid dev master a   uid      magic                                                             name client-id
>       systemd-logind  1056   0   y    y     0          0                                                          <unset>     5
>             Xwayland  1733 128   n    n   120          0                                                          <unset>     8
>      mutter-x11-fram  2048 128   n    n   120          0                                                          <unset>     9
>             ibus-x11  2071 128   n    n   120          0                                                          <unset>    10
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client
> client-1/  client-10/ client-2/  client-5/  client-8/  client-9/  clients
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-1
> client-1/  client-10/
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-1
> client-1/  client-10/
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-1/pt_base
> 81febf3000
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-5/pt_base
> 81febe9000
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-8/pt_base
> 81febdc000
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-9/pt_base
> 81febb2000
> root at amd-X570-AORUS-ELITE:~# cat /sys/kernel/debug/dri/0/client-10/pt_base
> 81febaf000

First of all move the client-* directories one directory up.

You put the directory under the debugfs directory of the device, but the idea here is that we can lockup the client device independent.

If we want to know which device a client belongs to we can easily add a symlink from the client subdirectory to the device (probably a good idea).

Regards,
Christian.

> 
> 
> Sunil Khatri (2):
>   drm: add debugfs support per client-id
>   amdgpu: add debugfs file for pt-base per client-id
> 
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |  2 +-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c  | 14 +++++++++++++-
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h  |  4 +++-
>  drivers/gpu/drm/drm_file.c              | 13 +++++++++++++
>  include/drm/drm_file.h                  |  7 +++++++
>  5 files changed, 37 insertions(+), 3 deletions(-)
> 



More information about the dri-devel mailing list