From ab59dd285c4ccdec92adadfcb869fc83edd96e86 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 20 Jul 2005 21:17:47 +0000 Subject: 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! --- bsd-core/ati_pcigart.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'bsd-core/ati_pcigart.c') 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; } } -- cgit v1.2.3