aboutsummaryrefslogtreecommitdiff
path: root/linux-core/ati_pcigart.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2005-07-20 21:17:47 +0000
committerEric Anholt <anholt@freebsd.org>2005-07-20 21:17:47 +0000
commitab59dd285c4ccdec92adadfcb869fc83edd96e86 (patch)
tree991a507b2e9afee54d15bc60848c988d5d4b9666 /linux-core/ati_pcigart.c
parent026e12ea937865748d54d3b8a7a3b77ccc4e3efb (diff)
Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,
with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle. Big thanks to everyone involved!
Diffstat (limited to 'linux-core/ati_pcigart.c')
-rw-r--r--linux-core/ati_pcigart.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index f990635a..3e654c79 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -92,7 +92,8 @@ static void drm_ati_free_pcigart_table(unsigned long address)
}
int drm_ati_pcigart_init(drm_device_t * dev,
- unsigned long *addr, dma_addr_t * bus_addr)
+ unsigned long *addr, dma_addr_t * bus_addr,
+ int is_pcie)
{
drm_sg_mem_t *entry = dev->sg;
unsigned long address = 0;
@@ -149,7 +150,14 @@ int drm_ati_pcigart_init(drm_device_t * dev,
page_base = (u32) entry->busaddr[i];
for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
- *pci_gart++ = cpu_to_le32(page_base);
+ if (is_pcie)
+ {
+ *pci_gart = (cpu_to_le32(page_base)>>8) | 0xc;
+ DRM_DEBUG("PCIE: %d %08X %08X to %p\n", i, page_base, (cpu_to_le32(page_base)>>8)|0xc, pci_gart);
+ }
+ else
+ *pci_gart = cpu_to_le32(page_base);
+ pci_gart++;
page_base += ATI_PCIGART_PAGE_SIZE;
}
}