[PATCH i-g-t] lib/xe/oa: Don't skip if freq sysfs are not present

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Mon Oct 21 20:55:29 UTC 2024


On Mon, Oct 21, 2024 at 11:12:03AM -0700, Ashutosh Dixit wrote:
>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 at 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");

1) Well.. you would still end up with an igt_warn. CI will still 
complain, I guess. Is that acceptable?

2) If called from an application (i.e. gpuvis), does the igt_warn show 
up in stdout?  

For IGT, I don't see oa tests using this, so it's probably okay. If the 
answer for 1 and 2 is yes, then this is

Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>

Thanks,
Umesh
>-		close(sysfs_dir_fd);
>-		return NULL;
>-	}
>+
> 	close(sysfs_dir_fd);
>
> 	device_id = intel_get_drm_devid(drm_fd);
>-- 
>2.41.0
>


More information about the igt-dev mailing list