[RFC 4/4] drm/amdgpu: Expose special on chip memory pools in fdinfo
Alex Deucher
alexdeucher at gmail.com
Tue Oct 29 14:11:11 UTC 2024
Applied the series. Thanks!
Alex
On Mon, Oct 28, 2024 at 1:51 PM Christian König
<christian.koenig at amd.com> wrote:
>
> Am 24.10.24 um 11:23 schrieb Tvrtko Ursulin:
> > From: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
> >
> > In the past these specialized on chip memory pools were reported as system
> > memory (aka 'cpu') which was not correct and misleading. That has since
> > been removed so lets make them visible as their own respective memory
> > regions.
> >
> > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
> > Cc: Christian König <christian.koenig at amd.com>
> > Cc: Yunxiang Li <Yunxiang.Li at amd.com>
> > Cc: Alex Deucher <alexdeucher at gmail.com>
>
> Of hand looks correct to me, feel free to add my Reviewed-by: Christian
> König <christian.koenig at amd.com>
>
> > ---
> > It is easy to do but is it worth it I leave to AMD experts to decide.
> >
> > I gave it a quick spin and have only seen all zeros when running a Steam
> > game.
>
> Usage depends on HW generation and use case. IIRC GDS is the most used,
> but only in some rare use cases.
>
> The upcoming HW generations will depend quite a bit on doorbells.
>
> Regards,
> Christian.
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c | 10 +++++++++-
> > 1 file changed, 9 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
> > index 7a9573958d87..df2cf5c33925 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fdinfo.c
> > @@ -66,6 +66,10 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
> > [TTM_PL_VRAM] = "vram",
> > [TTM_PL_TT] = "gtt",
> > [TTM_PL_SYSTEM] = "cpu",
> > + [AMDGPU_PL_GDS] = "gds",
> > + [AMDGPU_PL_GWS] = "gws",
> > + [AMDGPU_PL_OA] = "oa",
> > + [AMDGPU_PL_DOORBELL] = "doorbell",
> > };
> > unsigned int hw_ip, i;
> > int ret;
> > @@ -87,12 +91,16 @@ void amdgpu_show_fdinfo(struct drm_printer *p, struct drm_file *file)
> >
> > drm_printf(p, "pasid:\t%u\n", fpriv->vm.pasid);
> >
> > - for (i = 0; i < TTM_PL_PRIV; i++)
> > + for (i = 0; i < ARRAY_SIZE(pl_name); i++) {
> > + if (!pl_name[i])
> > + continue;
> > +
> > drm_print_memory_stats(p,
> > &stats[i].drm,
> > DRM_GEM_OBJECT_RESIDENT |
> > DRM_GEM_OBJECT_PURGEABLE,
> > pl_name[i]);
> > + }
> >
> > /* Legacy amdgpu keys, alias to drm-resident-memory-: */
> > drm_printf(p, "drm-memory-vram:\t%llu KiB\n",
>
More information about the amd-gfx
mailing list