diff mbox

ignore cached memory flag in i965_write_entry()?

Message ID 20101214050250.GB27927@zhen-devel.sh.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhenyu Wang Dec. 14, 2010, 5:02 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 326ca2e..c7fe85d 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1138,9 +1138,15 @@  static void i9xx_chipset_flush(void)
 static void i965_write_entry(dma_addr_t addr, unsigned int entry,
 			     unsigned int flags)
 {
+	int pte_flags = I810_PTE_VALID;
+
 	/* Shift high bits down */
 	addr |= (addr >> 28) & 0xf0;
-	writel(addr | I810_PTE_VALID, intel_private.gtt + entry);
+
+	if (flags == AGP_USER_CACHED_MEMORY)
+		pte_flags |= I830_PTE_SYSTEM_CACHED;
+
+	writel(addr | pte_flags, intel_private.gtt + entry);
 }
 
 static bool gen6_check_flags(unsigned int flags)