[igt-dev] [PATCH i-g-t 11/15] intel_gpu_top: Bump up size of groups to accomodate multi-gt
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Sat May 6 00:55:24 UTC 2023
Create more space in groups to add gt specific freq and rc6 groups.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
---
tools/intel_gpu_top.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 63ce9fade..87d869802 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1929,7 +1929,13 @@ print_header(const struct igt_device_card *card,
.display_name = "Power W",
.items = power_items,
};
- struct cnt_group *groups[] = {
+ /*
+ * Array size calculation:
+ * One group each for period, irq, power, NULL = 4
+ * One group per gt for freq = MAX_GTS
+ * One group per gt for rc6 = MAX_GTS
+ */
+ struct cnt_group *groups[4 + MAX_GTS + MAX_GTS] = {
&period_group,
&freq_group,
&irq_group,
--
2.34.1
More information about the igt-dev
mailing list