[PATCH 158/159] drm/amdgpu: add psp RAP L0 check support

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

 



From: Kevin Wang <kevin1.wang@xxxxxxx>

add PSP RAP L0 check when RAP TA is loaded.

Signed-off-by: Kevin Wang <kevin1.wang@xxxxxxx>
Reviewed-by: Hawking Zhang <Hawking.Zhang@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index bf83625c6d20..3f2acdc839cd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -2363,6 +2363,7 @@ static int psp_hw_init(void *handle)
 {
 	int ret;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+	enum ta_rap_status status = TA_RAP_STATUS__SUCCESS;
 
 	mutex_lock(&adev->firmware.mutex);
 	/*
@@ -2380,7 +2381,14 @@ static int psp_hw_init(void *handle)
 	}
 
 	mutex_unlock(&adev->firmware.mutex);
-	return 0;
+
+	ret = psp_rap_invoke(&adev->psp, TA_CMD_RAP__VALIDATE_L0, &status);
+	if (ret || status != TA_RAP_STATUS__SUCCESS) {
+		dev_err(adev->dev, "RAP: (%d) Failed to Invoke Validate L0, status %d\n",
+			ret, status);
+	}
+
+	return ret;
 
 failed:
 	adev->firmware.load_type = AMDGPU_FW_LOAD_DIRECT;
-- 
2.29.2

_______________________________________________
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