[Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing
Zeng, Oak
oak.zeng at intel.com
Fri Aug 11 19:20:05 UTC 2023
Thanks,
Oak
> -----Original Message-----
> From: Brost, Matthew <matthew.brost at intel.com>
> Sent: August 11, 2023 2:25 PM
> To: Zeng, Oak <oak.zeng at intel.com>
> Cc: intel-xe at lists.freedesktop.org
> Subject: Re: [Intel-xe] [PATCH 2/2] drm/xe: Improve vram info debug printing
>
> On Mon, Aug 07, 2023 at 10:45:01PM -0400, Oak Zeng wrote:
> > Print both device physical address range and CPU io range
> > of vram. Also print vram's actual size, usable size excluding
> > stolen memory, and CPU io accessible size.
> >
> > Signed-off-by: Oak Zeng <oak.zeng at intel.com>
> > ---
> > drivers/gpu/drm/xe/xe_mmio.c | 10 +++++-----
> > 1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> > index 0d0966691eaa..9f249c61ff8e 100644
> > --- a/drivers/gpu/drm/xe/xe_mmio.c
> > +++ b/drivers/gpu/drm/xe/xe_mmio.c
> > @@ -286,12 +286,12 @@ int xe_mmio_probe_vram(struct xe_device *xe)
> > tile->mem.vram.usable_size = vram_size;
> > tile->mem.vram.mapping = xe->mem.vram.mapping + tile_offset;
> >
> > - drm_info(&xe->drm, "VRAM[%u, %u]: %pa, %pa\n", id, tile->id,
> > - &tile->mem.vram.io_start, &tile-
> >mem.vram.usable_size);
> > + drm_info(&xe->drm, "VRAM[%u, %u]: Actual physical size %pa,
> usable size exclude stolen %pa, CPU accessible size %pa\n", id,
> > + tile->id, &tile->mem.vram.actual_physical_size, &tile-
> >mem.vram.usable_size, &tile->mem.vram.io_size);
> >
> > - if (tile->mem.vram.io_size < tile->mem.vram.usable_size)
> > - drm_info(&xe->drm, "VRAM[%u, %u]: CPU access limited
> to %pa\n", id,
> > - tile->id, &tile->mem.vram.io_size);
>
> "CPU access limited to" is helpful to quickly ID if you are on small bar
> device, I would rather not drop this message or at least have a message
> indicating this a small bar device without having to math.
Ok, will add back some small bar device info.
Oak
>
> Matt
>
> > + drm_info(&xe->drm, "VRAM[%u, %u]: DPA range: [%pa-%llx], io
> range: [%pa-%llx]\n", id, tile->id,
> > + &tile->mem.vram.base, tile->mem.vram.base + tile-
> >mem.vram.actual_physical_size,
> > + &tile->mem.vram.io_start, tile->mem.vram.io_start +
> tile->mem.vram.io_size);
> >
> > /* calculate total size using tile size to get the correct HW sizing */
> > total_size += tile_size;
> > --
> > 2.26.3
> >
More information about the Intel-xe
mailing list