aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-06-11 00:40:16 -0400
committerDave Airlie <airlied@redhat.com>2010-06-14 19:56:00 -0400
commitf5c5f040b565435e9a85898dc87ab365395e0603 (patch)
tree39342bf557860add0cd2f9865d3e7d5f382a205c /drivers
parent1ab064de4f3037aacb76d297c65d23e1b646fd2e (diff)
radeon/kms: fix powerpc/rn50 untiled behaviour.
Installing 2.6.34 on a Power5/rn50 combo machine, X showed buggy sw rendering, enabling tiling in the DDX fixed it. Investigation showed that a further /16 was needed in the untiled case on this chipset. Need further investigations on what other chips this could affect, possibly rv100->rv280. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/r100.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index cf89aa2eb28c..1930db6d1771 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -2604,12 +2604,6 @@ int r100_set_surface_reg(struct radeon_device *rdev, int reg,
2604 int surf_index = reg * 16; 2604 int surf_index = reg * 16;
2605 int flags = 0; 2605 int flags = 0;
2606 2606
2607 /* r100/r200 divide by 16 */
2608 if (rdev->family < CHIP_R300)
2609 flags = pitch / 16;
2610 else
2611 flags = pitch / 8;
2612
2613 if (rdev->family <= CHIP_RS200) { 2607 if (rdev->family <= CHIP_RS200) {
2614 if ((tiling_flags & (RADEON_TILING_MACRO|RADEON_TILING_MICRO)) 2608 if ((tiling_flags & (RADEON_TILING_MACRO|RADEON_TILING_MICRO))
2615 == (RADEON_TILING_MACRO|RADEON_TILING_MICRO)) 2609 == (RADEON_TILING_MACRO|RADEON_TILING_MICRO))
@@ -2633,6 +2627,20 @@ int r100_set_surface_reg(struct radeon_device *rdev, int reg,
2633 if (tiling_flags & RADEON_TILING_SWAP_32BIT) 2627 if (tiling_flags & RADEON_TILING_SWAP_32BIT)
2634 flags |= RADEON_SURF_AP0_SWP_32BPP | RADEON_SURF_AP1_SWP_32BPP; 2628 flags |= RADEON_SURF_AP0_SWP_32BPP | RADEON_SURF_AP1_SWP_32BPP;
2635 2629
2630 /* when we aren't tiling the pitch seems to needs to be furtherdivided down. - tested on power5 + rn50 server */
2631 if (tiling_flags & (RADEON_TILING_SWAP_16BIT | RADEON_TILING_SWAP_32BIT)) {
2632 if (!(tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO)))
2633 if (ASIC_IS_RN50(rdev))
2634 pitch /= 16;
2635 }
2636
2637 /* r100/r200 divide by 16 */
2638 if (rdev->family < CHIP_R300)
2639 flags |= pitch / 16;
2640 else
2641 flags |= pitch / 8;
2642
2643
2636 DRM_DEBUG("writing surface %d %d %x %x\n", reg, flags, offset, offset+obj_size-1); 2644 DRM_DEBUG("writing surface %d %d %x %x\n", reg, flags, offset, offset+obj_size-1);
2637 WREG32(RADEON_SURFACE0_INFO + surf_index, flags); 2645 WREG32(RADEON_SURFACE0_INFO + surf_index, flags);
2638 WREG32(RADEON_SURFACE0_LOWER_BOUND + surf_index, offset); 2646 WREG32(RADEON_SURFACE0_LOWER_BOUND + surf_index, offset);