[PATCH 1/3] drm/amdgpu: error out on mode1 reset failure

Xu, Feifei Feifei.Xu at amd.com
Fri Mar 22 08:53:48 UTC 2019


Reviewed-by: Feifei Xu <Feifei.Xu at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Quan, Evan
Sent: Friday, March 22, 2019 4:32 PM
To: Quan, Evan <Evan.Quan at amd.com>; amd-gfx at lists.freedesktop.org
Subject: RE: [PATCH 1/3] drm/amdgpu: error out on mode1 reset failure

Ping..

> -----Original Message-----
> From: Evan Quan <evan.quan at amd.com>
> Sent: 2019年3月15日 14:02
> To: amd-gfx at lists.freedesktop.org
> Cc: Quan, Evan <Evan.Quan at amd.com>
> Subject: [PATCH 1/3] drm/amdgpu: error out on mode1 reset failure
> 
> The error return value should be correctly reflected.
> 
> Change-Id: I93bf6fa77193d4e3f102a4e223aa8cb18cb525cc
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/soc15.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
> b/drivers/gpu/drm/amd/amdgpu/soc15.c
> index 0c5ce4bd6feb..9d33a5d73072 100644
> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
> @@ -393,6 +393,7 @@ void soc15_program_register_sequence(struct
> amdgpu_device *adev,  static int soc15_asic_mode1_reset(struct 
> amdgpu_device *adev)  {
>  	u32 i;
> +	int ret = 0;
> 
>  	amdgpu_atombios_scratch_regs_engine_hung(adev, true);
> 
> @@ -403,7 +404,9 @@ static int soc15_asic_mode1_reset(struct 
> amdgpu_device *adev)
> 
>  	pci_save_state(adev->pdev);
> 
> -	psp_gpu_reset(adev);
> +	ret = psp_gpu_reset(adev);
> +	if (ret)
> +		dev_err(adev->dev, "GPU mode1 reset failed\n");
> 
>  	pci_restore_state(adev->pdev);
> 
> @@ -418,7 +421,7 @@ static int soc15_asic_mode1_reset(struct 
> amdgpu_device *adev)
> 
>  	amdgpu_atombios_scratch_regs_engine_hung(adev, false);
> 
> -	return 0;
> +	return ret;
>  }
> 
>  static int soc15_asic_get_baco_capability(struct amdgpu_device *adev, 
> bool
> *cap)
> --
> 2.21.0

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


More information about the amd-gfx mailing list