From patchwork Fri Jun 9 22:02:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vinay Belgaumkar X-Patchwork-Id: 13274603 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 4B719C7EE2E for ; Fri, 9 Jun 2023 22:03:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A48C610E0EC; Fri, 9 Jun 2023 22:03:35 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8CEE10E0CD; Fri, 9 Jun 2023 22:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686348213; x=1717884213; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=DteTQN7jX6+NOc8jQgbzdqwy5ErF2yn4jxbWfYG4N+s=; b=JfwXllBY/UHaS2FWBBaL1/O9Ev1ltjBUvhlSRwVjORjASqitBIuGnZMo r6Ck7/2mamCFew+DbkopxDhYzNRseCmnQosi8ydEYYCssMFKi49iUkBrq sYual258cUm9LAHpr5pVNEvUUrBz5OdTdnpKCvrqCskvQ8P5LQH13fKSj ltuxxWeXlHY9d9GqQ4iaOcvzA0xpHLxjdljgQfWRFZGiBc1UN/dGD55rI tJqkTbwqlVHGuEGd45z8jfSVx1eOqCgyoiMHOrOEMqD4J4T17tpnqM6rE rRVoQC3o++wi819kymrLvovP0EYnwKcM/53gs81W/Zo1qx+xqdwceMlKy w==; X-IronPort-AV: E=McAfee;i="6600,9927,10736"; a="361057522" X-IronPort-AV: E=Sophos;i="6.00,230,1681196400"; d="scan'208";a="361057522" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2023 15:03:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10736"; a="854876107" X-IronPort-AV: E=Sophos;i="6.00,230,1681196400"; d="scan'208";a="854876107" Received: from vbelgaum-ubuntu.fm.intel.com ([10.1.27.27]) by fmsmga001.fm.intel.com with ESMTP; 09 Jun 2023 15:03:32 -0700 From: Vinay Belgaumkar To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Fri, 9 Jun 2023 15:02:52 -0700 Message-Id: <20230609220252.410740-1-vinay.belgaumkar@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Subject: [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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 Reviewed-by: Ashutosh Dixit --- 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); }