RE: [PATCH 2/2] drm/amdgpu/psp: Fix can't detect psp INVOKE command failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



XGMI command will not load ucode, so it can't find the command failed if check ucode at first.
For code logic, should check response status to see if command complete successfully at first.
For Vega10, could you explain why it block older version fw?


-----Original Message-----
From: Christian König <ckoenig.leichtzumerken@xxxxxxxxx> 
Sent: Thursday, January 03, 2019 11:00 PM
To: Xu, Feifei <Feifei.Xu@xxxxxxx>; Yu, Xiangliang <Xiangliang.Yu@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Deucher, Alexander <Alexander.Deucher@xxxxxxx>
Subject: Re: [PATCH 2/2] drm/amdgpu/psp: Fix can't detect psp INVOKE command failed

Hi guys,

this patch broke loading older versions of PSP firmware on Vega10.

What exactly is the background here? E.g. why do we need it? And can we revert it ASAP?

Thanks,
Christian.

Am 18.12.18 um 03:45 schrieb Xu, Feifei:
> Reviewed-by: Feifei Xu <Feifei.Xu@xxxxxxx>
>
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of 
> Xiangliang Yu
> Sent: Thursday, December 13, 2018 3:42 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Yu, Xiangliang <Xiangliang.Yu@xxxxxxx>
> Subject: [PATCH 2/2] drm/amdgpu/psp: Fix can't detect psp INVOKE 
> command failed
>
> 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@xxxxxxx>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 2f126ea7..7f5ce37 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -140,10 +140,13 @@ psp_cmd_submit_buf(struct psp_context *psp,
>   	while (*((unsigned int *)psp->fence_buf) != index)
>   		msleep(1);
>   
> -	/* the status field must be 0 after FW is loaded */
> -	if (ucode && psp->cmd_buf_mem->resp.status) {
> -		DRM_ERROR("failed loading with status (%d) and ucode id (%d)\n",
> -			  psp->cmd_buf_mem->resp.status, ucode->ucode_id);
> +	/* the status field must be 0 after psp command completion */
> +	if (psp->cmd_buf_mem->resp.status) {
> +		if (ucode)
> +			DRM_ERROR("failed to load ucode id (%d) ",
> +				  ucode->ucode_id);
> +		DRM_ERROR("psp command failed and response status is (%d)\n",
> +			  psp->cmd_buf_mem->resp.status);
>   		return -EINVAL;
>   	}
>   
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux