]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/bo: add GPU memory trace points
authorJuston Li <justonli@chromium.org>
Wed, 9 Jul 2025 19:23:14 +0000 (12:23 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 10 Jul 2025 14:55:21 +0000 (07:55 -0700)
commitce3d39fae3d35fc9f09a7d65bffc218fbdebd002
treed4b8c6ff7fe9061a96cceb1616b9631b6f2882e4
parentf5c5d29522ecb3b6797130995e74e4774caf4548
drm/xe/bo: add GPU memory trace points

Add TRACE_GPU_MEM tracepoints for tracking global GPU memory usage.

These are required by VSR on Android 12+ for reporting GPU driver memory
allocations.

v5:
 - Drop process_mem tracking
 - Set the gpu_id field to dev->primary->index (Lucas, Tvrtko)
 - Formatting cleanup under 80 columns

v3:
 - Use now configurable CONFIG_TRACE_GPU_MEM instead of adding a
   per-driver Kconfig (Lucas)

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 <justonli@chromium.org>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250709192313.479336-2-lucas.demarchi@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_device_types.h