aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-06-30 12:13:55 -0400
committerDave Airlie <airlied@redhat.com>2010-08-01 19:59:57 -0400
commit4ce9198ecf73739104b274c7c6377ef3659b3ca5 (patch)
treeaca62519a52541a8eb19d715d15390b0f4e1e67d
parent37f9003bd355d9109769fff66f7f228aab42155b (diff)
drm/radeon/kms: minor driver cleanups
- Make the logic in r100_pll_errata_after_index() match the other errata functions - Use rdev->family rather than rdev->flags & RADEON_FAMILY_MASK for kms - replace rn50 check using ids with ASIC_IS_RN50 convenience macro Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/r100.c7
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c11
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index ab37717a5d39..5aa299527317 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -2365,11 +2365,10 @@ void r100_mc_init(struct radeon_device *rdev)
2365 */ 2365 */
2366void r100_pll_errata_after_index(struct radeon_device *rdev) 2366void r100_pll_errata_after_index(struct radeon_device *rdev)
2367{ 2367{
2368 if (!(rdev->pll_errata & CHIP_ERRATA_PLL_DUMMYREADS)) { 2368 if (rdev->pll_errata & CHIP_ERRATA_PLL_DUMMYREADS) {
2369 return; 2369 (void)RREG32(RADEON_CLOCK_CNTL_DATA);
2370 (void)RREG32(RADEON_CRTC_GEN_CNTL);
2370 } 2371 }
2371 (void)RREG32(RADEON_CLOCK_CNTL_DATA);
2372 (void)RREG32(RADEON_CRTC_GEN_CNTL);
2373} 2372}
2374 2373
2375static void r100_pll_errata_after_data(struct radeon_device *rdev) 2374static void r100_pll_errata_after_data(struct radeon_device *rdev)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index d1c1d8dd93ce..3426dd22aa08 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -2941,9 +2941,8 @@ static void combios_write_ram_size(struct drm_device *dev)
2941 if (rev < 3) { 2941 if (rev < 3) {
2942 mem_cntl = RBIOS32(offset + 1); 2942 mem_cntl = RBIOS32(offset + 1);
2943 mem_size = RBIOS16(offset + 5); 2943 mem_size = RBIOS16(offset + 5);
2944 if (((rdev->flags & RADEON_FAMILY_MASK) < CHIP_R200) && 2944 if ((rdev->family < CHIP_R200) &&
2945 ((dev->pdev->device != 0x515e) 2945 !ASIC_IS_RN50(rdev))
2946 && (dev->pdev->device != 0x5969)))
2947 WREG32(RADEON_MEM_CNTL, mem_cntl); 2946 WREG32(RADEON_MEM_CNTL, mem_cntl);
2948 } 2947 }
2949 } 2948 }
@@ -2954,10 +2953,8 @@ static void combios_write_ram_size(struct drm_device *dev)
2954 if (offset) { 2953 if (offset) {
2955 rev = RBIOS8(offset - 1); 2954 rev = RBIOS8(offset - 1);
2956 if (rev < 1) { 2955 if (rev < 1) {
2957 if (((rdev->flags & RADEON_FAMILY_MASK) < 2956 if ((rdev->family < CHIP_R200)
2958 CHIP_R200) 2957 && !ASIC_IS_RN50(rdev)) {
2959 && ((dev->pdev->device != 0x515e)
2960 && (dev->pdev->device != 0x5969))) {
2961 int ram = 0; 2958 int ram = 0;
2962 int mem_addr_mapping = 0; 2959 int mem_addr_mapping = 0;
2963 2960