[PATCH i-g-t] tools/intel_gtt: add support for gen10+ devices

Tomita Moeko tomitamoeko at gmail.com
Thu Apr 24 07:41:35 UTC 2025


Gen10 and later devices all have the same 64 bit GGTT entries as gen8.
Additionally, devices from Meator Lake onwards have bits 45:12 for
physical address [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=341ad0e8e254267704e0b87e35ad23aba5c02359

Signed-off-by: Tomita Moeko <tomitamoeko at gmail.com>
---
 tools/intel_gtt.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tools/intel_gtt.c b/tools/intel_gtt.c
index c0f3d16a6..658336d99 100644
--- a/tools/intel_gtt.c
+++ b/tools/intel_gtt.c
@@ -86,7 +86,14 @@ static uint64_t get_phys(uint32_t pt_offset)
 			break;
 		case 8:
 		case 9:
-			phys = phys & 0x7ffffff000;
+		case 10:
+		case 11:
+		case 12:
+		case 20:
+			if (intel_graphics_ver(devid) >= IP_VER(12, 70))
+				phys = phys & 0x3ffffffff000;
+			else
+				phys = phys & 0x7ffffff000;
 			break;
 		default:
 			fprintf(stderr, "Unsupported platform\n");
-- 
2.47.2



More information about the igt-dev mailing list