Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/xe/oa: Don't skip if freq sysfs are not present
@ 2024-10-21 18:12 Ashutosh Dixit
  2024-10-21 19:50 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Ashutosh Dixit @ 2024-10-21 18:12 UTC (permalink / raw)
  To: igt-dev

Freq sysfs are not created in certain environments. In most of these cases
OA IGT's will work just fine, even when GT min/max freq's are not
known. Therefore, just print a warning if freq sysfs are not present but
don't cause tests to skip.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/xe/xe_oa.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/xe/xe_oa.c b/lib/xe/xe_oa.c
index 86264230c9..189388b76b 100644
--- a/lib/xe/xe_oa.c
+++ b/lib/xe/xe_oa.c
@@ -571,11 +571,9 @@ xe_perf_for_fd(int drm_fd, int gt)
 	}
 
 	if (!read_sysfs(sysfs_dir_fd, path_min, &gt_min_freq) ||
-	    !read_sysfs(sysfs_dir_fd, path_max, &gt_max_freq)) {
+	    !read_sysfs(sysfs_dir_fd, path_max, &gt_max_freq))
 		igt_warn("Unable to read freqs from sysfs\n");
-		close(sysfs_dir_fd);
-		return NULL;
-	}
+
 	close(sysfs_dir_fd);
 
 	device_id = intel_get_drm_devid(drm_fd);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH i-g-t] lib/xe/oa: Don't skip if freq sysfs are not present
@ 2024-10-21 21:42 Ashutosh Dixit
  0 siblings, 0 replies; 8+ messages in thread
From: Ashutosh Dixit @ 2024-10-21 21:42 UTC (permalink / raw)
  To: igt-dev; +Cc: Umesh Nerlige Ramappa

Freq sysfs are not created in certain environments. In most of these cases
OA IGT's will work just fine, even when GT min/max freq's are not
known. Therefore, just print a warning if freq sysfs are not present but
don't cause tests to skip.

v2: Change igt_warn to igt_info in case CI doesn't like warn (Umesh)

Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 lib/xe/xe_oa.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lib/xe/xe_oa.c b/lib/xe/xe_oa.c
index 86264230c9..4fdd0b8c95 100644
--- a/lib/xe/xe_oa.c
+++ b/lib/xe/xe_oa.c
@@ -571,11 +571,9 @@ xe_perf_for_fd(int drm_fd, int gt)
 	}
 
 	if (!read_sysfs(sysfs_dir_fd, path_min, &gt_min_freq) ||
-	    !read_sysfs(sysfs_dir_fd, path_max, &gt_max_freq)) {
-		igt_warn("Unable to read freqs from sysfs\n");
-		close(sysfs_dir_fd);
-		return NULL;
-	}
+	    !read_sysfs(sysfs_dir_fd, path_max, &gt_max_freq))
+		igt_info("Unable to read freqs from sysfs\n");
+
 	close(sysfs_dir_fd);
 
 	device_id = intel_get_drm_devid(drm_fd);
-- 
2.41.0


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

end of thread, other threads:[~2024-10-22  4:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-21 18:12 [PATCH i-g-t] lib/xe/oa: Don't skip if freq sysfs are not present Ashutosh Dixit
2024-10-21 19:50 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-10-21 19:52 ` ✓ CI.xeBAT: " Patchwork
2024-10-21 20:55 ` [PATCH i-g-t] " Umesh Nerlige Ramappa
2024-10-21 21:03   ` Dixit, Ashutosh
2024-10-22  1:25 ` ✗ CI.xeFULL: failure for " Patchwork
2024-10-22  4:59 ` ✗ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-10-21 21:42 [PATCH i-g-t] " Ashutosh Dixit

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