summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
diff options
context:
space:
mode:
authorMukul Joshi <mukul.joshi@amd.com>2024-09-20 14:59:29 -0400
committerAlex Deucher <alexander.deucher@amd.com>2024-09-25 12:56:07 -0400
commite45b011d2c4146442a388113657b70f0c7cad09b (patch)
tree5f5aa2bb01841b186950df248fc20f23f41a85ff /drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
parent6ae9e1aba97e4cdaa31a0bfdc07497ad0e915c84 (diff)
downloadlinux-e45b011d2c4146442a388113657b70f0c7cad09b.tar.gz
linux-e45b011d2c4146442a388113657b70f0c7cad09b.tar.bz2
linux-e45b011d2c4146442a388113657b70f0c7cad09b.zip
drm/amdkfd: Fix CU occupancy for GFX 9.4.3
Make CU occupancy calculations work on GFX 9.4.3 by updating the logic to handle multiple XCCs correctly. 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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 29578550b478..648f40091aa3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -3542,15 +3542,19 @@ int debug_refresh_runlist(struct device_queue_manager *dqm)
bool kfd_dqm_is_queue_in_process(struct device_queue_manager *dqm,
struct qcm_process_device *qpd,
- int doorbell_off)
+ int doorbell_off, u32 *queue_format)
{
struct queue *q;
bool r = false;
+ if (!queue_format)
+ return r;
+
dqm_lock(dqm);
list_for_each_entry(q, &qpd->queues_list, list) {
if (q->properties.doorbell_off == doorbell_off) {
+ *queue_format = q->properties.format;
r = true;
goto out;
}