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 87F89EB64DB for ; Thu, 15 Jun 2023 17:25:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E029910E52D; Thu, 15 Jun 2023 17:25:55 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1EC110E52C; Thu, 15 Jun 2023 17:25:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686849954; x=1718385954; h=date:message-id:from:to:cc:subject:in-reply-to: references:mime-version; bh=KNOwT5u6/oERUnVVoJx0lTpj15acWEDle2bZM4pVdsg=; b=QmpTDuq5spsR99zp5+7sGKnvEUNeTHRbVmgsN1sEBIkT0Ouccr0VYWyG 0FYoXsTjKgPa4K4AS2wzP3KmPfOaWHe8PU/hF1OHrJnSx8LUs1pGlgNxh LrG8kvC+DIAtegRcKYXxlzoiPlqj3IGULWnqu5JJj3xwM4VkJ7jS2xpbO 4g4iULE2eRlb60dGhFwFAm2lRCJS+Fbkf8IRUoGigxH98URAU7ToQWkJm TVAcw406YjCKH00wYBmZLFaP/FnTsZg5fDHHCXsUHyhaAnFKdy04nCZaD kydjfpHa4HdVx02OvNegT0mhAsjNolWQ1BP4xQHs9ebWAmMWIq/p7Yfmp Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="362399367" X-IronPort-AV: E=Sophos;i="6.00,245,1681196400"; d="scan'208";a="362399367" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 10:17:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10742"; a="706764290" X-IronPort-AV: E=Sophos;i="6.00,245,1681196400"; d="scan'208";a="706764290" Received: from adixit-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.255.230.186]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2023 10:17:08 -0700 Date: Thu, 15 Jun 2023 10:04:30 -0700 Message-ID: <87wn04y7vl.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Vinay Belgaumkar In-Reply-To: <20230609220252.410740-1-vinay.belgaumkar@intel.com> References: <20230609220252.410740-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] drm/i915/guc/slpc: Apply min softlimit correctly 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, 09 Jun 2023 15:02:52 -0700, Vinay Belgaumkar wrote: > Hi Vinay, > We were skipping when min_softlimit was equal to RPn. We need to apply > it rergardless as efficient frequency will push the SLPC min to RPe. > This will break scenarios where user sets a min softlimit < RPe before > reset and then performs a GT reset. > > Fixes: 95ccf312a1e4 ("drm/i915/guc/slpc: Allow SLPC to use efficient frequency") > > Signed-off-by: Vinay Belgaumkar > --- > drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c > index 01b75529311c..ee9f83af7cf6 100644 > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c > @@ -606,7 +606,7 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc) > if (unlikely(ret)) > return ret; > slpc_to_gt(slpc)->defaults.min_freq = slpc->min_freq_softlimit; > - } else if (slpc->min_freq_softlimit != slpc->min_freq) { > + } else { > return intel_guc_slpc_set_min_freq(slpc, > slpc->min_freq_softlimit); IMO the current code is unnecessarily complicated and confusing and similar changes (with a little tweaking) should be made for max_freq too. But at least this is a step in the right direction so: Reviewed-by: Ashutosh Dixit > } > -- > 2.38.1 >