Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp882506pxk; Thu, 17 Sep 2020 20:14:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfiFtvLb8PoAZuHGog3p2b+4QV1vxR90HVyyp8/TR6Ovp7jjTSNx7FNmq1o/w3fn1nOgN3 X-Received: by 2002:a17:906:850:: with SMTP id f16mr33678875ejd.447.1600398891300; Thu, 17 Sep 2020 20:14:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398891; cv=none; d=google.com; s=arc-20160816; b=zrvn0DW6FBLjTwzI/VRBHFTX126U3B5NiGOYrrvlDDhaJBsHgikChFlknSI45Yw7Jw MTtW2KJWs3Bx3GUfxFAdoo6UJ4n6/bwqjAH9b0XlhMsU4MMZVxFo6aZdVX1DJciAiwX/ RQfpJ6tWpn7dwjQTy/CK6sqm22PFrcT+dPOUg8di5WGOqyr7AFdkDwbdagnOBCy50qOi McK6KBV6rHgtnlo0VBEKi7DLstwMXQsKrVB82m0f4jYzf7KNoB+WDhK2AZ8P4GLk8LgO ce4UxMiWgTmINQVwEZ538BcUx+6bWw4STyudcEGlvZwlmJ6V5FthDuZMOb0UyY4KoAH0 o81Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=e0cuF1QkaotrAveXBqlbeR6q9J0E47w5jGQfnpJJKIQ=; b=kIzys4WvmPBxqvZBsngJO+hrJYEuGnxpNyTeGx7lmqBypE0sW2in6l+UGsIZb2Mu0n 4dEiwtjPV/WcK+Xjw049TYaFQDvxYH+1vqZ4JFxXQAMbUXbCywxVIkAFG5Uwzw25oTHI ZNJl5yNXopaptbMC5woTZBHTJZ2h8git4qZcFAQmCNMDN6CdRH0sjwKu3/7peMIqPR/F aYQ3EHe7bgvxVggLJoAAGKLaRdwUQpHStc0zZx4mr/3KHIBImkHmXHH+takAfMo92LsG Y5W0UUOFRG0KyKk/co2tFcUG3n4BIclSXpId6peNTxhB28mWByoJzrEMEVYqdQezxmC+ LRHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c+41q03o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c8si1368766ejp.43.2020.09.17.20.14.28; Thu, 17 Sep 2020 20:14:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=c+41q03o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727688AbgIRDN0 (ORCPT + 99 others); Thu, 17 Sep 2020 23:13:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:46754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726594AbgIRCB6 (ORCPT ); Thu, 17 Sep 2020 22:01:58 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A066421582; Fri, 18 Sep 2020 02:01:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394518; bh=KBXbAQqY+WESxYY3ikEmMr5gH9BlQ2Cc19yj1heB7fk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c+41q03om3HMOj5GxU0Sc4CRr5udUKnIqe22LTF7jW4+aUIkYXrUknoPFyT2zu8oL ooaRTtZ3TA1PJg9N/o7VhNL7SEuA4CzIqWS2N29TUESnTKpJDET4oJ0R8KigXoGIOq FxNEIB25RQJUZPHo01tMGiTRdSiAcmWXWaOYSsCw= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alex Deucher , Evan Quan , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.4 040/330] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table Date: Thu, 17 Sep 2020 21:56:20 -0400 Message-Id: <20200918020110.2063155-40-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200918020110.2063155-1-sashal@kernel.org> References: <20200918020110.2063155-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher [ Upstream commit 901245624c7812b6c95d67177bae850e783b5212 ] When a custom powerplay table is provided, we need to update the OD VDDC flag to avoid AVFS being enabled when it shouldn't be. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205393 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index e6da53e9c3f46..edd6d4912edeb 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c @@ -3986,6 +3986,13 @@ static int smu7_set_power_state_tasks(struct pp_hwmgr *hwmgr, const void *input) "Failed to populate and upload SCLK MCLK DPM levels!", result = tmp_result); + /* + * If a custom pp table is loaded, set DPMTABLE_OD_UPDATE_VDDC flag. + * That effectively disables AVFS feature. + */ + if (hwmgr->hardcode_pp_table != NULL) + data->need_update_smu7_dpm_table |= DPMTABLE_OD_UPDATE_VDDC; + tmp_result = smu7_update_avfs(hwmgr); PP_ASSERT_WITH_CODE((0 == tmp_result), "Failed to update avfs voltages!", -- 2.25.1