[PATCH] drm/amdgpu: error handling for xgmi and ras
Evan Quan
evan.quan at amd.com
Fri Mar 15 08:33:54 UTC 2019
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 at amd.com>
---
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
More information about the amd-gfx
mailing list