svn commit: r207069 - head/sys/dev/drm

Robert Noland rnoland at FreeBSD.org
Thu Apr 22 18:47:30 UTC 2010


Author: rnoland
Date: Thu Apr 22 18:47:30 2010
New Revision: 207069
URL: http://svn.freebsd.org/changeset/base/207069

Log:
  Now that we properly set write-combining on the pages that back the GART,
  disable snooping on radeons.
  
  MFC after:	2 weeks

Modified:
  head/sys/dev/drm/ati_pcigart.c
  head/sys/dev/drm/r600_cp.c

Modified: head/sys/dev/drm/ati_pcigart.c
==============================================================================
--- head/sys/dev/drm/ati_pcigart.c	Thu Apr 22 18:47:23 2010	(r207068)
+++ head/sys/dev/drm/ati_pcigart.c	Thu Apr 22 18:47:30 2010	(r207069)
@@ -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 *
 			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:

Modified: head/sys/dev/drm/r600_cp.c
==============================================================================
--- head/sys/dev/drm/r600_cp.c	Thu Apr 22 18:47:23 2010	(r207068)
+++ head/sys/dev/drm/r600_cp.c	Thu Apr 22 18:47:30 2010	(r207069)
@@ -180,7 +180,7 @@ int r600_page_table_init(struct drm_devi
 		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;


More information about the svn-src-head mailing list