diff options
author | Kevin Wang <kevin1.wang@amd.com> | 2021-02-08 06:00:03 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-03-24 06:00:25 +0300 |
commit | d86fd724e59af96ae5ab6630f4f07a076e9b80cd (patch) | |
tree | 26a2bc05d52d45c4a49e468140c2836f2bf109a3 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
parent | 2fb3c5d0d16192c926dbad5363867b31c8b8b2f8 (diff) | |
download | linux-d86fd724e59af96ae5ab6630f4f07a076e9b80cd.tar.xz |
drm/amdgpu: add psp RAP L0 check support
add PSP RAP L0 check when RAP TA is loaded.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 3510be551cdd..691629293d72 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2365,6 +2365,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); /* @@ -2382,7 +2383,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; |