From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 49D9910E080 for ; Sat, 8 Jul 2023 19:29:52 +0000 (UTC) Date: Sat, 08 Jul 2023 12:29:50 -0700 Message-ID: <874jmei4lt.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Himal Prasad Ghimiray In-Reply-To: <20230707113055.648662-2-himal.prasad.ghimiray@intel.com> References: <20230707113055.648662-1-himal.prasad.ghimiray@intel.com> <20230707113055.648662-2-himal.prasad.ghimiray@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t v8 1/4] lib/igt_sysfs: Add support to query number of tiles List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, Upadhyay Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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