mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
drm/amdgpu: give each kernel job a unique id
Userspace jobs have drm_file.client_id as a unique identifier as job's owners. For kernel jobs, we can allocate arbitrary values - the risk of overlap with userspace ids is small (given that it's a u64 value). In the unlikely case the overlap happens, it'll only impact trace events. Since this ID is traced in the gpu_scheduler trace events, this allows to determine the source of each job sent to the hardware. To make grepping easier, the IDs are defined as they will appear in the trace output. Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Link: https://lore.kernel.org/r/20250604122827.2191-1-pierre-eric.pelloux-prayer@amd.com
This commit is contained in:
committed by
Arunpravin Paneer Selvam
parent
f3e8293685
commit
256576ed68
@@ -977,7 +977,8 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev,
|
||||
params.vm = vm;
|
||||
params.immediate = immediate;
|
||||
|
||||
r = vm->update_funcs->prepare(¶ms, NULL);
|
||||
r = vm->update_funcs->prepare(¶ms, NULL,
|
||||
AMDGPU_KERNEL_JOB_ID_VM_UPDATE_PDES);
|
||||
if (r)
|
||||
goto error;
|
||||
|
||||
@@ -1146,7 +1147,8 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
|
||||
dma_fence_put(tmp);
|
||||
}
|
||||
|
||||
r = vm->update_funcs->prepare(¶ms, sync);
|
||||
r = vm->update_funcs->prepare(¶ms, sync,
|
||||
AMDGPU_KERNEL_JOB_ID_VM_UPDATE_RANGE);
|
||||
if (r)
|
||||
goto error_free;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user