diff options
author | Aaron Liu <aaron.liu@amd.com> | 2019-01-14 16:08:32 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-01-25 16:15:34 -0500 |
commit | 466bcb75b0791ba301817cdadeed20398f2224fe (patch) | |
tree | 247d7d08f58e5a440d014bf7691fe65ccf8b2787 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |
parent | 7c94bc828ee7e7e64f31e40bb967b6417d7e6382 (diff) | |
download | linux-466bcb75b0791ba301817cdadeed20398f2224fe.tar.bz2 |
drm/amdgpu/psp: ignore psp response status
In some cases, psp response status is not 0 even there is no
problem while the command is submitted. Some version of PSP FW
doesn't write 0 to that field.
So here we would like to only print a warning instead of an error
during psp initialization to avoid breaking hw_init and it doesn't
return -EINVAL.
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Xiangliang Yu<Xiangliang.Yu@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Paul Menzel <pmenzel+amd-gfx@molgen.mpg.de>
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 | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 53c2d6069fa0..f26d8faa7507 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -140,14 +140,19 @@ psp_cmd_submit_buf(struct psp_context *psp, while (*((unsigned int *)psp->fence_buf) != index) msleep(1); - /* the status field must be 0 after psp command completion */ + /* In some cases, psp response status is not 0 even there is no + * problem while the command is submitted. Some version of PSP FW + * doesn't write 0 to that field. + * So here we would like to only print a warning instead of an error + * during psp initialization to avoid breaking hw_init and it doesn't + * return -EINVAL. + */ if (psp->cmd_buf_mem->resp.status) { if (ucode) - DRM_ERROR("failed to load ucode id (%d) ", + DRM_WARN("failed to load ucode id (%d) ", ucode->ucode_id); - DRM_ERROR("psp command failed and response status is (%d)\n", + DRM_WARN("psp command failed and response status is (%d)\n", psp->cmd_buf_mem->resp.status); - return -EINVAL; } /* get xGMI session id from response buffer */ |