diff options
author | Jonathan Kim <jonathan.kim@amd.com> | 2022-04-04 19:38:11 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-06-09 18:35:39 +0200 |
commit | 0de4ec9a03537bd2b189b5afbf83acd6b72b0258 (patch) | |
tree | 4d1d99c4bbeb6f9ac0026c7bbf28c6d2e605dd34 /drivers/gpu/drm/amd/amdkfd/kfd_debug.h | |
parent | drm/amdkfd: prepare map process for single process debug devices (diff) | |
download | linux-0de4ec9a03537bd2b189b5afbf83acd6b72b0258.tar.xz linux-0de4ec9a03537bd2b189b5afbf83acd6b72b0258.zip |
drm/amdgpu: prepare map process for multi-process debug devices
Unlike single process debug devices, multi-process debug devices allow
debug mode setting per-VMID (non-device-global).
Because the HWS manages PASID-VMID mapping, the new MAP_PROCESS API allows
the KFD to forward the required SPI debug register write requests.
To request a new debug mode setting change, the KFD must be able to
preempt all queues then remap all queues with these new setting
requests for MAP_PROCESS to take effect.
Note that by default, trap enablement in non-debug mode must be disabled
for performance reasons for multi-process debug devices due to setup
overhead in FW.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_debug.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_debug.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.h b/drivers/gpu/drm/amd/amdkfd/kfd_debug.h index a8abfe2a0a14..db6d72e7930f 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.h @@ -29,4 +29,9 @@ int kfd_dbg_trap_disable(struct kfd_process *target); int kfd_dbg_trap_enable(struct kfd_process *target, uint32_t fd, void __user *runtime_info, uint32_t *runtime_info_size); +static inline bool kfd_dbg_is_per_vmid_supported(struct kfd_node *dev) +{ + return KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 2); +} + #endif |