提交 5ff55717 编写于 作者: D Dave Airlie

drm/radeon/kms: fix r300 vram width calculations

This was incorrect according to the docs and the UMS driver does
it like this.
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 a17538f9
...@@ -506,11 +506,14 @@ void r300_vram_info(struct radeon_device *rdev) ...@@ -506,11 +506,14 @@ void r300_vram_info(struct radeon_device *rdev)
/* DDR for all card after R300 & IGP */ /* DDR for all card after R300 & IGP */
rdev->mc.vram_is_ddr = true; rdev->mc.vram_is_ddr = true;
tmp = RREG32(RADEON_MEM_CNTL); tmp = RREG32(RADEON_MEM_CNTL);
if (tmp & R300_MEM_NUM_CHANNELS_MASK) { tmp &= R300_MEM_NUM_CHANNELS_MASK;
rdev->mc.vram_width = 128; switch (tmp) {
} else { case 0: rdev->mc.vram_width = 64; break;
rdev->mc.vram_width = 64; case 1: rdev->mc.vram_width = 128; break;
case 2: rdev->mc.vram_width = 256; break;
default: rdev->mc.vram_width = 128; break;
} }
r100_vram_init_sizes(rdev); r100_vram_init_sizes(rdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册