Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Oak Zeng <oak.zeng@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [i-g-t v6 1/4] lib/xe: Fix a comment error
Date: Mon, 10 Mar 2025 17:36:04 -0700	[thread overview]
Message-ID: <87zfhs2ykr.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <8734fk4eo8.wl-ashutosh.dixit@intel.com>

On Mon, 10 Mar 2025 17:03:03 -0700, Dixit, Ashutosh wrote:
>
> On Mon, 24 Feb 2025 09:40:07 -0800, Oak Zeng wrote:
> >
> > The timeout value of __xe_wait_ufence returns the
> > remaining time, not elapsed time. Fix it.
> >
> > Signed-off-by: Oak Zeng <oak.zeng@intel.com>
> > ---
> >  lib/xe/xe_ioctl.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/xe/xe_ioctl.c b/lib/xe/xe_ioctl.c
> > index 6d8388918..028102aa2 100644
> > --- a/lib/xe/xe_ioctl.c
> > +++ b/lib/xe/xe_ioctl.c
> > @@ -496,7 +496,7 @@ void xe_exec_wait(int fd, uint32_t exec_queue, uint64_t addr)
> >   *
> >   * Function compares @value with memory pointed by @addr until they are equal.
> >   *
> > - * Returns (in @timeout), the elapsed time in nanoseconds if user fence was
> > + * Returns (in @timeout), the remaining time in nanoseconds if user fence was
>
> But the code in xe_wait_user_fence_ioctl() in the kernel is:
>
>	args->timeout -= ktime_to_ns(ktime_sub(ktime_get(), start));
>
> Which seems to be the elapsed, not the remaining time?

Sorry, I missed the '-=', so you are right, it is the remaing time. So
let's change the comment in xe_wait_ufence() too.

>
> Also, if this patch is correct, then let's change for xe_wait_ufence() too.
>
> >   * signalled. Returns 0 on success, -errno of ioctl on error.
> >   */
> >  int __xe_wait_ufence(int fd, uint64_t *addr, uint64_t value,
> > --
> > 2.26.3
>
> Need to update your git too, though not for this patch :/

  reply	other threads:[~2025-03-11  0:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 17:40 [i-g-t v6 0/4] xe: Test scratch page under fault mode Oak Zeng
2025-02-24 17:40 ` [i-g-t v6 1/4] lib/xe: Fix a comment error Oak Zeng
2025-03-11  0:03   ` Dixit, Ashutosh
2025-03-11  0:36     ` Dixit, Ashutosh [this message]
2025-03-11  6:56   ` Zbigniew Kempczyński
2025-02-24 17:40 ` [i-g-t v6 2/4] lib/xe/xe_util: Introduce helper functions Oak Zeng
2025-02-24 17:40 ` [i-g-t v6 3/4] tests/intel/xe_vm: Exclude invalid_flags tests from LNL and BMG Oak Zeng
2025-03-11  0:33   ` Dixit, Ashutosh
2025-03-19 21:51     ` Zeng, Oak
2025-02-24 17:40 ` [i-g-t v6 4/4] tests/intel/xe_exec_fault_mode: Test scratch page under fault mode Oak Zeng
2025-03-17 19:07   ` Matthew Brost
2025-02-27  3:25 ` ✓ Xe.CI.BAT: success for xe: Test scratch page under fault mode (rev5) Patchwork
2025-02-27  3:39 ` ✓ i915.CI.BAT: " Patchwork
2025-02-27  4:24 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-27  8:30 ` ✗ i915.CI.Full: " 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=87zfhs2ykr.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=oak.zeng@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