RE: [PATCH] drm/amdgpu: skip unload tmr when tmr is not loaded

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

 




> -----Original Message-----
> From: Tong Liu01 <Tong.Liu01@xxxxxxx>
> Sent: Wednesday, March 22, 2023 10:37 AM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Cc: Quan, Evan <Evan.Quan@xxxxxxx>; Chen, Horace
> <Horace.Chen@xxxxxxx>; Tuikov, Luben <Luben.Tuikov@xxxxxxx>;
> Koenig, Christian <Christian.Koenig@xxxxxxx>; Deucher, Alexander
> <Alexander.Deucher@xxxxxxx>; Xiao, Jack <Jack.Xiao@xxxxxxx>; Zhang,
> Hawking <Hawking.Zhang@xxxxxxx>; Liu, Monk <Monk.Liu@xxxxxxx>; Xu,
> Feifei <Feifei.Xu@xxxxxxx>; Wang, Yang(Kevin)
> <KevinYang.Wang@xxxxxxx>; Chen, Guchun <Guchun.Chen@xxxxxxx>;
> Liu01, Tong (Esther) <Tong.Liu01@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: skip unload tmr when tmr is not loaded
> 
> [why]
> For Navi12 and CHIP_SIENNA_CICHLID SRIOV, TMR is not loaded. Should also
> skip tmr unload
> 
> Signed-off-by: Tong Liu01 <Tong.Liu01@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 0b9e99c35a05..0a3d9f7e277b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -839,7 +839,15 @@ static void psp_prep_tmr_unload_cmd_buf(struct
> psp_context *psp,  static int psp_tmr_unload(struct psp_context *psp)  {
>  	int ret;
> -	struct psp_gfx_cmd_resp *cmd = acquire_psp_cmd_buf(psp);
> +	struct psp_gfx_cmd_resp *cmd;
> +
> +	/* For Navi12 and CHIP_SIENNA_CICHLID SRIOV, do not set up TMR.
> +	 * Already set up by host driver.
> +	 */

I would say something like "skip TMR unload for Navi12 and CHIP_SIENNA_CICHLID SRIOV, as TMR is not loaded at all."

With above comment improved, the patch is:
Reviewed-by: Guchun Chen <guchun.chen@xxxxxxx>

Regards,
Guchun

> +	if (amdgpu_sriov_vf(psp->adev) && psp_skip_tmr(psp))
> +		return 0;
> +
> +	cmd = acquire_psp_cmd_buf(psp);
> 
>  	psp_prep_tmr_unload_cmd_buf(psp, cmd);
>  	dev_dbg(psp->adev->dev, "free PSP TMR buffer\n");
> --
> 2.34.1





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

  Powered by Linux