mirror of
https://github.com/torvalds/linux.git
synced 2026-04-30 20:42:33 -04:00
drm/amdkfd: allow debug subscription to lds violations on gfx 1250
GFX 1250 allows the debugger to subcribe to LDS out-of-range read/write memory violations. Bump IOCTL minor version and flag KFD capabilities for enablement hint. 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>
This commit is contained in:
committed by
Alex Deucher
parent
bf2951e967
commit
e83f63da2a
@@ -519,6 +519,7 @@ int kfd_dbg_trap_set_flags(struct kfd_process *target, uint32_t *flags)
|
||||
struct kfd_topology_device *topo_dev =
|
||||
kfd_topology_device_by_id(target->pdds[i]->dev->id);
|
||||
uint32_t caps = topo_dev->node_props.capability;
|
||||
uint32_t caps2 = topo_dev->node_props.capability2;
|
||||
|
||||
if (!(caps & HSA_CAP_TRAP_DEBUG_PRECISE_MEMORY_OPERATIONS_SUPPORTED) &&
|
||||
(*flags & KFD_DBG_TRAP_FLAG_SINGLE_MEM_OP)) {
|
||||
@@ -531,6 +532,12 @@ int kfd_dbg_trap_set_flags(struct kfd_process *target, uint32_t *flags)
|
||||
*flags = prev_flags;
|
||||
return -EACCES;
|
||||
}
|
||||
|
||||
if (!(caps2 & HSA_CAP2_TRAP_DEBUG_LDS_OUT_OF_ADDR_RANGE_SUPPORTED) &&
|
||||
(*flags & KFD_DBG_TRAP_FLAG_LDS_OUT_OF_ADDR_RANGE)) {
|
||||
*flags = prev_flags;
|
||||
return -EACCES;
|
||||
}
|
||||
}
|
||||
|
||||
target->dbg_flags = *flags;
|
||||
|
||||
Reference in New Issue
Block a user