* [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
@ 2019-01-14 8:16 Aaron Liu
[not found] ` <1547453811-6718-1-git-send-email-aaron.liu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Aaron Liu @ 2019-01-14 8:16 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Aaron Liu
Don't return err if psp reponse status isn't zero
Change-Id: I680679983f972b6969f4949f1faafaf17fe996a6
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 53c2d60..48778b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -140,14 +140,15 @@ 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 */
+ /* the status field should be 0 after psp command completion
+ * if not, print WARN msg
+ */
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 */
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
[not found] ` <1547453811-6718-1-git-send-email-aaron.liu-5C7GfCeVMHo@public.gmane.org>
@ 2019-01-14 8:27 ` Huang, Ray
[not found] ` <BYAPR12MB3016AEA8454215EA9E14085CEC800-ZGDeBxoHBPkiNGs+b2+dlgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-01-14 8:31 ` Yu, Xiangliang
2019-01-14 12:52 ` Christian König
2 siblings, 1 reply; 5+ messages in thread
From: Huang, Ray @ 2019-01-14 8:27 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Yu, Xiangliang,
Deucher, Alexander, Zhang, Hawking
Cc: Liu, Aaron, Koenig, Christian
Is some cases, 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.
Reviewed-by: Huang Rui <ray.huang@amd.com>
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Aaron Liu
> Sent: Monday, January 14, 2019 4:17 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Aaron <Aaron.Liu@amd.com>
> Subject: [PATCH drm/amdgpu/psp: ignore psp reponse status]
> drm/amdgpu/psp: ignore psp reponse status
>
> Don't return err if psp reponse status isn't zero
>
> Change-Id: I680679983f972b6969f4949f1faafaf17fe996a6
> Signed-off-by: Aaron Liu <aaron.liu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 53c2d60..48778b3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -140,14 +140,15 @@ 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 */
> + /* the status field should be 0 after psp command completion
> + * if not, print WARN msg
> + */
> 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 */
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
[not found] ` <1547453811-6718-1-git-send-email-aaron.liu-5C7GfCeVMHo@public.gmane.org>
2019-01-14 8:27 ` Huang, Ray
@ 2019-01-14 8:31 ` Yu, Xiangliang
2019-01-14 12:52 ` Christian König
2 siblings, 0 replies; 5+ messages in thread
From: Yu, Xiangliang @ 2019-01-14 8:31 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Aaron
Please add more comments to explain why don't return error.
And add my RB with that fix.
Reviewed-by: Xiangliang Yu<Xiangliang.Yu@amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Aaron Liu
Sent: Monday, January 14, 2019 4:17 PM
To: amd-gfx@lists.freedesktop.org
Cc: Liu, Aaron <Aaron.Liu@amd.com>
Subject: [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
Don't return err if psp reponse status isn't zero
Change-Id: I680679983f972b6969f4949f1faafaf17fe996a6
Signed-off-by: Aaron Liu <aaron.liu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 53c2d60..48778b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -140,14 +140,15 @@ 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 */
+ /* the status field should be 0 after psp command completion
+ * if not, print WARN msg
+ */
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 */
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
[not found] ` <BYAPR12MB3016AEA8454215EA9E14085CEC800-ZGDeBxoHBPkiNGs+b2+dlgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2019-01-14 8:36 ` Xu, Feifei
0 siblings, 0 replies; 5+ messages in thread
From: Xu, Feifei @ 2019-01-14 8:36 UTC (permalink / raw)
To: Huang, Ray, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Yu,
Xiangliang, Deucher, Alexander, Zhang, Hawking
Cc: Liu, Aaron, Koenig, Christian
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
-----Original Message-----
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Huang, Ray
Sent: Monday, January 14, 2019 4:28 PM
To: Liu, Aaron <Aaron.Liu@amd.com>; amd-gfx@lists.freedesktop.org; Yu, Xiangliang <Xiangliang.Yu@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>
Cc: Liu, Aaron <Aaron.Liu@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>
Subject: RE: [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
Is some cases, 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.
Reviewed-by: Huang Rui <ray.huang@amd.com>
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Aaron Liu
> Sent: Monday, January 14, 2019 4:17 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Aaron <Aaron.Liu@amd.com>
> Subject: [PATCH drm/amdgpu/psp: ignore psp reponse status]
> drm/amdgpu/psp: ignore psp reponse status
>
> Don't return err if psp reponse status isn't zero
>
> Change-Id: I680679983f972b6969f4949f1faafaf17fe996a6
> Signed-off-by: Aaron Liu <aaron.liu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 53c2d60..48778b3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -140,14 +140,15 @@ 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 */
> + /* the status field should be 0 after psp command completion
> + * if not, print WARN msg
> + */
> 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 */
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status
[not found] ` <1547453811-6718-1-git-send-email-aaron.liu-5C7GfCeVMHo@public.gmane.org>
2019-01-14 8:27 ` Huang, Ray
2019-01-14 8:31 ` Yu, Xiangliang
@ 2019-01-14 12:52 ` Christian König
2 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2019-01-14 12:52 UTC (permalink / raw)
To: Aaron Liu, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 14.01.19 um 09:16 schrieb Aaron Liu:
> Don't return err if psp reponse status isn't zero
>
> Change-Id: I680679983f972b6969f4949f1faafaf17fe996a6
> Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Thanks for taking care of that. Fix is Acked-by: Christian König
<christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 53c2d60..48778b3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -140,14 +140,15 @@ 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 */
> + /* the status field should be 0 after psp command completion
> + * if not, print WARN msg
> + */
> 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 */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-14 12:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-14 8:16 [PATCH drm/amdgpu/psp: ignore psp reponse status] drm/amdgpu/psp: ignore psp reponse status Aaron Liu
[not found] ` <1547453811-6718-1-git-send-email-aaron.liu-5C7GfCeVMHo@public.gmane.org>
2019-01-14 8:27 ` Huang, Ray
[not found] ` <BYAPR12MB3016AEA8454215EA9E14085CEC800-ZGDeBxoHBPkiNGs+b2+dlgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-01-14 8:36 ` Xu, Feifei
2019-01-14 8:31 ` Yu, Xiangliang
2019-01-14 12:52 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.