diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 7b65e4efe8af..74b9fb7a71df 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -97,14 +97,8 @@ u32 rv6xx_get_temp(struct radeon_device *rdev) | |||
97 | { | 97 | { |
98 | u32 temp = (RREG32(CG_THERMAL_STATUS) & ASIC_T_MASK) >> | 98 | u32 temp = (RREG32(CG_THERMAL_STATUS) & ASIC_T_MASK) >> |
99 | ASIC_T_SHIFT; | 99 | ASIC_T_SHIFT; |
100 | u32 actual_temp = 0; | ||
101 | 100 | ||
102 | if ((temp >> 7) & 1) | 101 | return temp * 1000; |
103 | actual_temp = 0; | ||
104 | else | ||
105 | actual_temp = (temp >> 1) & 0xff; | ||
106 | |||
107 | return actual_temp * 1000; | ||
108 | } | 102 | } |
109 | 103 | ||
110 | void r600_pm_get_dynpm_state(struct radeon_device *rdev) | 104 | void r600_pm_get_dynpm_state(struct radeon_device *rdev) |
@@ -884,12 +878,15 @@ void r600_pcie_gart_tlb_flush(struct radeon_device *rdev) | |||
884 | u32 tmp; | 878 | u32 tmp; |
885 | 879 | ||
886 | /* flush hdp cache so updates hit vram */ | 880 | /* flush hdp cache so updates hit vram */ |
887 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740)) { | 881 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && |
882 | !(rdev->flags & RADEON_IS_AGP)) { | ||
888 | void __iomem *ptr = (void *)rdev->gart.table.vram.ptr; | 883 | void __iomem *ptr = (void *)rdev->gart.table.vram.ptr; |
889 | u32 tmp; | 884 | u32 tmp; |
890 | 885 | ||
891 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read | 886 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read |
892 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL | 887 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL |
888 | * This seems to cause problems on some AGP cards. Just use the old | ||
889 | * method for them. | ||
893 | */ | 890 | */ |
894 | WREG32(HDP_DEBUG1, 0); | 891 | WREG32(HDP_DEBUG1, 0); |
895 | tmp = readl((void __iomem *)ptr); | 892 | tmp = readl((void __iomem *)ptr); |
@@ -1201,8 +1198,10 @@ void r600_vram_gtt_location(struct radeon_device *rdev, struct radeon_mc *mc) | |||
1201 | mc->vram_end, mc->real_vram_size >> 20); | 1198 | mc->vram_end, mc->real_vram_size >> 20); |
1202 | } else { | 1199 | } else { |
1203 | u64 base = 0; | 1200 | u64 base = 0; |
1204 | if (rdev->flags & RADEON_IS_IGP) | 1201 | if (rdev->flags & RADEON_IS_IGP) { |
1205 | base = (RREG32(MC_VM_FB_LOCATION) & 0xFFFF) << 24; | 1202 | base = RREG32(MC_VM_FB_LOCATION) & 0xFFFF; |
1203 | base <<= 24; | ||
1204 | } | ||
1206 | radeon_vram_location(rdev, &rdev->mc, base); | 1205 | radeon_vram_location(rdev, &rdev->mc, base); |
1207 | rdev->mc.gtt_base_align = 0; | 1206 | rdev->mc.gtt_base_align = 0; |
1208 | radeon_gtt_location(rdev, mc); | 1207 | radeon_gtt_location(rdev, mc); |
@@ -1608,8 +1607,11 @@ void r600_gpu_init(struct radeon_device *rdev) | |||
1608 | rdev->config.r600.tiling_npipes = rdev->config.r600.max_tile_pipes; | 1607 | rdev->config.r600.tiling_npipes = rdev->config.r600.max_tile_pipes; |
1609 | rdev->config.r600.tiling_nbanks = 4 << ((ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT); | 1608 | rdev->config.r600.tiling_nbanks = 4 << ((ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT); |
1610 | tiling_config |= BANK_TILING((ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT); | 1609 | tiling_config |= BANK_TILING((ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT); |
1611 | tiling_config |= GROUP_SIZE(0); | 1610 | tiling_config |= GROUP_SIZE((ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT); |
1612 | rdev->config.r600.tiling_group_size = 256; | 1611 | if ((ramcfg & BURSTLENGTH_MASK) >> BURSTLENGTH_SHIFT) |
1612 | rdev->config.r600.tiling_group_size = 512; | ||
1613 | else | ||
1614 | rdev->config.r600.tiling_group_size = 256; | ||
1613 | tmp = (ramcfg & NOOFROWS_MASK) >> NOOFROWS_SHIFT; | 1615 | tmp = (ramcfg & NOOFROWS_MASK) >> NOOFROWS_SHIFT; |
1614 | if (tmp > 3) { | 1616 | if (tmp > 3) { |
1615 | tiling_config |= ROW_TILING(3); | 1617 | tiling_config |= ROW_TILING(3); |
@@ -3528,10 +3530,12 @@ int r600_debugfs_mc_info_init(struct radeon_device *rdev) | |||
3528 | void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo) | 3530 | void r600_ioctl_wait_idle(struct radeon_device *rdev, struct radeon_bo *bo) |
3529 | { | 3531 | { |
3530 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read | 3532 | /* r7xx hw bug. write to HDP_DEBUG1 followed by fb read |
3531 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL | 3533 | * rather than write to HDP_REG_COHERENCY_FLUSH_CNTL. |
3534 | * This seems to cause problems on some AGP cards. Just use the old | ||
3535 | * method for them. | ||
3532 | */ | 3536 | */ |
3533 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && | 3537 | if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_RV740) && |
3534 | rdev->vram_scratch.ptr) { | 3538 | rdev->vram_scratch.ptr && !(rdev->flags & RADEON_IS_AGP)) { |
3535 | void __iomem *ptr = (void *)rdev->vram_scratch.ptr; | 3539 | void __iomem *ptr = (void *)rdev->vram_scratch.ptr; |
3536 | u32 tmp; | 3540 | u32 tmp; |
3537 | 3541 | ||