[PATCH 2/2] drm/amd/amdgpu: Clean up gmc6 wait_for_idle

Deucher, Alexander Alexander.Deucher at amd.com
Tue May 23 14:41:53 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Tom St Denis
> Sent: Monday, May 15, 2017 2:26 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: StDenis, Tom
> Subject: [PATCH 2/2] drm/amd/amdgpu: Clean up gmc6 wait_for_idle
> 
> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> index 81f5aa9ff719..27db0710e9ab 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
> @@ -984,16 +984,10 @@ static bool gmc_v6_0_is_idle(void *handle)
>  static int gmc_v6_0_wait_for_idle(void *handle)
>  {
>  	unsigned i;
> -	uint32_t tmp;
>  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> 
>  	for (i = 0; i < adev->usec_timeout; i++) {
> -		tmp = RREG32(mmSRBM_STATUS) &
> (SRBM_STATUS__MCB_BUSY_MASK |
> -
> SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK |
> -
> SRBM_STATUS__MCC_BUSY_MASK |
> -
> SRBM_STATUS__MCD_BUSY_MASK |
> -
> SRBM_STATUS__VMC_BUSY_MASK);
> -		if (!tmp)
> +		if (gmc_v6_0_is_idle(handle))
>  			return 0;
>  		udelay(1);
>  	}
> --
> 2.12.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