[Intel-gfx] [PATCH 15/21] drm/i915: accurate page size tracking for the ppgtt
Chris Wilson
chris at chris-wilson.co.uk
Sat Sep 23 08:54:54 UTC 2017
Quoting Matthew Auld (2017-09-22 18:32:46)
> Now that we support multiple page sizes for the ppgtt, it would be
> useful to track the real usage for debugging purposes.
Now? I kind of think knowing as we add the different support is
interesting.
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 11 +++++++++++
> drivers/gpu/drm/i915/i915_gem_object.h | 10 ++++++++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 252e36b3ca02..631baa67dc9a 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1052,6 +1052,8 @@ static void gen8_ppgtt_insert_3lvl(struct i915_address_space *vm,
>
> gen8_ppgtt_insert_pte_entries(ppgtt, &ppgtt->pdp, &iter, &idx,
> cache_level);
> +
> + vma->page_sizes.gtt = I915_GTT_PAGE_SIZE;
> }
>
> static void gen8_ppgtt_insert_huge_entries(struct i915_vma *vma,
> @@ -1144,8 +1146,11 @@ static void gen8_ppgtt_insert_huge_entries(struct i915_vma *vma,
> vaddr = kmap_atomic_px(pd);
> vaddr[idx.pde] |= GEN8_PDE_IPS_64K;
> kunmap_atomic(vaddr);
> + page_size = I915_GTT_PAGE_SIZE_64K;
> }
>
> + vma->page_sizes.gtt |= page_size;
> +
* mutters.
Similarly, I hope you are keeping track of all the '/* blah'
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list