From 58e698861255129a00765b69c0499bc0d044feb4 Mon Sep 17 00:00:00 2001 From: Lan Xiao Date: Wed, 11 Jul 2018 22:32:51 -0400 Subject: drm/amdkfd: fix zero reading of VMID and PASID for Hawaii MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upon VM Fault, the VMID and PASID written by HW are zeros in Hawaii. Instead of reading from ih_ring_entry, read directly from the registers. This workaround fix the soft hang issues caused by mishandled VM Fault in Hawaii. Signed-off-by: Lan Xiao Signed-off-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Oded Gabbay --- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/gpu/drm/amd/include') diff --git a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h index 28b11d105288..76a30cbeee19 100644 --- a/drivers/gpu/drm/amd/include/kgd_kfd_interface.h +++ b/drivers/gpu/drm/amd/include/kgd_kfd_interface.h @@ -276,6 +276,10 @@ struct tile_config { * faults. On GFXv9 VM fault information is fully contained in the IH * packet and this function is not needed. * + * @read_vmid_from_vmfault_reg: On Hawaii the VMID is not set in the + * IH ring entry. This function allows the KFD ISR to get the VMID + * from the fault status register as early as possible. + * * This structure contains function pointers to services that the kgd driver * provides to amdkfd driver. * @@ -394,6 +398,7 @@ struct kfd2kgd_calls { int (*get_vm_fault_info)(struct kgd_dev *kgd, struct kfd_vm_fault_info *info); + uint32_t (*read_vmid_from_vmfault_reg)(struct kgd_dev *kgd); }; /** -- cgit v1.2.3