[PATCH i-g-t] tools/intel_gtt: add support for gen10+ devices
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Apr 30 12:48:45 UTC 2025
Hi Tomita,
On 2025-04-24 at 15:41:35 +0800, Tomita Moeko wrote:
> 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
>
I will add Closes: 'gitlab issue' here
> Signed-off-by: Tomita Moeko <tomitamoeko at gmail.com>
LGTM,
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.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