Now that we properly set write-combining on the pages that back the GART,

disable snooping on radeons.

MFC after:	2 weeks
This commit is contained in:
rnoland 2010-04-22 18:47:30 +00:00
parent 811be862d0
commit 3e04ac896a
2 changed files with 8 additions and 5 deletions

View File

@ -39,8 +39,9 @@ __FBSDID("$FreeBSD$");
#define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */
#define ATI_PCIGART_PAGE_MASK (~(ATI_PCIGART_PAGE_SIZE-1))
#define ATI_PCIE_WRITE 0x4
#define ATI_PCIE_READ 0x8
#define ATI_GART_NOSNOOP 0x1
#define ATI_GART_WRITE 0x4
#define ATI_GART_READ 0x8
static void
drm_ati_alloc_pcigart_table_cb(void *arg, bus_dma_segment_t *segs,
@ -196,13 +197,15 @@ drm_ati_pcigart_init(struct drm_device *dev,
case DRM_ATI_GART_IGP:
page_base |=
(upper_32_bits(entry_addr) & 0xff) << 4;
page_base |= 0xc;
page_base |= ATI_GART_READ | ATI_GART_WRITE;
page_base |= ATI_GART_NOSNOOP;
break;
case DRM_ATI_GART_PCIE:
page_base >>= 8;
page_base |=
(upper_32_bits(entry_addr) & 0xff) << 24;
page_base |= ATI_PCIE_READ | ATI_PCIE_WRITE;
page_base |= ATI_GART_READ | ATI_GART_WRITE;
page_base |= ATI_GART_NOSNOOP;
break;
default:
case DRM_ATI_GART_PCI:

View File

@ -180,7 +180,7 @@ int r600_page_table_init(struct drm_device *dev)
entry_addr = entry->busaddr[i];
for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
page_base = (u64) entry_addr & ATI_PCIGART_PAGE_MASK;
page_base |= R600_PTE_VALID | R600_PTE_SYSTEM | R600_PTE_SNOOPED;
page_base |= R600_PTE_VALID | R600_PTE_SYSTEM;
page_base |= R600_PTE_READABLE | R600_PTE_WRITEABLE;
*pci_gart = page_base;