[PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop

Deucher, Alexander Alexander.Deucher at amd.com
Fri Jul 14 14:40:20 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Junwei Zhang
> Sent: Friday, July 14, 2017 6:20 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhang, Jerry; Huang, Ray
> Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop
> 
> Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index ba743d4..71ce3ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -95,9 +95,8 @@ int psp_wait_for(struct psp_context *psp, uint32_t
> reg_index,
>  	int i;
>  	struct amdgpu_device *adev = psp->adev;
> 
> -	val = RREG32(reg_index);
> -
>  	for (i = 0; i < adev->usec_timeout; i++) {
> +		val = RREG32(reg_index);
>  		if (check_changed) {
>  			if (val != reg_val)
>  				return 0;
> --
> 1.9.1
> 
> _______________________________________________
> 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