[PATCH] drm/amdgpu: error handling for xgmi and ras

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

 



This is a quick workaround. A more complete
error handling around psp_hw_start is actually
needed.

Change-Id: I398efd652584e022debf237950207199a4ea78fc
Signed-off-by: Evan Quan <evan.quan@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 5888e24219d9..f8d712d306f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -941,6 +941,11 @@ static int psp_load_fw(struct amdgpu_device *adev)
 	amdgpu_bo_free_kernel(&psp->fw_pri_bo,
 			      &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
 failed:
+	if (psp->ras.ras_initialized)
+		psp->ras.ras_initialized = 0;
+	if (psp->ras.ras_initialized)
+		psp->ras.ras_initialized = 0;
+
 	kfree(psp->cmd);
 	psp->cmd = NULL;
 	return ret;
@@ -1061,6 +1066,10 @@ static int psp_resume(void *handle)
 
 failed:
 	DRM_ERROR("PSP resume failed\n");
+	if (psp->ras.ras_initialized)
+		psp->ras.ras_initialized = 0;
+	if (psp->ras.ras_initialized)
+		psp->ras.ras_initialized = 0;
 	mutex_unlock(&adev->firmware.mutex);
 	return ret;
 }
-- 
2.21.0

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux