diff options
author | 2009-02-15 20:38:17 +0000 | |
---|---|---|
committer | 2009-02-15 20:38:17 +0000 | |
commit | 6cf8e74b5fa4086d42cac333786367da2e7118dd (patch) | |
tree | 7af701acf891bb8762dd0aa3f9fba0c80f855582 /sys | |
parent | for the sake of correctness bus_dmamap_sync when necessary for the (diff) | |
download | wireguard-openbsd-6cf8e74b5fa4086d42cac333786367da2e7118dd.tar.xz wireguard-openbsd-6cf8e74b5fa4086d42cac333786367da2e7118dd.zip |
on IGPGART chipsets, map the pcigart table uncached. This fixes some bugs for
freebsd and linux, and i'm assured by an amd employee that it is needed.
With this diff the RS690 at phesslers@'s work work the first time you boot it,
you can even restart X to your heart's content. However, after a reboot it goes
back to not working. I've not managed to rule out buggered hardware yet, so
anyone with a RS690 chipset would make my very grateful by checking if the same
thing happens there.
RS480 also needs this, but seems to still be broken.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/ati_pcigart.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/ati_pcigart.c b/sys/dev/pci/drm/ati_pcigart.c index 73434d9a533..77f3450626c 100644 --- a/sys/dev/pci/drm/ati_pcigart.c +++ b/sys/dev/pci/drm/ati_pcigart.c @@ -107,11 +107,16 @@ drm_ati_pcigart_init(struct drm_device *dev, } if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { + int flags = 0; + DRM_DEBUG("PCI: no table in VRAM: using normal RAM\n"); + if (gart_info->gart_reg_if == DRM_ATI_GART_IGP) + flags |= BUS_DMA_NOCACHE; + gart_info->mem = drm_dmamem_alloc(dev->dmat, gart_info->table_size, PAGE_SIZE, 1, - gart_info->table_size, 0, 0); + gart_info->table_size, flags, 0); if (gart_info->mem == NULL) { DRM_ERROR("cannot allocate PCI GART page!\n"); ret = ENOMEM; |