]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdkfd: add sdma poison consumption handling
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 3 Jun 2021 08:10:04 +0000 (16:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Jun 2021 18:57:24 +0000 (14:57 -0400)
Follow the same apporach as GFX to handle SDMA
poison consumption. Send SIGBUS to application
when receives SDMA_ECC interrupt and issue gpu
reset either mode 2 or mode 1 to get the engine
back

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Dennis Li<dennis.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c
drivers/gpu/drm/amd/amdkfd/soc15_int.h

index 9f9b1dfb9c375495cbde014f45150dd70e1e5dea..12d91e53556c6ff99d8b9e49c7e8b416cf0001f3 100644 (file)
@@ -249,8 +249,13 @@ static void event_interrupt_wq_v9(struct kfd_dev *dev,
                   client_id == SOC15_IH_CLIENTID_SDMA5 ||
                   client_id == SOC15_IH_CLIENTID_SDMA6 ||
                   client_id == SOC15_IH_CLIENTID_SDMA7) {
-               if (source_id == SOC15_INTSRC_SDMA_TRAP)
+               if (source_id == SOC15_INTSRC_SDMA_TRAP) {
                        kfd_signal_event_interrupt(pasid, context_id0 & 0xfffffff, 28);
+               } else if (source_id == SOC15_INTSRC_SDMA_ECC) {
+                       kfd_signal_poison_consumed_event(dev, pasid);
+                       amdgpu_amdkfd_gpu_reset(dev->kgd);
+                       return;
+               }
        } else if (client_id == SOC15_IH_CLIENTID_VMC ||
                   client_id == SOC15_IH_CLIENTID_VMC1 ||
                   client_id == SOC15_IH_CLIENTID_UTCL2) {
index 0bc0b25cb41053b23e98055695a6eb1b9258ac98..daf3c44547d309ca8162a7e6d78576eb1c15cf0f 100644 (file)
@@ -30,6 +30,7 @@
 #define SOC15_INTSRC_SQ_INTERRUPT_MSG  239
 #define SOC15_INTSRC_VMC_FAULT         0
 #define SOC15_INTSRC_SDMA_TRAP         224
+#define SOC15_INTSRC_SDMA_ECC          220
 
 
 #define SOC15_CLIENT_ID_FROM_IH_ENTRY(entry) (le32_to_cpu(entry[0]) & 0xff)