]> git.dujemihanovic.xyz Git - linux.git/commit
drm/amdkfd: Update logic for CU occupancy calculations
authorMukul Joshi <mukul.joshi@amd.com>
Mon, 16 Sep 2024 18:33:58 +0000 (14:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 25 Sep 2024 16:56:00 +0000 (12:56 -0400)
commit6ae9e1aba97e4cdaa31a0bfdc07497ad0e915c84
tree821af9df5ef4c77d195ca1142f28ffdc750a2c88
parente1d27f7a9cea1e0c06699164e3b177862e7b4096
drm/amdkfd: Update logic for CU occupancy calculations

Currently, the code uses the IH_VMID_X_LUT register to map
a queue's vmid to the corresponding PASID. This logic is racy
since CP can update the VMID-PASID mapping anytime especially
when there are more processes than number of vmids. Update the
logic to calculate CU occupancy by matching doorbell offset of
the queue with valid wave counts against the process's queues.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.h
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/amd/include/kgd_kfd_interface.h