[PATCH 4/8] drm/xe: Add GPU frequency tracer interface
S Sebinraj
s.sebinraj at intel.com
Tue Aug 19 06:34:13 UTC 2025
Add header file defining the GPU frequency tracer interface.
Provides xe_gpufreqtracer_init() function for device initialization
when CONFIG_DRM_XE_GPUFREQTRACER is enabled, with empty stub
when disabled.
This establishes the API for the GPU frequency tracing subsystem.
Signed-off-by: S Sebinraj <s.sebinraj at intel.com>
---
drivers/gpu/drm/xe/xe_gpufreqtracer.h | 30 +++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 drivers/gpu/drm/xe/xe_gpufreqtracer.h
diff --git a/drivers/gpu/drm/xe/xe_gpufreqtracer.h b/drivers/gpu/drm/xe/xe_gpufreqtracer.h
new file mode 100644
index 000000000000..561abe27b6e2
--- /dev/null
+++ b/drivers/gpu/drm/xe/xe_gpufreqtracer.h
@@ -0,0 +1,30 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright © 2025 Intel Corporation
+ */
+
+#ifndef _XE_GPUFREQTRACER_H_
+#define _XE_GPUFREQTRACER_H_
+
+#include <linux/types.h>
+
+struct xe_device;
+struct xe_gt;
+
+#ifdef CONFIG_DRM_XE_GPUFREQTRACER
+
+/*
+ * Initialize the GPU frequency tracer for a device
+ */
+int xe_gpufreqtracer_init(struct xe_device *xe);
+
+#else /* CONFIG_DRM_XE_GPUFREQTRACER */
+
+static inline int xe_gpufreqtracer_init(struct xe_device *xe)
+{
+ return 0;
+}
+
+#endif /* CONFIG_DRM_XE_GPUFREQTRACER */
+
+#endif /* _XE_GPUFREQTRACER_H_ */
--
2.34.1
More information about the Intel-xe
mailing list