summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-09-24 15:25:35 +1000
committerDave Airlie <airlied@redhat.com>2008-09-24 15:25:35 +1000
commit35e379ce5a0d23f4c812739f89e02703900cd91b (patch)
treefeec8bd4a54eb8ed63e83f60996722d42fed8574 /linux-core
parentdcf73de059d45ff894c417bb9234933bc650b6b2 (diff)
radeon: add r600 modesetting registers writes
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/radeon_gem.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/linux-core/radeon_gem.c b/linux-core/radeon_gem.c
index 8338f8f5..7cdcf47d 100644
--- a/linux-core/radeon_gem.c
+++ b/linux-core/radeon_gem.c
@@ -979,10 +979,16 @@ void radeon_init_memory_map(struct drm_device *dev)
RADEON_WRITE(AVIVO_HDP_FB_LOCATION, dev_priv->mc_fb_location);
}
- dev_priv->fb_location = (radeon_read_fb_location(dev_priv) & 0xffff) << 16;
- dev_priv->fb_size =
- ((radeon_read_fb_location(dev_priv) & 0xffff0000u) + 0x10000)
- - dev_priv->fb_location;
+ if (dev_priv->chip_family >= CHIP_R600) {
+ dev_priv->fb_location = (radeon_read_fb_location(dev_priv) & 0xffffff) << 24;
+ dev_priv->fb_size = ((radeon_read_fb_location(dev_priv) & 0xff000000u) + 0x1000000)
+ - dev_priv->fb_location;
+ } else {
+ dev_priv->fb_location = (radeon_read_fb_location(dev_priv) & 0xffff) << 16;
+ dev_priv->fb_size =
+ ((radeon_read_fb_location(dev_priv) & 0xffff0000u) + 0x10000)
+ - dev_priv->fb_location;
+ }
}
@@ -1009,6 +1015,11 @@ int radeon_gem_mm_init(struct drm_device *dev)
0);
+ if (dev_priv->chip_family > CHIP_R600) {
+ dev_priv->mm_enabled = true;
+ return 0;
+ }
+
dev_priv->mm.gart_size = (32 * 1024 * 1024);
dev_priv->mm.gart_start = 0;
ret = radeon_gart_init(dev);