Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3743457pxk; Tue, 29 Sep 2020 05:18:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXOWUT3cj5etebf1qxbdmU8JIoIS7pHeZeqWxCfOovR3YGmXyuTrT6pzMhjr4l1G1bztwJ X-Received: by 2002:a17:906:5611:: with SMTP id f17mr3718540ejq.427.1601381926705; Tue, 29 Sep 2020 05:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601381926; cv=none; d=google.com; s=arc-20160816; b=qf/rE7QvQrGbLqc8wzfz81uxPDTnBnLnZdq4CfiBgj++2zv6oR3r9SEgeqF1CzaL7E rAI06Syqs4soA8k4rMBRhHkKDzvh2ZVS/r56zSikAG3aE/VkQLIrp7cEUrbnYg2uzpmH cXHqc7O10fFR46lhKov53wXEOuNDC9Uq0YbASFC4Ud7B7E7MtqE0M7aGTDK2gKieoWwW /QHJ6MZ/Td5eTCp8+h/TklpoKCl2P44EljA42wIh7voouW+fCHlGbuzNtC9OpgfH5YJ+ MCW1eSPeDUPAi+9vkePV/7cDNjqE2sywDadrT4FSiBCjEolgvK+8ALArqgsAVMQcgtV6 fQ7A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kI9jf+9wqUZrOquK4T3iHD/d+ojBWkULcxTWG8irbL0=; b=jm63BY9hTQ8tchVP8dIrcebFjySwn0RtSLC9PzpS0PSNVeUqJb+Uvv5KarQuYHo6Xy KcKjmub7zRumR23eZ5W2WECoBp6rnx6+NBD5vh7LPMC+Hqid4weS+kyi7Dsbqef1omKC JecvvSg4sYRCXXCjYwzszbirRoJQO7xHXSob16zJ6loU58ch/nMcz7WEv6FbPSoX2qWM P7maDA2gbGNZKpPOPw6uvmAedUTacmg381cBxI4j4nsveYo1qTVUAvj5U9NDCD47n0kh NHD1vSZEwU/ZEy8CGC2fyXMOUDs+kRLzIz77ioFTR6lHM+tJRVVpZRO2CQw/gG0U+EIQ JUcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iuMiMzKc; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si2450587ejg.460.2020.09.29.05.18.23; Tue, 29 Sep 2020 05:18:46 -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=iuMiMzKc; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730234AbgI2MRB (ORCPT + 99 others); Tue, 29 Sep 2020 08:17:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:53440 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730040AbgI2LhA (ORCPT ); Tue, 29 Sep 2020 07:37:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2CB0F23AFA; Tue, 29 Sep 2020 11:32:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379155; bh=s1S85SKamIhAe34DUzJjRHC6BhjlZfVzIf0xrICYwJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iuMiMzKczeN1Q0NmPoHs101O4GtVqkPWZzOSanxnAZ7xyQNJBeeThRcSF+h5ZuRQP QB4wU973o3dSkGGDWFof5/8Bd4OmpFR4waS0Q9C6vh5Cs5y/TvyDz+T3CX+lQT2u5o ge1S2Qzxll4MXdVIbOoywFIBgmwjIlsnfekilWBk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Alex Deucher , Sasha Levin Subject: [PATCH 5.4 038/388] drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table Date: Tue, 29 Sep 2020 12:56:09 +0200 Message-Id: <20200929110012.337880060@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200929110010.467764689@linuxfoundation.org> References: <20200929110010.467764689@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 3a2a1dc9a786a..1b55f037ba4a7 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c @@ -3987,6 +3987,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