From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F4046C282DE for ; Tue, 11 Mar 2025 00:36:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 941E810E4F1; Tue, 11 Mar 2025 00:36:06 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="WMgH84kZ"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACC9F10E4F1 for ; Tue, 11 Mar 2025 00:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741653366; x=1773189366; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=eOY8WZGCtSrvkLyyxwZce9aIFJxi37BideuiIW7qTNk=; b=WMgH84kZtseUhGkwKFizhg0Wwsw6KvoEwoBF3oCadMZMqwPGTWBFQvMG 7vR6eyd3Ho9FDu9ViNCqxLJIYyLKpgL8r8YWulFxZzRkQpcfC4JOgs0SM iDTO/Ji8IZDePKIfmTMWSZMdhIqsC6juhONMBspnSJdyhf0jY1u2Ar6A3 nIf3pozujZZnJ0L/kea6P3dCJzz1HNLdRDgZ2GSXHAWk1HGoDTu/Hg1lo w9IUqFBNXch+eSe0XShjcm2HWV4skor6ReRm8gfCvtgQRU/zk1QMIdMk+ +Pf+T0NXkM9eAOF/l6EITozDn4bHVW9e/rfDePQ/X+/MR4aXE6ntVMeY5 A==; X-CSE-ConnectionGUID: TXTVk3u7Q9ebA+2PJ8x4Qw== X-CSE-MsgGUID: MuV/wAQ3T4GtxrZ7yHvvWQ== X-IronPort-AV: E=McAfee;i="6700,10204,11369"; a="42860753" X-IronPort-AV: E=Sophos;i="6.14,237,1736841600"; d="scan'208";a="42860753" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2025 17:36:06 -0700 X-CSE-ConnectionGUID: yQdK+LiwRT2dewXPGbSKeg== X-CSE-MsgGUID: 2baKJoFIQ3q1Mo8lc8Gluw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,237,1736841600"; d="scan'208";a="119874011" Received: from aagwai-mobl2.amr.corp.intel.com (HELO adixit-MOBL3.intel.com) ([10.124.141.85]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2025 17:36:05 -0700 Date: Mon, 10 Mar 2025 17:36:04 -0700 Message-ID: <87zfhs2ykr.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Oak Zeng Cc: Subject: Re: [i-g-t v6 1/4] lib/xe: Fix a comment error In-Reply-To: <8734fk4eo8.wl-ashutosh.dixit@intel.com> References: <20250224174010.594192-1-oak.zeng@intel.com> <20250224174010.594192-2-oak.zeng@intel.com> <8734fk4eo8.wl-ashutosh.dixit@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" 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 > > --- > > 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 :/