[PATCH 1/8] drm/xe: Add Kconfig option for GPU frequency tracing

S Sebinraj s.sebinraj at intel.com
Tue Aug 19 06:34:10 UTC 2025


Add CONFIG_DRM_XE_GPUFREQTRACER configuration option to enable
GPU frequency tracing support. This option depends on DRM_XE and
FTRACE and is disabled by default.

The configuration allows users to opt-in to GPU frequency monitoring
and tracing functionality.

Signed-off-by: S Sebinraj <s.sebinraj at intel.com>
---
 drivers/gpu/drm/xe/Kconfig | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/gpu/drm/xe/Kconfig b/drivers/gpu/drm/xe/Kconfig
index 714d5702dfd7..d9d07ec69875 100644
--- a/drivers/gpu/drm/xe/Kconfig
+++ b/drivers/gpu/drm/xe/Kconfig
@@ -129,6 +129,28 @@ config DRM_XE_FORCE_PROBE
 
 	  Use "!*" to block the probe of the driver for all known devices.
 
+config DRM_XE_GPUFREQTRACER
+	bool "Enable XE GPU frequency tracing"
+	depends on DRM_XE && FTRACE
+	default n
+	help
+	  Enable GPU frequency tracing support for Intel XE driver.
+	  This adds an ftrace tracepoint that reports GPU frequency changes
+	  at periodic boundaries (default 5 secs, configurable via the
+	  gpufreq_monitoring_interval_ms module parameter) and
+	  on direct frequency change events.
+
+	  The monitoring interval can be configured at runtime via the sysfs module parameter:
+	  /sys/module/xe/parameters/gpufreq_monitoring_interval_ms
+
+	  The tracepoint will be available at:
+	  /sys/kernel/debug/tracing/events/power/gpu_frequency
+
+	  Format: {unsigned int state, unsigned int gpu_id}
+	  Where state is the frequency in KHz and gpu_id is the GPU clock domain.
+
+	  If unsure, say N.
+
 menu "drm/Xe Debugging"
 depends on DRM_XE
 depends on EXPERT
-- 
2.34.1



More information about the Intel-xe mailing list