OSDN Git Service

drm/amdkfd: Query vmid pasid mapping through stored info for non HWS
authorYong Zhao <Yong.Zhao@amd.com>
Wed, 25 Sep 2019 21:06:12 +0000 (17:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:11:03 +0000 (09:11 -0500)
Because we record the mapping under non HWS mode in the software,
we can query pasid through vmid using the stored mapping instead of
reading from ATC registers.

This also prepares for the defeatured ATC block in future ASICs.

Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c

index 3ef67d2..e05d75e 100644 (file)
@@ -54,8 +54,7 @@ static bool event_interrupt_isr_v9(struct kfd_dev *dev,
                memcpy(patched_ihre, ih_ring_entry,
                                dev->device_info->ih_ring_entry_size);
 
-               pasid = dev->kfd2kgd->get_atc_vmid_pasid_mapping_pasid(
-                               dev->kgd, vmid);
+               pasid = dev->dqm->vmid_pasid[vmid];
 
                /* Patch the pasid field */
                patched_ihre[3] = cpu_to_le32((le32_to_cpu(patched_ihre[3])