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 6DA39C04A95 for ; Tue, 25 Oct 2022 15:23:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 94F7F10E3C2; Tue, 25 Oct 2022 15:23:19 +0000 (UTC) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1038110E22C; Tue, 25 Oct 2022 15:23:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666711395; x=1698247395; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=YV1vippgC2ROynVn0Uai4jcMLk3td490b1XjJ9jygMo=; b=GsC5I5y/3WsZfh+YYXkYTiSkZlnkHJyCCOeAIlKnVT+C+pmwntyMC1gQ xTFHwGMfco6fi9edUozlfkkTHXkudEaGNI3qlF63TqfRzugHbjXQNZltv CP4pTVqy2PSIpzTrqzsdgxqjP1EI4NKqr7XAa+Cj5f7mWH4dGe2e6Vzxc D0BYcV4etfW1DKQH5SF9VPDPFl8vriMbg7Ohl8psZn4G9xYr9pu+hvYx6 oD+4qxb+U+ZQaWiqKBinbmnIserWTjf9jaE7iVs527K3Yof60ELtCJxeJ 0RC5Kx0SD0y/YdNdoxes+EJu5Y6GFj7w4GsqgpWGAjVccIwuJkSr/H6jX g==; X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="307701823" X-IronPort-AV: E=Sophos;i="5.95,212,1661842800"; d="scan'208";a="307701823" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2022 08:23:14 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10510"; a="694993963" X-IronPort-AV: E=Sophos;i="5.95,212,1661842800"; d="scan'208";a="694993963" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.212.213.83]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2022 08:23:14 -0700 Date: Tue, 25 Oct 2022 08:22:42 -0700 Message-ID: <87lep4orlp.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar In-Reply-To: <20221024225453.4856-1-vinay.belgaumkar@intel.com> References: <20221024225453.4856-1-vinay.belgaumkar@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] [PATCH v4] drm/i915/slpc: Use platform limits for min/max frequency 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: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Mon, 24 Oct 2022 15:54:53 -0700, Vinay Belgaumkar wrote: > > GuC will set the min/max frequencies to theoretical max on > ATS-M. This will break kernel ABI, so limit min/max frequency > to RP0(platform max) instead. > > Also modify the SLPC selftest to update the min frequency > when we have a server part so that we can iterate between > platform min and max. > > v2: Check softlimits instead of platform limits (Riana) > v3: More review comments (Ashutosh) > v4: No need to use saved_min_freq and other comments (Ashutosh) OK, much better now overall. > Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7030 > > +static void update_server_min_softlimit(struct intel_guc_slpc *slpc) > +{ > + /* For server parts, SLPC min will be at RPMax. > + * Use min softlimit to clamp it to RP0 instead. > + */ > + if (!slpc->min_freq_softlimit && > + is_slpc_min_freq_rpmax(slpc)) { > + slpc->min_is_rpmax = true; The only remaining issue is slpc->min_is_rpmax is now set but never used so it can possibly be removed, or retained for debuggability (I think it's a fair reason to retain it). Though I am not sure if we will hit a "variable set but never used" error from these clever compilers. > + slpc->min_freq_softlimit = slpc->rp0_freq; > + (slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit; > + } > +} In any case, this is now: Reviewed-by: Ashutosh Dixit