Commit d86fd724 authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amdgpu: add psp RAP L0 check support

add PSP RAP L0 check when RAP TA is loaded.
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2fb3c5d0
...@@ -2365,6 +2365,7 @@ static int psp_hw_init(void *handle) ...@@ -2365,6 +2365,7 @@ static int psp_hw_init(void *handle)
{ {
int ret; int ret;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
enum ta_rap_status status = TA_RAP_STATUS__SUCCESS;
mutex_lock(&adev->firmware.mutex); mutex_lock(&adev->firmware.mutex);
/* /*
...@@ -2382,7 +2383,14 @@ static int psp_hw_init(void *handle) ...@@ -2382,7 +2383,14 @@ static int psp_hw_init(void *handle)
} }
mutex_unlock(&adev->firmware.mutex); 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: failed:
adev->firmware.load_type = AMDGPU_FW_LOAD_DIRECT; adev->firmware.load_type = AMDGPU_FW_LOAD_DIRECT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment