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 742FAC282C6 for ; Mon, 3 Mar 2025 23:38:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A44310E2EB; Mon, 3 Mar 2025 23:38:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="cqaTHt8/"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3133A10E2EB for ; Mon, 3 Mar 2025 23:38:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1741045099; x=1772581099; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=gOrKGPKWu6zMOhvGeaOTuik45y2qpObD3fqYHaDtWdA=; b=cqaTHt8/8EClHI8ag2Z8d8dcXWUiNcJpuwoNgN9Kr+U1/HA3zK6OrbfH 1UwWA8+QzVIY/TPSQQiHZ8zfXBKRe6wnf988vVr9y0DY6GbZuhlO859G1 vGzmrKBc+10KwsxX5tIFRV+2Jlq4zg7afqGmPqHIpyqEzN5hpOFN7i++v vp1fbZgZTGxDhpsRhKft8yqUA91ANHn3u+eYEDWvIvIIXi8W+hVrF8tYY jJNVku7ZeNxHbvLwADyZaNAeFVKGlVtJkAMlvR4yVnxaYEL0hFp2wRbyz 9TTEl8lp+T5IiMc6jQAS2fXhWoCKamjWpg+WDV+IyKsh1rxPSDFC12MLt w==; X-CSE-ConnectionGUID: cqgyDyemTRyAGP4/zvawiA== X-CSE-MsgGUID: HAQtPtyxQtmuDaRxJrsvbw== X-IronPort-AV: E=McAfee;i="6700,10204,11362"; a="41836520" X-IronPort-AV: E=Sophos;i="6.13,330,1732608000"; d="scan'208";a="41836520" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2025 15:38:18 -0800 X-CSE-ConnectionGUID: Cgo/6BnVT/W8E163TUFgQQ== X-CSE-MsgGUID: mEWm4rRISrGfAZmuZhmtPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,330,1732608000"; d="scan'208";a="117983213" Received: from peggykes-mobl1.amr.corp.intel.com (HELO adixit-MOBL3.intel.com) ([10.125.209.91]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2025 15:38:18 -0800 Date: Mon, 03 Mar 2025 15:38:16 -0800 Message-ID: <87frjtu1lj.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Umesh Nerlige Ramappa Cc: Subject: Re: [PATCH i-g-t v2 03/14] tests/intel/xe_oa: Use period_ns in max_oa_exponent_for_period_lte In-Reply-To: <20250303231502.135720-4-umesh.nerlige.ramappa@intel.com> References: <20250303231502.135720-1-umesh.nerlige.ramappa@intel.com> <20250303231502.135720-4-umesh.nerlige.ramappa@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, 03 Mar 2025 15:14:51 -0800, Umesh Nerlige Ramappa wrote: > > Rename the argument in max_oa_exponent_for_period_lte() to period_ns to > specify the units of the period. Reviewed-by: Ashutosh Dixit > > Signed-off-by: Umesh Nerlige Ramappa > --- > tests/intel/xe_oa.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c > index 5c68f1d79..b15958de6 100644 > --- a/tests/intel/xe_oa.c > +++ b/tests/intel/xe_oa.c > @@ -688,10 +688,10 @@ timebase_scale(uint64_t delta) > } > > /* Returns: the largest OA exponent that will still result in a sampling period > - * less than or equal to the given @period. > + * less than or equal to the given @period_ns. > */ > static int > -max_oa_exponent_for_period_lte(uint64_t period) > +max_oa_exponent_for_period_lte(uint64_t period_ns) > { > /* NB: timebase_scale() takes a uint64_t and an exponent of 30 > * would already represent a period of ~3 minutes so there's > @@ -700,7 +700,7 @@ max_oa_exponent_for_period_lte(uint64_t period) > for (int i = 0; i < 30; i++) { > uint64_t oa_period = timebase_scale(2 << i); > > - if (oa_period > period) > + if (oa_period > period_ns) > return max(0, i - 1); > } > > -- > 2.34.1 >