[i-g-t v6 1/4] lib/xe: Fix a comment error
Dixit, Ashutosh
ashutosh.dixit at intel.com
Tue Mar 11 00:03:03 UTC 2025
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 at 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?
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 :/
More information about the igt-dev
mailing list