summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_debug.h
diff options
context:
space:
mode:
authorJonathan Kim <jonathan.kim@amd.com>2022-04-06 19:03:31 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 19:35:58 +0300
commit44b87bb0836c65d1b9d21b01503eb6e9b9297771 (patch)
treeb6cc3c68fa63ea1bff4ac649f2705b31514eec8f /drivers/gpu/drm/amd/amdkfd/kfd_debug.h
parent69a8c3ae2dea84a6d571e4c1aad306f630f3ccfd (diff)
downloadlinux-44b87bb0836c65d1b9d21b01503eb6e9b9297771.tar.xz
drm/amdkfd: add raise exception event function
Exception events can be generated from interrupts or queue activitity. The raise event function will save exception status of a queue, device or process then notify the debugger of the status change by writing to a debugger polled file descriptor that the debugger provides during debug attach. For memory violation exceptions, extra exception data will be saved. The debugger will be able to query the saved exception states by query operation that will be provided by follow up patches. 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_debug.h b/drivers/gpu/drm/amd/amdkfd/kfd_debug.h
index 3e56225f6ef6..66ee7b95d08a 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_debug.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_debug.h
@@ -25,6 +25,11 @@
#include "kfd_priv.h"
+bool kfd_dbg_ev_raise(uint64_t event_mask,
+ struct kfd_process *process, struct kfd_node *dev,
+ unsigned int source_id, bool use_worker,
+ void *exception_data,
+ size_t exception_data_size);
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,
@@ -35,6 +40,8 @@ static inline bool kfd_dbg_is_per_vmid_supported(struct kfd_node *dev)
KFD_GC_VERSION(dev) >= IP_VERSION(11, 0, 0);
}
+void debug_event_write_work_handler(struct work_struct *work);
+
/*
* If GFX off is enabled, chips that do not support RLC restore for the debug
* registers will disable GFX off temporarily for the entire debug session.