OSDN Git Service

drm/amd/amdgpu: Clean up gmc6 wait_for_idle
authorTom St Denis <tom.stdenis@amd.com>
Mon, 15 May 2017 18:22:39 +0000 (14:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 24 May 2017 22:22:40 +0000 (18:22 -0400)
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

index 1e6263a..d07ec13 100644 (file)
@@ -965,16 +965,10 @@ static bool gmc_v6_0_is_idle(void *handle)
 static int gmc_v6_0_wait_for_idle(void *handle)
 {
        unsigned i;
-       u32 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);
        }