Quoting Ramalingam C (2019-12-20 15:11:57)
> From: Lukasz Fiedorowicz <[email protected]>
> 
> 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]
> 
> Signed-off-by: Lukasz Fiedorowicz <[email protected]>
> Signed-off-by: Matthew Auld <[email protected]>
> Signed-off-by: Stuart Summers <[email protected]>
> Signed-off-by: Ramalingam C <[email protected]>
> Cc: Joonas Lahtinen <[email protected]>
> Reviewed-by: Chris Wilson <[email protected]>
> ---
>  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..7e8e5112da25 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: %llu bytes, available %llu 
> bytes\n",
> +                          
> READ_ONCE(i915->mm.regions[INTEL_REGION_LMEM]->total),
> +                          
> READ_ONCE(i915->mm.regions[INTEL_REGION_LMEM]->avail));

It has to be %pa &total, &avail. That removes the READ_ONE() :(
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to