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! --- linux-core/ati_pcigart.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'linux-core/ati_pcigart.c') 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; } } -- cgit v1.2.3