[igt-dev] [PATCH i-g-t v2 11/15] intel_gpu_top: Bump up size of groups to accomodate multi-gt
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Wed May 17 21:25:38 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>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin 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 c8b6b92dd..9bb933cab 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -1511,7 +1511,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.36.1
More information about the igt-dev
mailing list