Commit 4ce9198e authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

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: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 37f9003b
...@@ -2365,11 +2365,10 @@ void r100_mc_init(struct radeon_device *rdev) ...@@ -2365,11 +2365,10 @@ void r100_mc_init(struct radeon_device *rdev)
*/ */
void r100_pll_errata_after_index(struct radeon_device *rdev) void r100_pll_errata_after_index(struct radeon_device *rdev)
{ {
if (!(rdev->pll_errata & CHIP_ERRATA_PLL_DUMMYREADS)) { if (rdev->pll_errata & CHIP_ERRATA_PLL_DUMMYREADS) {
return;
}
(void)RREG32(RADEON_CLOCK_CNTL_DATA); (void)RREG32(RADEON_CLOCK_CNTL_DATA);
(void)RREG32(RADEON_CRTC_GEN_CNTL); (void)RREG32(RADEON_CRTC_GEN_CNTL);
}
} }
static void r100_pll_errata_after_data(struct radeon_device *rdev) static void r100_pll_errata_after_data(struct radeon_device *rdev)
......
...@@ -2941,9 +2941,8 @@ static void combios_write_ram_size(struct drm_device *dev) ...@@ -2941,9 +2941,8 @@ static void combios_write_ram_size(struct drm_device *dev)
if (rev < 3) { if (rev < 3) {
mem_cntl = RBIOS32(offset + 1); mem_cntl = RBIOS32(offset + 1);
mem_size = RBIOS16(offset + 5); mem_size = RBIOS16(offset + 5);
if (((rdev->flags & RADEON_FAMILY_MASK) < CHIP_R200) && if ((rdev->family < CHIP_R200) &&
((dev->pdev->device != 0x515e) !ASIC_IS_RN50(rdev))
&& (dev->pdev->device != 0x5969)))
WREG32(RADEON_MEM_CNTL, mem_cntl); WREG32(RADEON_MEM_CNTL, mem_cntl);
} }
} }
...@@ -2954,10 +2953,8 @@ static void combios_write_ram_size(struct drm_device *dev) ...@@ -2954,10 +2953,8 @@ static void combios_write_ram_size(struct drm_device *dev)
if (offset) { if (offset) {
rev = RBIOS8(offset - 1); rev = RBIOS8(offset - 1);
if (rev < 1) { if (rev < 1) {
if (((rdev->flags & RADEON_FAMILY_MASK) < if ((rdev->family < CHIP_R200)
CHIP_R200) && !ASIC_IS_RN50(rdev)) {
&& ((dev->pdev->device != 0x515e)
&& (dev->pdev->device != 0x5969))) {
int ram = 0; int ram = 0;
int mem_addr_mapping = 0; int mem_addr_mapping = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment