drm/radeon/kms: match r6xx/r7xx/evergreen asic_reset with previous asics
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 21 Jan 2011 15:38:22 +0000 (15:38 +0000)
committerDave Airlie <airlied@gmail.com>
Mon, 24 Jan 2011 01:05:25 +0000 (11:05 +1000)
Don't reset if the engine isn't busy.  This matches the behavior of
previous asics.  Reseting a non-hung block can lead to a hang.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=33272

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/r600.c

index a8973acb39870e2af0c253f92daec14cd80bf146..677af91b555cefc3dec7536b6c08dd1e831927ab 100644 (file)
@@ -2201,6 +2201,9 @@ static int evergreen_gpu_soft_reset(struct radeon_device *rdev)
        struct evergreen_mc_save save;
        u32 grbm_reset = 0;
 
+       if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
+               return 0;
+
        dev_info(rdev->dev, "GPU softreset \n");
        dev_info(rdev->dev, "  GRBM_STATUS=0x%08X\n",
                RREG32(GRBM_STATUS));
index aca2236268fae105ce75c6546a06ba4dfb09fb2d..1e10e3e2ba2a388362bf5ea7cd6ab15b618f3dfa 100644 (file)
@@ -1287,6 +1287,9 @@ int r600_gpu_soft_reset(struct radeon_device *rdev)
                        S_008014_CB2_BUSY(1) | S_008014_CB3_BUSY(1);
        u32 tmp;
 
+       if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE))
+               return 0;
+
        dev_info(rdev->dev, "GPU softreset \n");
        dev_info(rdev->dev, "  R_008010_GRBM_STATUS=0x%08X\n",
                RREG32(R_008010_GRBM_STATUS));