aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/agp/intel-gtt.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2012-06-15 14:55:19 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-06-20 16:49:45 -0400
commite87c46993e30e8fe2e7a0981a532abe8bba07e62 (patch)
treea318dd87c8bf92ba4eba9abff1fd5a0b836722ac /drivers/char/agp/intel-gtt.c
parentbd9e8413c9bdfc36b5b8ce6ed86843d157c17099 (diff)
agp/intel: allow cacheable and GDFT PTEs on ValleyView
The PTE format is similar to SNB, but we don't support an MLC and don't need chipset flushing. Note: I have my questions whether this is right, given that MLC died for snb & ivb, that ivb has grown a L3$ cache instead (which vlv seems to have, too) and that the LLC bit here isn't actually LLC, but just means 'snoop cpu caches'. But I plan to burn this all with the heat of a thousands suns in my gtt rework, so who cares ;-) Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [danvet: Added note.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/char/agp/intel-gtt.c')
-rw-r--r--drivers/char/agp/intel-gtt.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 419a25eeefd8..692610e597db 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1183,9 +1183,17 @@ static void gen6_write_entry(dma_addr_t addr, unsigned int entry,
1183static void valleyview_write_entry(dma_addr_t addr, unsigned int entry, 1183static void valleyview_write_entry(dma_addr_t addr, unsigned int entry,
1184 unsigned int flags) 1184 unsigned int flags)
1185{ 1185{
1186 unsigned int type_mask = flags & ~AGP_USER_CACHED_MEMORY_GFDT;
1187 unsigned int gfdt = flags & AGP_USER_CACHED_MEMORY_GFDT;
1186 u32 pte_flags; 1188 u32 pte_flags;
1187 1189
1188 pte_flags = GEN6_PTE_UNCACHED | I810_PTE_VALID; 1190 if (type_mask == AGP_USER_MEMORY)
1191 pte_flags = GEN6_PTE_UNCACHED | I810_PTE_VALID;
1192 else {
1193 pte_flags = GEN6_PTE_LLC | I810_PTE_VALID;
1194 if (gfdt)
1195 pte_flags |= GEN6_PTE_GFDT;
1196 }
1189 1197
1190 /* gen6 has bit11-4 for physical addr bit39-32 */ 1198 /* gen6 has bit11-4 for physical addr bit39-32 */
1191 addr |= (addr >> 28) & 0xff0; 1199 addr |= (addr >> 28) & 0xff0;
@@ -1380,7 +1388,6 @@ static const struct intel_gtt_driver valleyview_gtt_driver = {
1380 .write_entry = valleyview_write_entry, 1388 .write_entry = valleyview_write_entry,
1381 .dma_mask_size = 40, 1389 .dma_mask_size = 40,
1382 .check_flags = gen6_check_flags, 1390 .check_flags = gen6_check_flags,
1383 .chipset_flush = i9xx_chipset_flush,
1384}; 1391};
1385 1392
1386/* Table to describe Intel GMCH and AGP/PCIE GART drivers. At least one of 1393/* Table to describe Intel GMCH and AGP/PCIE GART drivers. At least one of