summaryrefslogtreecommitdiff
path: root/bsd-core/ati_pcigart.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core/ati_pcigart.c')
-rw-r--r--bsd-core/ati_pcigart.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/bsd-core/ati_pcigart.c b/bsd-core/ati_pcigart.c
index 2eff5be1..f6131664 100644
--- a/bsd-core/ati_pcigart.c
+++ b/bsd-core/ati_pcigart.c
@@ -36,7 +36,7 @@
#define ATI_PCIGART_TABLE_SIZE 32768
int drm_ati_pcigart_init(drm_device_t *dev, unsigned long *addr,
- dma_addr_t *bus_addr)
+ dma_addr_t *bus_addr, int is_pcie)
{
unsigned long pages;
u32 *pci_gart = 0, page_base;
@@ -71,7 +71,14 @@ int drm_ati_pcigart_init(drm_device_t *dev, unsigned long *addr,
page_base = (u32) dev->sg->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;
}
}