diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-02-05 01:58:28 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-08 18:31:20 -0500 |
commit | 4612dc97991a09e1a9e4d5d981e16589d7cb150c (patch) | |
tree | bd307eed8985ad4e445b0b43ece3f0e076aaa86b /drivers/gpu/drm/radeon/r420.c | |
parent | 3c537889e17232e9073f75ae8710ea0f008c5a29 (diff) |
drm/radeon/kms: clean up some low-hanging magic numbers
Switch some magic numbers to their proper defines.
The register header madness needs to be cleaned up
at some point.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r420.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r420.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r420.c b/drivers/gpu/drm/radeon/r420.c index d9373246c97f..12ebbdb83d1c 100644 --- a/drivers/gpu/drm/radeon/r420.c +++ b/drivers/gpu/drm/radeon/r420.c | |||
@@ -69,7 +69,8 @@ void r420_pipes_init(struct radeon_device *rdev) | |||
69 | unsigned num_pipes; | 69 | unsigned num_pipes; |
70 | 70 | ||
71 | /* GA_ENHANCE workaround TCL deadlock issue */ | 71 | /* GA_ENHANCE workaround TCL deadlock issue */ |
72 | WREG32(0x4274, (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)); | 72 | WREG32(R300_GA_ENHANCE, R300_GA_DEADLOCK_CNTL | R300_GA_FASTSYNC_CNTL | |
73 | (1 << 2) | (1 << 3)); | ||
73 | /* add idle wait as per freedesktop.org bug 24041 */ | 74 | /* add idle wait as per freedesktop.org bug 24041 */ |
74 | if (r100_gui_wait_for_idle(rdev)) { | 75 | if (r100_gui_wait_for_idle(rdev)) { |
75 | printk(KERN_WARNING "Failed to wait GUI idle while " | 76 | printk(KERN_WARNING "Failed to wait GUI idle while " |
@@ -97,17 +98,17 @@ void r420_pipes_init(struct radeon_device *rdev) | |||
97 | tmp = (7 << 1); | 98 | tmp = (7 << 1); |
98 | break; | 99 | break; |
99 | } | 100 | } |
100 | WREG32(0x42C8, (1 << num_pipes) - 1); | 101 | WREG32(R500_SU_REG_DEST, (1 << num_pipes) - 1); |
101 | /* Sub pixel 1/12 so we can have 4K rendering according to doc */ | 102 | /* Sub pixel 1/12 so we can have 4K rendering according to doc */ |
102 | tmp |= (1 << 4) | (1 << 0); | 103 | tmp |= R300_TILE_SIZE_16 | R300_ENABLE_TILING; |
103 | WREG32(0x4018, tmp); | 104 | WREG32(R300_GB_TILE_CONFIG, tmp); |
104 | if (r100_gui_wait_for_idle(rdev)) { | 105 | if (r100_gui_wait_for_idle(rdev)) { |
105 | printk(KERN_WARNING "Failed to wait GUI idle while " | 106 | printk(KERN_WARNING "Failed to wait GUI idle while " |
106 | "programming pipes. Bad things might happen.\n"); | 107 | "programming pipes. Bad things might happen.\n"); |
107 | } | 108 | } |
108 | 109 | ||
109 | tmp = RREG32(0x170C); | 110 | tmp = RREG32(R300_DST_PIPE_CONFIG); |
110 | WREG32(0x170C, tmp | (1 << 31)); | 111 | WREG32(R300_DST_PIPE_CONFIG, tmp | R300_PIPE_AUTO_CONFIG); |
111 | 112 | ||
112 | WREG32(R300_RB2D_DSTCACHE_MODE, | 113 | WREG32(R300_RB2D_DSTCACHE_MODE, |
113 | RREG32(R300_RB2D_DSTCACHE_MODE) | | 114 | RREG32(R300_RB2D_DSTCACHE_MODE) | |