diff mbox

[6/7] intel_gtt: Support HSW PTEs

Message ID 1378065086-28705-6-git-send-email-benjamin.widawsky@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky Sept. 1, 2013, 7:51 p.m. UTC
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 tools/intel_gtt.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/tools/intel_gtt.c b/tools/intel_gtt.c
index 874a4f6..acf63c1 100644
--- a/tools/intel_gtt.c
+++ b/tools/intel_gtt.c
@@ -50,7 +50,10 @@  static uint64_t get_phys(uint32_t pt_offset)
 	if (intel_gen(devid) < 6)
 		return phys;
 
-	pae = (phys & 0xff0) << 28;
+	if (IS_HASWELL(devid))
+		pae = (phys & 0x7f0) << 28;
+	else
+		pae = (phys & 0xff0) << 28;
 
 	return (phys | pae) & ~0xfff;
 }