All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: igt-dev@lists.freedesktop.org, Upadhyay <tejas.upadhyay@intel.com>
Subject: Re: [igt-dev] [PATCH v4 1/4] lib/igt_sysfs: Add support to query number of tiles
Date: Sat, 01 Jul 2023 10:09:03 -0700	[thread overview]
Message-ID: <87lefz8spc.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230627180805.4189160-2-himal.prasad.ghimiray@intel.com>

On Tue, 27 Jun 2023 11:08:02 -0700, Himal Prasad Ghimiray wrote:
>

Hi Himal,

> diff --git a/lib/igt_sysfs.h b/lib/igt_sysfs.h
> index 978b6906..de2c9a86 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__, tile__, tile_cnt__) \
> +	for (tile__ = 0, tile_cnt__ = igt_sysfs_get_num_tiles(xe__); \
> +	     tile__ < tile_cnt__; \
> +	     ++tile__)
> +

You did not answer the question I asked previously about this:

"Where is dirfd here which should be a fd to an open sysfs directory as in
for_each_sysfs_gt_dirfd?"

>  #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

I think let's just do this and get rid of for_each_sysfs_tile_dirfd:

#define xe_for_each_tile(xe__, tile__, tile_cnt__) \
	for (tile__ = 0, tile_cnt__ = igt_sysfs_get_num_tiles(xe__); \
	     tile__ < tile_cnt__; \
	     ++tile__)

> +
>  enum i915_attr_id {
>	RPS_ACT_FREQ_MHZ,
>	RPS_CUR_FREQ_MHZ,
> @@ -97,6 +104,7 @@ int igt_sysfs_open(int device);
>  char *igt_sysfs_gt_path(int device, int gt, char *path, int pathlen);
>  int igt_sysfs_gt_open(int device, int gt);
>  int igt_sysfs_get_num_gt(int device);
> +int igt_sysfs_get_num_tiles(int device);
>  bool igt_sysfs_has_attr(int dir, const char *attr);
>  const char *igt_sysfs_dir_id_to_name(int dir, enum i915_attr_id id);
>  const char *igt_sysfs_path_id_to_name(const char *path, enum i915_attr_id id);
> --
> 2.25.1
>

  reply	other threads:[~2023-07-01 17:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 18:08 [igt-dev] [PATCH v4 0/4] Handle GT and tile seperation in IGT Himal Prasad Ghimiray
2023-06-27 18:08 ` [igt-dev] [PATCH v4 1/4] lib/igt_sysfs: Add support to query number of tiles Himal Prasad Ghimiray
2023-07-01 17:09   ` Dixit, Ashutosh [this message]
2023-07-04  4:41     ` Ghimiray, Himal Prasad
2023-06-27 18:08 ` [igt-dev] [PATCH v4 2/4] lib/igt_sysfs: Handling gt related sysfs uapi changes Himal Prasad Ghimiray
2023-06-27 18:08 ` [igt-dev] [PATCH v4 3/4] tests/xe/xe_guc_pc: Change the sysfs paths Himal Prasad Ghimiray
2023-06-30 17:33   ` Kamil Konieczny
2023-07-05  8:31     ` Ghimiray, Himal Prasad
2023-07-01 17:58   ` Dixit, Ashutosh
2023-07-03  8:00     ` Kamil Konieczny
2023-07-04  5:46     ` Ghimiray, Himal Prasad
2023-06-27 18:08 ` [igt-dev] [PATCH v4 4/4] tests/xe/xe_sysfs_tile_prop: adds new test to verify per tile vram addr_range Himal Prasad Ghimiray
2023-06-27 19:07 ` [igt-dev] ✓ Fi.CI.BAT: success for Handle GT and tile seperation in IGT (rev3) Patchwork
2023-06-28 10:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-06-29 17:47   ` Kamil Konieczny
2023-06-30  7:35     ` Yedireswarapu, SaiX Nandan
2023-06-30  7:34 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lefz8spc.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tejas.upadhyay@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.