summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2005-09-12 04:35:31 +0000
committerDave Airlie <airlied@linux.ie>2005-09-12 04:35:31 +0000
commitba8f4fb778e88dfa275e35f0d2e01e4ca99e65bd (patch)
treee584fb339cfd576c9844ef4f58647c579cccaf77 /shared-core
parent3f6fcbc6766e3032bfb0421675169cc2e732e399 (diff)
make PCI Express work on 64-bit machines, thanks to Alex Deucher (agd5f)
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_cp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/shared-core/radeon_cp.c b/shared-core/radeon_cp.c
index b7e0ec0c..1bd8e33c 100644
--- a/shared-core/radeon_cp.c
+++ b/shared-core/radeon_cp.c
@@ -1136,7 +1136,7 @@ static void radeon_cp_init_ring_buffer(drm_device_t * dev,
} else
#endif
ring_start = (dev_priv->cp_ring->offset
- - dev->sg->handle + dev_priv->gart_vm_start);
+ - (unsigned long)dev->sg->virtual + dev_priv->gart_vm_start);
RADEON_WRITE(RADEON_CP_RB_BASE, ring_start);
@@ -1163,7 +1163,7 @@ static void radeon_cp_init_ring_buffer(drm_device_t * dev,
drm_sg_mem_t *entry = dev->sg;
unsigned long tmp_ofs, page_ofs;
- tmp_ofs = dev_priv->ring_rptr->offset - dev->sg->handle;
+ tmp_ofs = dev_priv->ring_rptr->offset - (unsigned long)dev->sg->virtual;
page_ofs = tmp_ofs >> PAGE_SHIFT;
RADEON_WRITE(RADEON_CP_RB_RPTR_ADDR, entry->busaddr[page_ofs]);
@@ -1501,7 +1501,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
else
#endif
dev_priv->gart_buffers_offset = (dev->agp_buffer_map->offset
- - dev->sg->handle
+ - (unsigned long)dev->sg->virtual
+ dev_priv->gart_vm_start);
DRM_DEBUG("dev_priv->gart_size %d\n", dev_priv->gart_size);