diff options
author | anholt <anholt@FreeBSD.org> | 2005-07-20 21:10:57 +0000 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2005-07-20 21:10:57 +0000 |
commit | e1ade9ca6498184181b67d270742352e2abb44fc (patch) | |
tree | f8d5015ba84b81c23a865931ee1d2e95b5838c57 /sys/dev/drm/ati_pcigart.c | |
parent | c07c4936d791dbb94e9540ad2676c718f7459a15 (diff) | |
download | FreeBSD-src-e1ade9ca6498184181b67d270742352e2abb44fc.zip FreeBSD-src-e1ade9ca6498184181b67d270742352e2abb44fc.tar.gz |
Add the latest r300 code from r300.sf.net. This is based on the patch supplied
by Vladimir Dergachev for inclusion in DRM CVS, with minor modifications for
FreeBSD CVS and the appropriate license from Nicolai Haehnle on r300_reg.h.
Fixes hangs when using r300.sf.net userland, tested on a Radeon 9600 on amd64.
Diffstat (limited to 'sys/dev/drm/ati_pcigart.c')
-rw-r--r-- | sys/dev/drm/ati_pcigart.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/drm/ati_pcigart.c b/sys/dev/drm/ati_pcigart.c index df8e5da..1442247 100644 --- a/sys/dev/drm/ati_pcigart.c +++ b/sys/dev/drm/ati_pcigart.c @@ -46,7 +46,7 @@ # define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */ 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) { drm_sg_mem_t *entry = dev->sg; unsigned long address = 0; @@ -81,7 +81,14 @@ int drm_ati_pcigart_init(drm_device_t *dev, unsigned long *addr, 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; } } |