On Wed, May 28, 2025 at 08:01:21PM +0000, Juston Li wrote:
On Wed, 2025-05-28 at 18:34 +0000, Juston Li wrote:
On Thu, 2025-05-22 at 16:14 +0100, Tvrtko Ursulin wrote:
>
> On 22/05/2025 15:50, Lucas De Marchi wrote:
> > + dri-devel
> >
> > On Wed, May 21, 2025 at 10:42:35PM +0000, Juston Li wrote:
> > > Add tracepoints behind CONFIG_DRM_XE_GPU_MEM_TRACEPOINTS for
> > > tracking
> > > global and per-process GPU memory usage.
> > >
> > > These are required by VSR on Android 12+ for reporting GPU
> > > driver
> > > memory
> > > allocations.
> > >
> > > v2:
> > > - Use u64 as preferred by checkpatch (Tvrtko)
> > > - Fix errors in comments/Kconfig description (Tvrtko)
> > > - drop redundant "CONFIG_" in Kconfig
> > >
> > > Signed-off-by: Juston Li <[email protected]>
> > > Reviewed-by: Tvrtko Ursulin <[email protected]>
> > > ---
> > > drivers/gpu/drm/xe/Kconfig.debug     | 12 +++++++
> > > drivers/gpu/drm/xe/xe_bo.c           | 47
> > > ++++++++++++++++++++++++++++
> > > drivers/gpu/drm/xe/xe_device_types.h | 16 ++++++++++
> > > 3 files changed, 75 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/xe/Kconfig.debug
> > > b/drivers/gpu/drm/xe/
> > > Kconfig.debug
> > > index 01735c6ece8ba..2371eeda0afd5 100644
> > > --- a/drivers/gpu/drm/xe/Kconfig.debug
> > > +++ b/drivers/gpu/drm/xe/Kconfig.debug
> > > @@ -111,3 +111,15 @@ config DRM_XE_USERPTR_INVAL_INJECT
> > >
> > >      Recommended for driver developers only.
> > >      If in doubt, say "N".
> > > +
> > > +config DRM_XE_GPU_MEM_TRACEPOINTS
> >
> > is there any particular reason to make this user-configurable per
> > driver?
> > Why aren't we making CONFIG_TRACE_GPU_MEM configurable (if
> > needed,
> > but
> > could just depend on CONFIG_TRACEPOINTS) and then drivers just
> > use
> > it.
>
> Could be done like that too. Msm does unconditional select
> TRACE_GPU_MEM
> which I thought wouldn't be acceptable so I suggested making it
> configurable.

Ok yeah, I don't see a reason to make it per-driver either. I'll make
CONFIG_TRACE_GPU_MEM configurable since we don't have
CONFIG_TRACEPOINTS or CONFIG_TRACING enabled on GKI.

Juston

Scratch that, CONFIG_TRACEPOINTS is enabled on GKI so we could do the
depend.

But now that I think about it, CONFIG_TRACEPOINTS seems enabled so
commonly I wonder if we might as well just unconditional select like
Msm as Tvrtko mentioned and then not have to deal with the #ifdefs?

we are trying to remove the selects... they are too cumbersome.
See e.g. 
https://lore.kernel.org/intel-xe/[email protected]

We should **depend** on other parts of the kernel, not select them.


If that's not acceptable, I'm leaning on just making
CONFIG_TRACE_GPU_MEM configurable.

sounds good to me.

thanks
Lucas De Marchi

Reply via email to