drm/amdkfd: add debug device snapshot operation
authorJonathan Kim <jonathan.kim@amd.com>
Tue, 10 May 2022 16:47:45 +0000 (12:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:37:00 +0000 (12:37 -0400)
commit12976e6a5ab8fc3766c0304d72f7eec81a109b55
tree2443653672cec2d8f1f011d8bc1e149e1ce661ed
parentb17bd5dbf64677682a3bca249c64521d5eabcb38
drm/amdkfd: add debug device snapshot operation

Similar to queue snapshot, return an array of device information using
an entry_size check and return.
Unlike queue snapshots, the debugger needs to pass to correct number of
devices that exist.  If it fails to do so, the KFD will return the
number of actual devices so that the debugger can make a subsequent
successful call.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_debug.c
drivers/gpu/drm/amd/amdkfd/kfd_debug.h