diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 4d7a2e1bdb9..9c92db7c896 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
| @@ -1342,13 +1342,19 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev) | |||
| 1342 | u32 srbm_status; | 1342 | u32 srbm_status; |
| 1343 | u32 grbm_status; | 1343 | u32 grbm_status; |
| 1344 | u32 grbm_status2; | 1344 | u32 grbm_status2; |
| 1345 | struct r100_gpu_lockup *lockup; | ||
| 1345 | int r; | 1346 | int r; |
| 1346 | 1347 | ||
| 1348 | if (rdev->family >= CHIP_RV770) | ||
| 1349 | lockup = &rdev->config.rv770.lockup; | ||
| 1350 | else | ||
| 1351 | lockup = &rdev->config.r600.lockup; | ||
| 1352 | |||
| 1347 | srbm_status = RREG32(R_000E50_SRBM_STATUS); | 1353 | srbm_status = RREG32(R_000E50_SRBM_STATUS); |
| 1348 | grbm_status = RREG32(R_008010_GRBM_STATUS); | 1354 | grbm_status = RREG32(R_008010_GRBM_STATUS); |
| 1349 | grbm_status2 = RREG32(R_008014_GRBM_STATUS2); | 1355 | grbm_status2 = RREG32(R_008014_GRBM_STATUS2); |
| 1350 | if (!G_008010_GUI_ACTIVE(grbm_status)) { | 1356 | if (!G_008010_GUI_ACTIVE(grbm_status)) { |
| 1351 | r100_gpu_lockup_update(&rdev->config.r300.lockup, &rdev->cp); | 1357 | r100_gpu_lockup_update(lockup, &rdev->cp); |
| 1352 | return false; | 1358 | return false; |
| 1353 | } | 1359 | } |
| 1354 | /* force CP activities */ | 1360 | /* force CP activities */ |
| @@ -1360,7 +1366,7 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev) | |||
| 1360 | radeon_ring_unlock_commit(rdev); | 1366 | radeon_ring_unlock_commit(rdev); |
| 1361 | } | 1367 | } |
| 1362 | rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); | 1368 | rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); |
| 1363 | return r100_gpu_cp_is_lockup(rdev, &rdev->config.r300.lockup, &rdev->cp); | 1369 | return r100_gpu_cp_is_lockup(rdev, lockup, &rdev->cp); |
| 1364 | } | 1370 | } |
| 1365 | 1371 | ||
| 1366 | int r600_asic_reset(struct radeon_device *rdev) | 1372 | int r600_asic_reset(struct radeon_device *rdev) |
