aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4535-drm-amdgpu-pull-ras-controller-int-status-only-when-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4535-drm-amdgpu-pull-ras-controller-int-status-only-when-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4535-drm-amdgpu-pull-ras-controller-int-status-only-when-.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4535-drm-amdgpu-pull-ras-controller-int-status-only-when-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4535-drm-amdgpu-pull-ras-controller-int-status-only-when-.patch
new file mode 100644
index 00000000..0c6df126
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4535-drm-amdgpu-pull-ras-controller-int-status-only-when-.patch
@@ -0,0 +1,55 @@
+From 34280098d831c417043d90306fc61b25a39e0587 Mon Sep 17 00:00:00 2001
+From: Hawking Zhang <Hawking.Zhang@amd.com>
+Date: Mon, 18 Nov 2019 18:17:12 +0800
+Subject: [PATCH 4535/4736] drm/amdgpu: pull ras controller int status only
+ when ras enabled
+
+ras_controller_irq and athub_err_event_irq are only registered
+when PCIE_BIF ras is marked as supported. as the result, the driver
+also just need pull the int status in such case.
+
+Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
+Reviewed-by: John Clements <john.clements@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+index 48af4830a74f..4f6f128d13ae 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+@@ -52,6 +52,7 @@
+ #include "amdgpu_connectors.h"
+ #include "amdgpu_trace.h"
+ #include "amdgpu_amdkfd.h"
++#include "amdgpu_ras.h"
+
+ #include <linux/pm_runtime.h>
+
+@@ -159,13 +160,15 @@ irqreturn_t amdgpu_irq_handler(int irq, void *arg)
+ * register to check whether the interrupt is triggered or not, and properly
+ * ack the interrupt if it is there
+ */
+- if (adev->nbio.funcs &&
+- adev->nbio.funcs->handle_ras_controller_intr_no_bifring)
+- adev->nbio.funcs->handle_ras_controller_intr_no_bifring(adev);
+-
+- if (adev->nbio.funcs &&
+- adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring)
+- adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring(adev);
++ if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__PCIE_BIF)) {
++ if (adev->nbio.funcs &&
++ adev->nbio.funcs->handle_ras_controller_intr_no_bifring)
++ adev->nbio.funcs->handle_ras_controller_intr_no_bifring(adev);
++
++ if (adev->nbio.funcs &&
++ adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring)
++ adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring(adev);
++ }
+
+ return ret;
+ }
+--
+2.17.1
+