Igt-dev Archive on 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: Upadhyay <tejas.upadhyay@intel.com>,
	igt-dev@lists.freedesktop.org,
	Badal Nilawar <badal.nilawar@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v8 3/4] tests/xe/xe_guc_pc: Change the sysfs paths
Date: Sat, 08 Jul 2023 12:30:34 -0700	[thread overview]
Message-ID: <871qhii4kl.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20230707113055.648662-4-himal.prasad.ghimiray@intel.com>

On Fri, 07 Jul 2023 04:30:54 -0700, Himal Prasad Ghimiray wrote:
> diff --git a/tests/xe/xe_guc_pc.c b/tests/xe/xe_guc_pc.c
> index 827693eb4..e20ab5f88 100644
> --- a/tests/xe/xe_guc_pc.c
> +++ b/tests/xe/xe_guc_pc.c
> @@ -133,25 +133,38 @@ static void exec_basic(int fd, struct drm_xe_engine_class_instance *eci,
>	xe_vm_destroy(fd, vm);
>  }
>
> -static int set_freq(int sysfs, int gt_id, const char *freq_name, uint32_t freq)
> +static int set_freq(int fd, int gt_id, const char *freq_name, uint32_t freq)
>  {
>	int ret = -EAGAIN;
> -	char path[32];
> +	char freq_attr[16];
> +	int gt_fd;
> +
> +	snprintf(freq_attr, sizeof(freq_attr), "freq_%s", freq_name);
> +	gt_fd = xe_sysfs_gt_open(fd, gt_id);
> +	igt_assert(gt_fd != -1);

nit: probably doesn't matter and ok as is too, but I'd change this assert
to:

	igt_assert(gt_fd >= 0);

Since that's the convention followed in the code.

It's there in several places in the file.

  reply	other threads:[~2023-07-08 19:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 11:30 [igt-dev] [PATCH i-g-t v8 0/4] Handle GT and tile seperation in IGT Himal Prasad Ghimiray
2023-07-07 11:30 ` [igt-dev] [PATCH i-g-t v8 1/4] lib/igt_sysfs: Add support to query number of tiles Himal Prasad Ghimiray
2023-07-08 19:29   ` Dixit, Ashutosh
2023-07-10  4:12     ` Ghimiray, Himal Prasad
2023-07-07 11:30 ` [igt-dev] [PATCH i-g-t v8 2/4] lib/igt_sysfs: Handling gt related sysfs uapi changes Himal Prasad Ghimiray
2023-07-08 19:30   ` Dixit, Ashutosh
2023-07-10  4:14     ` Ghimiray, Himal Prasad
2023-07-07 11:30 ` [igt-dev] [PATCH i-g-t v8 3/4] tests/xe/xe_guc_pc: Change the sysfs paths Himal Prasad Ghimiray
2023-07-08 19:30   ` Dixit, Ashutosh [this message]
2023-07-07 11:30 ` [igt-dev] [PATCH i-g-t v8 4/4] tests/xe/xe_sysfs_tile: adds new test to verify per tile vram addr_range Himal Prasad Ghimiray
2023-07-07 11:51 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Handle GT and tile seperation in IGT (rev7) 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=871qhii4kl.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=badal.nilawar@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox