Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drm/amdgpu/psp: ignore psp response status #234

Merged
merged 2 commits into from May 4, 2020

Conversation

avg-I
Copy link
Contributor

@avg-I avg-I commented Apr 27, 2020

This PR picks up two upstream commits.
On my hardware both Linux (5.3.x) and FreeBSD amdgpu drivers report similar errors:

[    6.603437] [drm] failed to load ucode id (12) 
[    6.603440] [drm] psp command failed and response status is (-53233)
[    6.619445] [drm] failed to load ucode id (13) 
[    6.619446] [drm] psp command failed and response status is (-65521)
[    6.631459] [drm] failed to load ucode id (14) 
[    6.631462] [drm] psp command failed and response status is (-65521)
[drm ERROR :psp_cmd_submit_buf] failed loading with status (-53233) and ucode id (10)
[drm ERROR :psp_hw_init] PSP firmware loading failed
[drm ERROR :amdgpu_device_fw_loading] hw_init of IP block <psp> failed -22
drmn0: amdgpu_device_ip_init failed
drmn0: Fatal error during GPU init

The obvious difference is that on Linux the error is not fatal while on FreeBSD it was.
After the change, FreeBSD amdgpu is able to attach successfully:

[drm] failed to load ucode id (10) <4>[drm] psp command failed and response status is (-53233)
[drm] failed to load ucode id (11) <4>[drm] psp command failed and response status is (-65521)
[drm] failed to load ucode id (12) <4>[drm] psp command failed and response status is (-65521)

xliyu and others added 2 commits April 27, 2020 19:47
Upstream commit 76223c5496a7cf10aef1971e4e6aff77abadd15a

There isn't ucode when executing INVOKE command, so current code can't
check the failure of INVOKE command.

Remove the ucode check.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Upstream commit 466bcb75b0791ba301817cdadeed20398f2224fe

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>
@avg-I
Copy link
Contributor Author

avg-I commented Apr 27, 2020

I picked up two commits for the sake of a conflict-free merge.

@zeising zeising merged commit a92c7be into FreeBSDDesktop:drm-v5.0 May 4, 2020
@avg-I avg-I deleted the drm-v5.0-psp_cmd_submit_buf branch May 31, 2020 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants