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

Khatri, Sunil sukhatri at amd.com
Fri Jun 13 09:29:36 UTC 2025


On 6/13/2025 2:30 PM, Christian König wrote:
>
> 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.
Isn't it better to have the clients under the corresponding device only 
in that case user dont have to find which device they belong to and we 
dont have to create a symlink too back to the device.
Infact /sys/kernel/debug/dri/0/clients is also drm device specific. If 
we keep it outside then in case of multi gpu from different vendors, it 
will be all mixed up and i am not sure if client-ids are per device. if 
yes, then there is possibility of duplicates over override.

Regards
Sunil
>
> 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