[Intel-gfx] [PATCH] drm/i915/lmem: debugfs for LMEM details

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 20 15:13:19 UTC 2019


Quoting Ramalingam C (2019-12-20 15:08:25)
> On 2019-12-20 at 13:34:40 +0000, Chris Wilson wrote:
> > Quoting Ramalingam C (2019-12-20 12:51:16)
> > > From: Lukasz Fiedorowicz <lukasz.fiedorowicz at intel.com>
> > > 
> > > Debugfs i915_gem_object is extended to enable the IGTs to
> > > detect the LMEM's availability and the total size of LMEM.
> > > 
> > > Signed-off-by: Lukasz Fiedorowicz <lukasz.fiedorowicz at intel.com>
> > > Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> > > Signed-off-by: Stuart Summers <stuart.summers at intel.com>
> > > Signed-off-by: Ramalingam C <ramalingam.c 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_debugfs.c        | 6 +++++-
> > >  drivers/gpu/drm/i915/intel_memory_region.c | 5 ++++-
> > >  drivers/gpu/drm/i915/intel_memory_region.h | 3 +++
> > >  3 files changed, 12 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> > > index d28468eaed57..856ded8cd332 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",
> > > +                          (u64)i915->mm.regions[INTEL_REGION_LMEM]->total,
> > > +                          (u64)i915->mm.regions[INTEL_REGION_LMEM]->avail);
> > 
> > %pa for resource_size_t
> > 
> with READ_ONCE(i915->mm.regions[INTEL_REGION_LMEM]->total) %pa is not
> going well. Getting -Werror=format=. %llu is compiling without any warnings.

Did you remove the (u64)?
-Chris


More information about the Intel-gfx mailing list