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 38C10C76196 for ; Mon, 3 Apr 2023 15:36:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 840B610E4EB; Mon, 3 Apr 2023 15:36:45 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id C8AEB10E4E5; Mon, 3 Apr 2023 15:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680536203; x=1712072203; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=0sJLCsgN96Aw/U8qcCvbOiSGZR6FLbrhEZ9+BnRwcEo=; b=YTESfua9U6Rs+1JR0Bkil5lsv5fp/4/LBJ6l9+RHzS6iA6EZz3kcDvbs 9uLihZ+uxMJ6tCY5f5Y0nCYV4wcMvaGKgwboHU1OtKGOJ1HhQLSx8AFp3 NwUZHdmmUFdkye7BqbUWak+bSW3ECbbhXlpzekb5b6WzM6PoH79+Xa5W+ S0C4W7pNU8Uw/2MrZAYuUZZsfakoLFMoLOAiJaGfxRJfqXVaVn/2WRxjM iaOqFShJ7vj1UCGN5PSmJRIubj6PbjDBziGUvtKnDtlCGdlf32Ey4W2Pg lJ7u192dEQsXsYK032jn57RxatnbSE9sOmFwbYGmvvKR6TCavP6Bu1NCF A==; X-IronPort-AV: E=McAfee;i="6600,9927,10669"; a="341957528" X-IronPort-AV: E=Sophos;i="5.98,315,1673942400"; d="scan'208";a="341957528" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2023 08:36:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10669"; a="860249593" X-IronPort-AV: E=Sophos;i="5.98,315,1673942400"; d="scan'208";a="860249593" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.209.62.1]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2023 08:36:42 -0700 Date: Mon, 03 Apr 2023 08:36:42 -0700 Message-ID: <87jzytdlkl.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: "Belgaumkar, Vinay" In-Reply-To: <7327d651-d31f-8e20-a9a9-38b0ec37b86a@intel.com> References: <20230328020028.2143954-1-vinay.belgaumkar@intel.com> <20230328020028.2143954-3-vinay.belgaumkar@intel.com> <87bkk8h3uy.wl-ashutosh.dixit@intel.com> <7327d651-d31f-8e20-a9a9-38b0ec37b86a@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/28.2 (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 Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 2/2] i915_pm_freq_api: Add some basic SLPC igt tests X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 03 Apr 2023 08:23:45 -0700, Belgaumkar, Vinay wrote: > > > On 3/31/2023 4:56 PM, Dixit, Ashutosh wrote: > > On Mon, 27 Mar 2023 19:00:28 -0700, Vinay Belgaumkar wrote: > > Hi Vinay, > > > >> +/* > >> + * Too many intermediate components and steps before freq is adjusted > >> + * Specially if workload is under execution, so let's wait 100 ms. > >> + */ > >> +#define ACT_FREQ_LATENCY_US 100000 > >> + > >> +static uint32_t get_freq(int dirfd, uint8_t id) > >> +{ > >> + uint32_t val; > >> + > >> + igt_require(igt_sysfs_rps_scanf(dirfd, id, "%u", &val) == 1); > > igt_assert? > ok. > > > >> +static void test_freq_basic_api(int dirfd, int gt) > >> +{ > >> + uint32_t rpn, rp0, rpe; > >> + > >> + /* Save frequencies */ > >> + rpn = get_freq(dirfd, RPS_RPn_FREQ_MHZ); > >> + rp0 = get_freq(dirfd, RPS_RP0_FREQ_MHZ); > >> + rpe = get_freq(dirfd, RPS_RP1_FREQ_MHZ); > >> + igt_info("System min freq: %dMHz; max freq: %dMHz\n", rpn, rp0); > >> + > >> + /* > >> + * Negative bound tests > >> + * RPn is the floor > >> + * RP0 is the ceiling > >> + */ > >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rp0 + 1) < 0); > >> + igt_assert(set_freq(dirfd, RPS_MIN_FREQ_MHZ, rpn - 1) < 0); > > Is this supposed to be RPS_MAX_FREQ_MHZ? > We could do this check for max as well. But this is trying to see if min > can be set to below rpn. In that case this statement is the same as the first one (2 lines above). Is that needed? > >> + igt_assert(set_freq(dirfd, RPS_MAX_FREQ_MHZ, rp0 + 1) < 0); > >> + > > After addressing the above, this is: > > > > Reviewed-by: Ashutosh Dixit > > > > Also, before merging it would be good to see the results of the new > > tests. So could you add a HAX patch adding the new tests to > > fast-feedback.testlist and resend the series? > > Sure, will do. Thanks for the review. > > Vinay. > > > > > Thanks. > > -- > > Ashutosh