[Intel-xe] [PATCH 0/2] drm/xe/pmu: Enable PMU interface
Aravind Iddamsetty
aravind.iddamsetty at intel.com
Mon Jun 19 04:51:26 UTC 2023
There are a set of engine group busyness counters provided by HW which are
perfect fit to be exposed via PMU perf events.
BSPEC: 46559, 46560, 46722, 46729
events can be listed using:
perf list
xe_0000_03_00.0/any-engine-group-busy-gt0/ [Kernel PMU event]
xe_0000_03_00.0/copy-group-busy-gt0/ [Kernel PMU event]
xe_0000_03_00.0/interrupts/ [Kernel PMU event]
xe_0000_03_00.0/media-group-busy-gt0/ [Kernel PMU event]
xe_0000_03_00.0/render-group-busy-gt0/ [Kernel PMU event]
and can be read using:
perf stat -a -e "xe_0000_03_00.0/render-group-busy-gt0/" -I 1000
time counts unit events
1.001343319 0 ns xe_0000_03_00.0/render-group-busy-gt0/
2.011523336 0 ns xe_0000_03_00.0/render-group-busy-gt0/
3.014168811 0 ns xe_0000_03_00.0/render-group-busy-gt0/
4.016671838 0 ns xe_0000_03_00.0/render-group-busy-gt0/
5.018363448 0 ns xe_0000_03_00.0/render-group-busy-gt0/
6.020125417 18446743376875220992 ns xe_0000_03_00.0/render-group-busy-gt0/
7.021584533 18446744073708230656 ns xe_0000_03_00.0/render-group-busy-gt0/
8.029878236 696835650983 ns xe_0000_03_00.0/render-group-busy-gt0/
9.032367313 0 ns xe_0000_03_00.0/render-group-busy-gt0/
10.034799448 0 ns xe_0000_03_00.0/render-group-busy-gt0/
The pmu base implementation is taken from i915.
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
Cc: Venkata Ramana Nayana <venkata.ramana.nayana at intel.com>
Aravind Iddamsetty (2):
drm/xe: Get GT clock to nanosecs
drm/xe/pmu: Enable PMU interface
drivers/gpu/drm/xe/Makefile | 1 +
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 5 +
drivers/gpu/drm/xe/xe_device.c | 2 +
drivers/gpu/drm/xe/xe_device_types.h | 4 +
drivers/gpu/drm/xe/xe_gt_clock.c | 10 +
drivers/gpu/drm/xe/xe_gt_clock.h | 4 +-
drivers/gpu/drm/xe/xe_irq.c | 22 +
drivers/gpu/drm/xe/xe_module.c | 5 +
drivers/gpu/drm/xe/xe_pmu.c | 634 +++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_pmu.h | 22 +
drivers/gpu/drm/xe/xe_pmu_types.h | 54 +++
include/uapi/drm/xe_drm.h | 16 +
12 files changed, 778 insertions(+), 1 deletion(-)
create mode 100644 drivers/gpu/drm/xe/xe_pmu.c
create mode 100644 drivers/gpu/drm/xe/xe_pmu.h
create mode 100644 drivers/gpu/drm/xe/xe_pmu_types.h
--
2.25.1
More information about the Intel-xe
mailing list