[igt-dev] [PATCH i-g-t v8 1/4] lib/igt_sysfs: Add support to query number of tiles

Dixit, Ashutosh ashutosh.dixit at intel.com
Sat Jul 8 19:29:50 UTC 2023


On Fri, 07 Jul 2023 04:30:52 -0700, Himal Prasad Ghimiray wrote:
>
> diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
> index 5635fc690..5d584b1c7 100644
> --- a/lib/igt_sysfs.h
> +++ b/lib/igt_sysfs.h
> @@ -38,6 +38,11 @@
>	     (dirfd__ = igt_sysfs_gt_open(i915__, gt__)) != -1; \
>	     close(dirfd__), gt__++)
>
> +#define for_each_sysfs_tile_dirfd(xe__, dirfd__, tile__) \
> +	for (tile__ = 0; \
> +	     (dirfd__ = xe_sysfs_tile_open(xe__, tile__)) != -1; \
> +	     close(dirfd__), tile__++)
> +
>  #define i915_for_each_gt for_each_sysfs_gt_dirfd
>
>  #define igt_sysfs_rps_write(dir, id, data, len) \
> @@ -73,6 +78,8 @@
>  #define igt_sysfs_rps_set_boolean(dir, id, value) \
>	igt_sysfs_set_boolean(dir, igt_sysfs_dir_id_to_name(dir, id), value)
>
> +#define xe_for_each_tile for_each_sysfs_tile_dirfd

Let's delete xe_for_each_tile and directly use for_each_sysfs_tile_dirfd in
Patch 4. Because xe_for_each_gt is written without the dirfd so it will be
confusing if xe_for_each_tile now has dirfd.

Thanks.
--
Ashutosh


More information about the igt-dev mailing list