diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1236-drm-amdgpu-send-IVs-to-the-KFD-only-after-processing.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/1236-drm-amdgpu-send-IVs-to-the-KFD-only-after-processing.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1236-drm-amdgpu-send-IVs-to-the-KFD-only-after-processing.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1236-drm-amdgpu-send-IVs-to-the-KFD-only-after-processing.patch new file mode 100644 index 00000000..e9bb824b --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1236-drm-amdgpu-send-IVs-to-the-KFD-only-after-processing.patch @@ -0,0 +1,95 @@ +From 143415159721cebfc5492521b1fe122c2736db5f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Wed, 26 Sep 2018 11:08:32 +0200 +Subject: [PATCH 1236/2940] drm/amdgpu: send IVs to the KFD only after + processing them v3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This allows us to filter out VM faults in the GMC code. + +v2: don't filter out all faults +v3: fix copy&paste typo, send all IV to the KFD, don't change message level + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +Signed-off-by: Chaudhary Amit Kumar <Chaudharyamit.Kumar@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 39 ++++++++++++------------- + 1 file changed, 18 insertions(+), 21 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +index ddc88cf9069b..97ce4a356368 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +@@ -145,9 +145,6 @@ static void amdgpu_irq_callback(struct amdgpu_device *adev, + u32 ring_index = ih->rptr >> 2; + struct amdgpu_iv_entry entry; + +- /* Before dispatching irq to IP blocks, send it to amdkfd */ +- amdgpu_amdkfd_interrupt(adev, (const void *) &ih->ring[ring_index]); +- + entry.iv_entry = (const uint32_t *)&ih->ring[ring_index]; + amdgpu_ih_decode_iv(adev, &entry); + +@@ -402,37 +399,37 @@ void amdgpu_irq_dispatch(struct amdgpu_device *adev, + unsigned client_id = entry->client_id; + unsigned src_id = entry->src_id; + struct amdgpu_irq_src *src; ++ bool handled = false; + int r; + + if (client_id >= AMDGPU_IRQ_CLIENTID_MAX) { + DRM_DEBUG("Invalid client_id in IV: %d\n", client_id); +- return; +- } + +- if (src_id >= AMDGPU_MAX_IRQ_SRC_ID) { ++ } else if (src_id >= AMDGPU_MAX_IRQ_SRC_ID) { + DRM_DEBUG("Invalid src_id in IV: %d\n", src_id); +- return; +- } + +- if (adev->irq.virq[src_id]) { ++ } else if (adev->irq.virq[src_id]) { + generic_handle_irq(irq_find_mapping(adev->irq.domain, src_id)); +- } else { +- if (!adev->irq.client[client_id].sources) { +- DRM_DEBUG("Unregistered interrupt client_id: %d src_id: %d\n", +- client_id, src_id); +- return; +- } + +- src = adev->irq.client[client_id].sources[src_id]; +- if (!src) { +- DRM_DEBUG("Unhandled interrupt src_id: %d\n", src_id); +- return; +- } ++ } else if (!adev->irq.client[client_id].sources) { ++ DRM_DEBUG("Unregistered interrupt client_id: %d src_id: %d\n", ++ client_id, src_id); ++ ++ } else if ((src = adev->irq.client[client_id].sources[src_id])) { + + r = src->funcs->process(adev, src, entry); +- if (r) ++ if (r < 0) + DRM_ERROR("error processing interrupt (%d)\n", r); ++ else if (r) ++ handled = true; ++ ++ } else { ++ DRM_DEBUG("Unhandled interrupt src_id: %d\n", src_id); + } ++ ++ /* Send it to amdkfd as well if it isn't already handled */ ++ if (!handled) ++ amdgpu_amdkfd_interrupt(adev, entry->iv_entry); + } + + /** +-- +2.17.1 + |