Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hawking Zhang and committed by
Alex Deucher
858a2bba 5bdd0b72

+9 -6
+9 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
··· 55 55 #include "amdgpu_connectors.h" 56 56 #include "amdgpu_trace.h" 57 57 #include "amdgpu_amdkfd.h" 58 + #include "amdgpu_ras.h" 58 59 59 60 #include <linux/pm_runtime.h> 60 61 ··· 163 162 * register to check whether the interrupt is triggered or not, and properly 164 163 * ack the interrupt if it is there 165 164 */ 166 - if (adev->nbio.funcs && 167 - adev->nbio.funcs->handle_ras_controller_intr_no_bifring) 168 - adev->nbio.funcs->handle_ras_controller_intr_no_bifring(adev); 165 + if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__PCIE_BIF)) { 166 + if (adev->nbio.funcs && 167 + adev->nbio.funcs->handle_ras_controller_intr_no_bifring) 168 + adev->nbio.funcs->handle_ras_controller_intr_no_bifring(adev); 169 169 170 - if (adev->nbio.funcs && 171 - adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring) 172 - adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring(adev); 170 + if (adev->nbio.funcs && 171 + adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring) 172 + adev->nbio.funcs->handle_ras_err_event_athub_intr_no_bifring(adev); 173 + } 173 174 174 175 return ret; 175 176 }