Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tools/intel_gpu_top: Fix intel_gpu_top for pre-snb
@ 2024-10-08 21:49 Ville Syrjala
  2024-10-08 22:47 ` ✓ CI.xeBAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Ville Syrjala @ 2024-10-08 21:49 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

__I915_PMU_REQUESTED_FREQUENCY is not available on pre-snb (*)
so checking for it breaks intel_gpu_top completely for those
machines. Check __I915_PMU_INTERRUPTS instead, which I believe
is available on everything. Another option would be
__I915_PMU_SOFTWARE_GT_AWAKE_TIME.

* we do have frequency information on ilk, but we've not
  reverse engineered the hw unit<->Hz conversion factor so
  exposing it as is might be a bit confusing...

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tools/intel_gpu_top.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
index 9b65ae4eb941..a608b894d3de 100644
--- a/tools/intel_gpu_top.c
+++ b/tools/intel_gpu_top.c
@@ -563,7 +563,7 @@ static int get_num_gts(uint64_t type)
 
 	errno = 0;
 	for (cnt = 0; cnt < MAX_GTS; cnt++) {
-		fd = igt_perf_open(type, __I915_PMU_REQUESTED_FREQUENCY(cnt));
+		fd = igt_perf_open(type, __I915_PMU_INTERRUPTS(cnt));
 		if (fd < 0)
 			break;
 
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-10-11  9:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 21:49 [PATCH i-g-t] tools/intel_gpu_top: Fix intel_gpu_top for pre-snb Ville Syrjala
2024-10-08 22:47 ` ✓ CI.xeBAT: success for " Patchwork
2024-10-08 23:01 ` ✓ Fi.CI.BAT: " Patchwork
2024-10-09  6:24 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-10  4:00 ` ✗ Fi.CI.IGT: " Patchwork
2024-10-11  9:25 ` [PATCH i-g-t] " Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox