drm/amdgpu: pull ras controller int status only when ras enabled
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +10 -7
@@ -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; }
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191118102010.21727-1-Hawking.Zhang-5C7GfCeVMHo@public.gmane.org
Clements, John
Reviewed-by John Clements-----Original Message-----
From: Hawking Zhang <[email protected]>
Sent: Monday, November 18, 2019 6:20 PM
To: [email protected]; Clements, John <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Zhang, Hawking <[email protected]>
Subject: [PATCH] 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +10 -7
@@ -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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx