Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: Query vmid pasid mapping through stored info for non HWS

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>

authored by

Yong Zhao and committed by
Alex Deucher
3fe023d4 d9d4623c

+1 -2
+1 -2
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
··· 54 54 memcpy(patched_ihre, ih_ring_entry, 55 55 dev->device_info->ih_ring_entry_size); 56 56 57 - pasid = dev->kfd2kgd->get_atc_vmid_pasid_mapping_pasid( 58 - dev->kgd, vmid); 57 + pasid = dev->dqm->vmid_pasid[vmid]; 59 58 60 59 /* Patch the pasid field */ 61 60 patched_ihre[3] = cpu_to_le32((le32_to_cpu(patched_ihre[3])