drm/amdkfd: Check preemption status on all XCDs

This patch adds the following functionality:
- Check the queue preemption status on all XCDs in a partition
  for GFX 9.4.3.
- Update the queue preemption debug message to print the queue
  doorbell id for which preemption failed.
- Change the signature of check preemption failed function to
  return a bool instead of uint32_t and pass the MQD manager
  as an argument.

Suggested-by: Jay Cornwall <jay.cornwall@amd.com>
Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Mukul Joshi
2024-03-13 20:26:55 -04:00
committed by Alex Deucher
parent 26d97182bb
commit 0991a4c192
8 changed files with 52 additions and 14 deletions

View File

@@ -290,3 +290,21 @@ uint64_t kfd_mqd_stride(struct mqd_manager *mm,
{
return mm->mqd_size;
}
bool kfd_check_hiq_mqd_doorbell_id(struct kfd_node *node, uint32_t doorbell_id,
uint32_t inst)
{
if (doorbell_id) {
struct device *dev = node->adev->dev;
if (node->adev->xcp_mgr && node->adev->xcp_mgr->num_xcps > 0)
dev_err(dev, "XCC %d: Queue preemption failed for queue with doorbell_id: %x\n",
inst, doorbell_id);
else
dev_err(dev, "Queue preemption failed for queue with doorbell_id: %x\n",
doorbell_id);
return true;
}
return false;
}