Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers
@ 2025-10-29  5:31 S Sebinraj
  2025-10-29  6:34 ` ✓ Xe.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: S Sebinraj @ 2025-10-29  5:31 UTC (permalink / raw)
  To: igt-dev
  Cc: jeevaka.badrappan, zbigniew.kempczynski, kamil.konieczny,
	krzysztof.karas, S Sebinraj

Enhance gputop to display GPU frequency information (current/actual)
for each GT in the client header line alongside the DRM minor number.

Key changes:
- Add get_gt_frequencies() function to read GT frequency values
- Support both i915 and Xe drivers using appropriate sysfs paths
- Display format: "DRM minor X  Freq(cur/act) GT0-freq/freq GT1-freq/freq"
- Use IGT API functions (xe_sysfs_gt_path, igt_sysfs_gt_path) for
  driver-agnostic sysfs access

The frequency information helps users monitor GPU performance states
in real-time while observing client workload utilization.

Example output:
  DRM minor 0          Freq(cur/act) GT0-1800/1800 GT1-400/400
  DRM minor 128        Freq(cur/act) GT0-400/400 GT1-400/400

Signed-off-by: S Sebinraj <s.sebinraj@intel.com>
---
 tools/gputop.c    | 113 +++++++++++++++++++++++++++++++++++++++++++++-
 tools/meson.build |   2 +-
 2 files changed, 113 insertions(+), 2 deletions(-)

diff --git a/tools/gputop.c b/tools/gputop.c
index f577a1750..9c4365c5d 100644
--- a/tools/gputop.c
+++ b/tools/gputop.c
@@ -30,13 +30,20 @@
 #include "igt_drm_clients.h"
 #include "igt_drm_fdinfo.h"
 #include "igt_profiling.h"
+#include "igt_sysfs.h"
 #include "drmtest.h"
+#include "xe/xe_gt.h"
 
 enum utilization_type {
 	UTILIZATION_TYPE_ENGINE_TIME,
 	UTILIZATION_TYPE_TOTAL_CYCLES,
 };
 
+#define XE_FREQ_CUR_SUFFIX "/freq0/cur_freq"
+#define XE_FREQ_ACT_SUFFIX "/freq0/act_freq"
+#define I915_FREQ_CUR_SUFFIX "/rps_cur_freq_mhz"
+#define I915_FREQ_ACT_SUFFIX "/rps_act_freq_mhz"
+
 static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
 
 #define ANSI_HEADER "\033[7m"
@@ -76,17 +83,121 @@ static void print_percentage_bar(double percent, int max_len)
 	putchar('|');
 }
 
+static char *get_gt_frequencies(void)
+{
+	char freq_str[512] = "";
+	char gt_info[64];
+	int fd = -1;
+	int num_gts = 0;
+	int gt;
+	bool is_xe = false;
+	bool first = true;
+
+	fd = __drm_open_driver(DRIVER_INTEL | DRIVER_XE);
+	if (fd < 0) {
+		fprintf(stderr, "Failed to open DRM device\n");
+		return NULL;
+	}
+
+	/* Detect driver type and get GT count */
+	is_xe = is_xe_device(fd);
+	if (is_xe)
+		num_gts = xe_number_gt(fd);
+	else
+		num_gts = igt_sysfs_get_num_gt(fd);
+
+	if (num_gts <= 0) {
+		fprintf(stderr, "Failed to get GT count\n");
+		close(fd);
+		return NULL;
+	}
+
+	/* Read frequencies for each GT */
+	for (gt = 0; gt < num_gts; gt++) {
+		char gt_path[96];
+		char freq_path[128];
+		char freq_buf[32];
+		char *path_ptr;
+		unsigned int cur_freq = 0, act_freq = 0;
+		FILE *fp;
+
+		/* Get GT-specific sysfs path */
+		if (is_xe)
+			path_ptr = xe_sysfs_gt_path(fd, gt, gt_path, sizeof(gt_path));
+		else
+			path_ptr = igt_sysfs_gt_path(fd, gt, gt_path, sizeof(gt_path));
+
+		if (!path_ptr) {
+			fprintf(stderr, "Failed to get sysfs path for GT%d\n", gt);
+			continue;
+		}
+
+		/* Read current/requested frequency */
+		if (is_xe)
+			snprintf(freq_path, sizeof(freq_path), "%s%s", gt_path, XE_FREQ_CUR_SUFFIX);
+		else
+			snprintf(freq_path, sizeof(freq_path), "%s%s", gt_path, I915_FREQ_CUR_SUFFIX);
+
+		fp = fopen(freq_path, "r");
+		if (fp) {
+			if (fgets(freq_buf, sizeof(freq_buf), fp))
+				cur_freq = atoi(freq_buf);
+			fclose(fp);
+		}
+
+		/* Read actual frequency */
+		if (is_xe)
+			snprintf(freq_path, sizeof(freq_path), "%s%s", gt_path, XE_FREQ_ACT_SUFFIX);
+		else
+			snprintf(freq_path, sizeof(freq_path), "%s%s", gt_path, I915_FREQ_ACT_SUFFIX);
+
+		fp = fopen(freq_path, "r");
+		if (fp) {
+			if (fgets(freq_buf, sizeof(freq_buf), fp))
+				act_freq = atoi(freq_buf);
+			fclose(fp);
+		}
+
+		/* Append to frequency string */
+		if (!first)
+			strcat(freq_str, " ");
+		else
+			first = false;
+
+		snprintf(gt_info, sizeof(gt_info), "GT%d-%u/%u", gt, cur_freq, act_freq);
+		strcat(freq_str, gt_info);
+	}
+
+	close(fd);
+
+	if (strlen(freq_str) > 0)
+		return strdup(freq_str);
+
+	return NULL;
+}
+
 static int
 print_client_header(struct igt_drm_client *c, int lines, int con_w, int con_h,
 		    int *engine_w)
 {
 	int ret, len;
+	char *freq_info = NULL;
 
 	if (lines++ >= con_h)
 		return lines;
 
 	printf(ANSI_HEADER);
-	ret = printf("DRM minor %u", c->drm_minor);
+
+	/* Get frequency information */
+	freq_info = get_gt_frequencies();
+
+	if (freq_info) {
+		ret = printf("DRM minor %u          Freq(cur/act) %s", c->drm_minor, freq_info);
+		free(freq_info);
+	} else {
+		ret = printf("DRM minor %u", c->drm_minor);
+	}
+
 	n_spaces(con_w - ret);
 
 	if (lines++ >= con_h)
diff --git a/tools/meson.build b/tools/meson.build
index 8185ba160..d3261d429 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -73,7 +73,7 @@ endif
 executable('gputop', 'gputop.c',
            install : true,
            install_rpath : bindir_rpathdir,
-           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,lib_igt_profiling,math])
+           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,lib_igt_profiling,tool_deps,math])
 
 intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
 executable('intel_l3_parity', sources : intel_l3_parity_src,
-- 
2.43.0


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

* ✓ Xe.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2)
  2025-10-29  5:31 [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers S Sebinraj
@ 2025-10-29  6:34 ` Patchwork
  2025-10-29  7:46 ` [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers Krzysztof Karas
  2025-10-29  8:47 ` ✓ i915.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2025-10-29  6:34 UTC (permalink / raw)
  To: S Sebinraj; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

== Series Details ==

Series: RFC: tools/gputop: Add GPU frequencies to the client headers (rev2)
URL   : https://patchwork.freedesktop.org/series/156602/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_8599_BAT -> XEIGTPW_13961_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (13 -> 13)
------------------------------

  No changes in participating hosts

Known issues
------------

  Here are the changes found in XEIGTPW_13961_BAT that come from known issues:

### IGT changes ###

#### Possible fixes ####

  * igt@kms_flip@basic-plain-flip@d-edp1:
    - bat-adlp-7:         [DMESG-WARN][1] ([Intel XE#4543]) -> [PASS][2] +1 other test pass
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8599/bat-adlp-7/igt@kms_flip@basic-plain-flip@d-edp1.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13961/bat-adlp-7/igt@kms_flip@basic-plain-flip@d-edp1.html

  
  [Intel XE#4543]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4543


Build changes
-------------

  * IGT: IGT_8599 -> IGTPW_13961
  * Linux: xe-3996-5742fc7aea99a1326637a7106eeaeac383a1c76d -> xe-4000-62fe6039c8508b5dba1f64e3bc8dfe555f95afc2

  IGTPW_13961: 13961
  IGT_8599: b22b9ca357de868f3848269e5eb7c4cc53b3f2d1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-3996-5742fc7aea99a1326637a7106eeaeac383a1c76d: 5742fc7aea99a1326637a7106eeaeac383a1c76d
  xe-4000-62fe6039c8508b5dba1f64e3bc8dfe555f95afc2: 62fe6039c8508b5dba1f64e3bc8dfe555f95afc2

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_13961/index.html

[-- Attachment #2: Type: text/html, Size: 2227 bytes --]

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

* Re: [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers
  2025-10-29  5:31 [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers S Sebinraj
  2025-10-29  6:34 ` ✓ Xe.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork
@ 2025-10-29  7:46 ` Krzysztof Karas
  2025-11-18  5:57   ` Sebinraj, S
  2025-10-29  8:47 ` ✓ i915.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork
  2 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Karas @ 2025-10-29  7:46 UTC (permalink / raw)
  To: S Sebinraj
  Cc: igt-dev, jeevaka.badrappan, zbigniew.kempczynski, kamil.konieczny

Hi S Sebinraj,
It is usually good to wait a bit after getting review comments,
so people may discuss or respond to how you interpret their
suggestions. Since you sent v2 already, I'll continue here,
because I feel like some clarification is needed to my comments
to v1:

│> +             fp = fopen(freq_path, "r");
│> +             if (fp) {
│> +                     if (fgets(freq_buf, sizeof(freq_buf), fp))
│> +                             cur_freq = atoi(freq_buf);
│> +                     fclose(fp);
│> +             } else {
│> +                     fprintf(stderr, "Failed to open %s\n", freq_path);
│> I think failures could skip this iteration of the loop,
   unless you are adamant on writing empty strings.
│> You could also write ERR or N/A to the cur_freq/act_freq as
   direct notification to the user that something went wrong.

I wanted to convey that these "else" blocks are an error path,
which, if ever executed, would mean we'd be printing incomplete
information about frequency. I thought that instead of doing
that we could wait for another call to the function reading the
data from opened files, so that we leave the most recent (albeit
outdated by one cycle) frequency printed on screen (with your
change the fields for which fopen() failed would be emptied).

I believe the error prints were useful and should have stayed.

> Enhance gputop to display GPU frequency information (current/actual)
> for each GT in the client header line alongside the DRM minor number.
> 
> Key changes:
> - Add get_gt_frequencies() function to read GT frequency values
> - Support both i915 and Xe drivers using appropriate sysfs paths
> - Display format: "DRM minor X  Freq(cur/act) GT0-freq/freq GT1-freq/freq"
> - Use IGT API functions (xe_sysfs_gt_path, igt_sysfs_gt_path) for
>   driver-agnostic sysfs access
> 
> The frequency information helps users monitor GPU performance states
> in real-time while observing client workload utilization.
> 
> Example output:
>   DRM minor 0          Freq(cur/act) GT0-1800/1800 GT1-400/400
>   DRM minor 128        Freq(cur/act) GT0-400/400 GT1-400/400
> 
> Signed-off-by: S Sebinraj <s.sebinraj@intel.com>

[...]

> +
> +		fp = fopen(freq_path, "r");
> +		if (fp) {
> +			if (fgets(freq_buf, sizeof(freq_buf), fp))
> +				cur_freq = atoi(freq_buf);
> +			fclose(fp);
> +		}
As I mentioned above, these error paths were useful in letting
users know that something went wrong.

[...]

-- 
Best Regards,
Krzysztof

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

* ✓ i915.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2)
  2025-10-29  5:31 [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers S Sebinraj
  2025-10-29  6:34 ` ✓ Xe.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork
  2025-10-29  7:46 ` [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers Krzysztof Karas
@ 2025-10-29  8:47 ` Patchwork
  2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2025-10-29  8:47 UTC (permalink / raw)
  To: S Sebinraj; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 10393 bytes --]

== Series Details ==

Series: RFC: tools/gputop: Add GPU frequencies to the client headers (rev2)
URL   : https://patchwork.freedesktop.org/series/156602/
State : success

== Summary ==

CI Bug Log - changes from IGT_8599 -> IGTPW_13961
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/index.html

Participating hosts (44 -> 44)
------------------------------

  Additional (1): fi-kbl-guc 
  Missing    (1): fi-snb-2520m 

Known issues
------------

  Here are the changes found in IGTPW_13961 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@fbdev@info:
    - fi-kbl-guc:         NOTRUN -> [SKIP][1] ([i915#1849])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/fi-kbl-guc/igt@fbdev@info.html

  * igt@gem_lmem_swapping@basic:
    - fi-kbl-guc:         NOTRUN -> [SKIP][2] ([i915#4613]) +3 other tests skip
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/fi-kbl-guc/igt@gem_lmem_swapping@basic.html

  * igt@gem_lmem_swapping@parallel-random-engines:
    - bat-mtlp-9:         NOTRUN -> [SKIP][3] ([i915#4613]) +3 other tests skip
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@gem_lmem_swapping@parallel-random-engines.html

  * igt@gem_mmap@basic:
    - bat-mtlp-9:         NOTRUN -> [SKIP][4] ([i915#4083])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@gem_mmap@basic.html

  * igt@gem_render_tiled_blits@basic:
    - bat-mtlp-9:         NOTRUN -> [SKIP][5] ([i915#4079]) +1 other test skip
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@gem_render_tiled_blits@basic.html

  * igt@gem_tiled_fence_blits@basic:
    - bat-mtlp-9:         NOTRUN -> [SKIP][6] ([i915#4077]) +2 other tests skip
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@gem_tiled_fence_blits@basic.html

  * igt@i915_pm_rps@basic-api:
    - bat-mtlp-9:         NOTRUN -> [SKIP][7] ([i915#11681] / [i915#6621])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@i915_pm_rps@basic-api.html

  * igt@i915_selftest@live@workarounds:
    - bat-dg2-9:          [PASS][8] -> [DMESG-FAIL][9] ([i915#12061]) +1 other test dmesg-fail
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-dg2-9/igt@i915_selftest@live@workarounds.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-dg2-9/igt@i915_selftest@live@workarounds.html
    - bat-dg2-14:         [PASS][10] -> [DMESG-FAIL][11] ([i915#12061]) +1 other test dmesg-fail
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-dg2-14/igt@i915_selftest@live@workarounds.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-dg2-14/igt@i915_selftest@live@workarounds.html

  * igt@intel_hwmon@hwmon-read:
    - bat-mtlp-9:         NOTRUN -> [SKIP][12] ([i915#7707]) +1 other test skip
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@intel_hwmon@hwmon-read.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
    - bat-mtlp-9:         NOTRUN -> [SKIP][13] ([i915#5190])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
    - bat-mtlp-9:         NOTRUN -> [SKIP][14] ([i915#4212]) +8 other tests skip
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_addfb_basic@basic-y-tiled-legacy.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-mtlp-9:         NOTRUN -> [SKIP][15] ([i915#4213]) +1 other test skip
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_cursor_legacy@basic-flip-before-cursor-legacy:
    - fi-kbl-guc:         NOTRUN -> [SKIP][16] ([i915#11190]) +16 other tests skip
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/fi-kbl-guc/igt@kms_cursor_legacy@basic-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - bat-mtlp-9:         NOTRUN -> [SKIP][17] ([i915#3555] / [i915#3840] / [i915#9159])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_dsc@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-mtlp-9:         NOTRUN -> [SKIP][18]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_psr@psr-primary-mmap-gtt:
    - bat-mtlp-9:         NOTRUN -> [SKIP][19] ([i915#4077] / [i915#9688]) +1 other test skip
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_psr@psr-primary-mmap-gtt.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-mtlp-9:         NOTRUN -> [SKIP][20] ([i915#3555] / [i915#8809])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-flip:
    - fi-kbl-guc:         NOTRUN -> [SKIP][21] +18 other tests skip
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/fi-kbl-guc/igt@prime_vgem@basic-fence-flip.html

  * igt@prime_vgem@basic-gtt:
    - bat-mtlp-9:         NOTRUN -> [SKIP][22] ([i915#3708] / [i915#4077]) +1 other test skip
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@prime_vgem@basic-gtt.html

  * igt@prime_vgem@basic-read:
    - bat-mtlp-9:         NOTRUN -> [SKIP][23] ([i915#3708]) +1 other test skip
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@prime_vgem@basic-read.html

  * igt@prime_vgem@basic-write:
    - bat-mtlp-9:         NOTRUN -> [SKIP][24] ([i915#10216] / [i915#3708])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@prime_vgem@basic-write.html

  
#### Possible fixes ####

  * igt@i915_module_load@load:
    - bat-mtlp-9:         [ABORT][25] ([i915#13494]) -> [PASS][26]
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-mtlp-9/igt@i915_module_load@load.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-9/igt@i915_module_load@load.html

  * igt@i915_selftest@live:
    - bat-adlp-11:        [ABORT][27] ([i915#14365]) -> [PASS][28] +1 other test pass
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-adlp-11/igt@i915_selftest@live.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-adlp-11/igt@i915_selftest@live.html

  * igt@i915_selftest@live@workarounds:
    - bat-mtlp-6:         [DMESG-FAIL][29] ([i915#12061]) -> [PASS][30] +1 other test pass
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-mtlp-6/igt@i915_selftest@live@workarounds.html
    - bat-dg2-11:         [DMESG-FAIL][31] ([i915#12061]) -> [PASS][32] +1 other test pass
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-dg2-11/igt@i915_selftest@live@workarounds.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-dg2-11/igt@i915_selftest@live@workarounds.html

  
#### Warnings ####

  * igt@i915_selftest@live:
    - bat-atsm-1:         [DMESG-FAIL][33] ([i915#12061] / [i915#13929]) -> [DMESG-FAIL][34] ([i915#12061] / [i915#14204])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-atsm-1/igt@i915_selftest@live.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-atsm-1/igt@i915_selftest@live.html

  * igt@i915_selftest@live@mman:
    - bat-atsm-1:         [DMESG-FAIL][35] ([i915#13929]) -> [DMESG-FAIL][36] ([i915#14204])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8599/bat-atsm-1/igt@i915_selftest@live@mman.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/bat-atsm-1/igt@i915_selftest@live@mman.html

  
  [i915#10216]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10216
  [i915#11190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11190
  [i915#11681]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11681
  [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
  [i915#13494]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13494
  [i915#13929]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13929
  [i915#14204]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14204
  [i915#14365]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14365
  [i915#1849]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/1849
  [i915#3555]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3708
  [i915#3840]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/3840
  [i915#4077]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4083
  [i915#4212]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4213
  [i915#4613]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/4613
  [i915#5190]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/5190
  [i915#6621]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/6621
  [i915#7707]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/7707
  [i915#8809]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/8809
  [i915#9159]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9159
  [i915#9688]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9688


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_8599 -> IGTPW_13961
  * Linux: CI_DRM_17437 -> CI_DRM_17441

  CI-20190529: 20190529
  CI_DRM_17437: 5742fc7aea99a1326637a7106eeaeac383a1c76d @ git://anongit.freedesktop.org/gfx-ci/linux
  CI_DRM_17441: 62fe6039c8508b5dba1f64e3bc8dfe555f95afc2 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_13961: 13961
  IGT_8599: b22b9ca357de868f3848269e5eb7c4cc53b3f2d1 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_13961/index.html

[-- Attachment #2: Type: text/html, Size: 12642 bytes --]

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

* Re: [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers
  2025-10-29  7:46 ` [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers Krzysztof Karas
@ 2025-11-18  5:57   ` Sebinraj, S
  0 siblings, 0 replies; 5+ messages in thread
From: Sebinraj, S @ 2025-11-18  5:57 UTC (permalink / raw)
  To: Karas, Krzysztof
  Cc: igt-dev@lists.freedesktop.org, Badrappan, Jeevaka,
	Kempczynski, Zbigniew, Konieczny, Kamil

[-- Attachment #1: Type: text/plain, Size: 3699 bytes --]




________________________________
From: Karas, Krzysztof <krzysztof.karas@intel.com>
Sent: Wednesday, October 29, 2025 1:16 PM
To: Sebinraj, S <s.sebinraj@intel.com>
Cc: igt-dev@lists.freedesktop.org <igt-dev@lists.freedesktop.org>; Badrappan, Jeevaka <jeevaka.badrappan@intel.com>; Kempczynski, Zbigniew <zbigniew.kempczynski@intel.com>; Konieczny, Kamil <kamil.konieczny@intel.com>
Subject: Re: [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers

> Hi S Sebinraj,
> It is usually good to wait a bit after getting review comments,
> so people may discuss or respond to how you interpret their
> suggestions. Since you sent v2 already, I'll continue here,
> because I feel like some clarification is needed to my comments
> to v1:

│> +             fp = fopen(freq_path, "r");
│> +             if (fp) {
│> +                     if (fgets(freq_buf, sizeof(freq_buf), fp))
│> +                             cur_freq = atoi(freq_buf);
│> +                     fclose(fp);
│> +             } else {
│> +                     fprintf(stderr, "Failed to open %s\n", freq_path);
│> I think failures could skip this iteration of the loop,
   unless you are adamant on writing empty strings.
│> You could also write ERR or N/A to the cur_freq/act_freq as
   direct notification to the user that something went wrong.

> I wanted to convey that these "else" blocks are an error path,
> which, if ever executed, would mean we'd be printing incomplete
> information about frequency. I thought that instead of doing
> that we could wait for another call to the function reading the
> data from opened files, so that we leave the most recent (albeit
> outdated by one cycle) frequency printed on screen (with your
> change the fields for which fopen() failed would be emptied).

> I believe the error prints were useful and should have stayed.

Okay got it, I'll bring back the prints as it is a way of conveying an error to
the user. But for this comment from you
"so that we leave the most recent (albeit outdated by one cycle) frequency printed on screen" ,
I think of skipping the empty frequency each time there is a failure,
so that only the last successful one remains on screen, rather than a empty one.

I'll share a v3 with the same, Please have a look at it (v3) once I share it and if you think
that's not the correct way, I'll change accordingly.

With Regards,
S Sebinraj

> Enhance gputop to display GPU frequency information (current/actual)
> for each GT in the client header line alongside the DRM minor number.
>
> Key changes:
> - Add get_gt_frequencies() function to read GT frequency values
> - Support both i915 and Xe drivers using appropriate sysfs paths
> - Display format: "DRM minor X  Freq(cur/act) GT0-freq/freq GT1-freq/freq"
> - Use IGT API functions (xe_sysfs_gt_path, igt_sysfs_gt_path) for
>   driver-agnostic sysfs access
>
> The frequency information helps users monitor GPU performance states
> in real-time while observing client workload utilization.
>
> Example output:
>   DRM minor 0          Freq(cur/act) GT0-1800/1800 GT1-400/400
>   DRM minor 128        Freq(cur/act) GT0-400/400 GT1-400/400
>
> Signed-off-by: S Sebinraj <s.sebinraj@intel.com>

[...]

> +
> +             fp = fopen(freq_path, "r");
> +             if (fp) {
> +                     if (fgets(freq_buf, sizeof(freq_buf), fp))
> +                             cur_freq = atoi(freq_buf);
> +                     fclose(fp);
> +             }
> As I mentioned above, these error paths were useful in letting
> users know that something went wrong.

>[...]

>--
>Best Regards,
>Krzysztof

[-- Attachment #2: Type: text/html, Size: 7285 bytes --]

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

end of thread, other threads:[~2025-11-18  5:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-29  5:31 [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers S Sebinraj
2025-10-29  6:34 ` ✓ Xe.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork
2025-10-29  7:46 ` [PATCH i-g-t v2] RFC: tools/gputop: Add GPU frequencies to the client headers Krzysztof Karas
2025-11-18  5:57   ` Sebinraj, S
2025-10-29  8:47 ` ✓ i915.CI.BAT: success for RFC: tools/gputop: Add GPU frequencies to the client headers (rev2) Patchwork

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