diff options
author | Dave Airlie <airlied@redhat.com> | 2011-01-04 17:31:08 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-01-04 17:31:08 -0500 |
commit | 4f125010d2d02c481a0fdf5aee23a9f937bc5de1 (patch) | |
tree | dcdcd2ba1d0bb980b57ced9a1b2b5b17c84c8f57 /drivers/gpu/drm/radeon/r600.c | |
parent | 204663c48711ddceee09df46269cd34d49d1f7be (diff) | |
parent | 989d873fc5b6a96695b97738dea8d9f02a60f8ab (diff) |
Merge branch 'master' of /home/airlied/kernel/linux-2.6 into drm-core-next
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index c6a37e036f11..f95ca5b44396 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -881,12 +881,15 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) | |||
881 | u32 tmp; | 881 | u32 tmp; |
882 | 882 | ||
883 | /* flush hdp cache so updates hit vram */ | 883 | /* flush hdp cache so updates hit vram */ |
884 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740)) { | 884 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && |
885 | !(rdev->flags & RADEON_IS_AGP)) { | ||
885 | void __iomem *ptr = (void *)rdev->gart.table.vram.ptr; | 886 | void __iomem *ptr = (void *)rdev->gart.table.vram.ptr; |
886 | u32 tmp; | 887 | u32 tmp; |
887 | 888 | ||
888 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read | 889 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read |
889 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL | 890 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL |
891 | * This seems to cause problems on some AGP cards. Just use the old | ||
892 | * method for them. | ||
890 | */ | 893 | */ |
891 | WREG32(HDP_DEBUG1, 0); | 894 | WREG32(HDP_DEBUG1, 0); |
892 | tmp = readl((void __iomem *)ptr); | 895 | tmp = readl((void __iomem *)ptr); |
@@ -1342,13 +1345,19 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev) | |||
1342 | u32 srbm_status; | 1345 | u32 srbm_status; |
1343 | u32 grbm_status; | 1346 | u32 grbm_status; |
1344 | u32 grbm_status2; | 1347 | u32 grbm_status2; |
1348 | struct r100_gpu_lockup *lockup; | ||
1345 | int r; | 1349 | int r; |
1346 | 1350 | ||
1351 | if (rdev->family >= CHIP_RV770) | ||
1352 | lockup = &rdev->config.rv770.lockup; | ||
1353 | else | ||
1354 | lockup = &rdev->config.r600.lockup; | ||
1355 | |||
1347 | srbm_status = RREG32(R_000E50_SRBM_STATUS); | 1356 | srbm_status = RREG32(R_000E50_SRBM_STATUS); |
1348 | grbm_status = RREG32(R_008010_GRBM_STATUS); | 1357 | grbm_status = RREG32(R_008010_GRBM_STATUS); |
1349 | grbm_status2 = RREG32(R_008014_GRBM_STATUS2); | 1358 | grbm_status2 = RREG32(R_008014_GRBM_STATUS2); |
1350 | if (!G_008010_GUI_ACTIVE(grbm_status)) { | 1359 | if (!G_008010_GUI_ACTIVE(grbm_status)) { |
1351 | r100_gpu_lockup_update(&rdev->config.r300.lockup, &rdev->cp); | 1360 | r100_gpu_lockup_update(lockup, &rdev->cp); |
1352 | return false; | 1361 | return false; |
1353 | } | 1362 | } |
1354 | /* force CP activities */ | 1363 | /* force CP activities */ |
@@ -1360,7 +1369,7 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev) | |||
1360 | radeon_ring_unlock_commit(rdev); | 1369 | radeon_ring_unlock_commit(rdev); |
1361 | } | 1370 | } |
1362 | rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); | 1371 | rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); |
1363 | return r100_gpu_cp_is_lockup(rdev, &rdev->config.r300.lockup, &rdev->cp); | 1372 | return r100_gpu_cp_is_lockup(rdev, lockup, &rdev->cp); |
1364 | } | 1373 | } |
1365 | 1374 | ||
1366 | int r600_asic_reset(struct radeon_device *rdev) | 1375 | int r600_asic_reset(struct radeon_device *rdev) |
@@ -3508,10 +3517,12 @@ int r600_debugfs_mc_info_init(struct radeon_device *rdev) | |||
3508 | void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo) | 3517 | void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo) |
3509 | { | 3518 | { |
3510 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read | 3519 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read |
3511 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL | 3520 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL. |
3521 | * This seems to cause problems on some AGP cards. Just use the old | ||
3522 | * method for them. | ||
3512 | */ | 3523 | */ |
3513 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && | 3524 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && |
3514 | rdev->vram_scratch.ptr) { | 3525 | rdev->vram_scratch.ptr && !(rdev->flags & RADEON_IS_AGP)) { |
3515 | void __iomem *ptr = (void *)rdev->vram_scratch.ptr; | 3526 | void __iomem *ptr = (void *)rdev->vram_scratch.ptr; |
3516 | u32 tmp; | 3527 | u32 tmp; |
3517 | 3528 | ||