[PATCH] drm/amd: Avoid running psp_ras_initialize() on HW without RAS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On hardware known not to have RAS or in cases that a user has disabled
RAS via kernel module parameter, it makes no sense to try to run code
from psp_ras_initialize().  Furthermore trying to run it shows the
following message on every boot:

`RAS: optional ras ta ucode is not available`

Avoid running the rest of the function is RAS is not available.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/1415
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2673
Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index c2508462e02f..a87b6c761e78 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1603,6 +1603,9 @@ int psp_ras_initialize(struct psp_context *psp)
 	if (amdgpu_sriov_vf(adev))
 		return 0;
 
+	if (!adev->ras_enabled)
+		return 0;
+
 	if (!adev->psp.ras_context.context.bin_desc.size_bytes ||
 	    !adev->psp.ras_context.context.bin_desc.start_addr) {
 		dev_info(adev->dev, "RAS: optional ras ta ucode is not available\n");
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux