Re: [PATCH v3] drm/i915/lmem: debugfs for LMEM details

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Ramalingam C (2019-12-20 17:12:24)
> From: Lukasz Fiedorowicz <lukasz.fiedorowicz@xxxxxxxxx>
> 
> Debugfs i915_gem_object is extended to enable the IGTs to
> detect the LMEM's availability and the total size of LMEM.
> 
> v2: READ_ONCE is used [Chris]
> v3: %pa is used for printing the resource [Chris]
> 
> Signed-off-by: Lukasz Fiedorowicz <lukasz.fiedorowicz@xxxxxxxxx>
> Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx>
> Signed-off-by: Stuart Summers <stuart.summers@xxxxxxxxx>
> Signed-off-by: Ramalingam C <ramalingam.c@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c        | 6 +++++-
>  drivers/gpu/drm/i915/intel_memory_region.c | 5 ++++-
>  drivers/gpu/drm/i915/intel_memory_region.h | 2 ++
>  3 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index d28468eaed57..af11023b4c8d 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -373,7 +373,11 @@ static int i915_gem_object_info(struct seq_file *m, void *data)
>                    atomic_read(&i915->mm.free_count),
>                    i915->mm.shrink_memory);
>  
> -       seq_putc(m, '\n');
> +       if (HAS_LMEM(i915)) {
> +               seq_printf(m, "LMEM total: %pa bytes, available %pa bytes\n",
> +                          &i915->mm.regions[INTEL_REGION_LMEM]->total,
> +                          &i915->mm.regions[INTEL_REGION_LMEM]->avail);
> +       }

Note this should be for_each_mem_region()
	seq_printf(m, "%s total: %pa bytes, available %pa bytes\n",
			mem->name, &mem->total, &mem->avail);
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux