Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3743476pxk; Tue, 29 Sep 2020 05:18:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE/9B0J4olwYXxPYjfw4JN3NS25/juBjDhxqLIdEHIVqGHrjdRWcuGVHjfGsdmCu+kSb69 X-Received: by 2002:a17:906:78a:: with SMTP id l10mr1427554ejc.162.1601381929443; Tue, 29 Sep 2020 05:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601381929; cv=none; d=google.com; s=arc-20160816; b=ZG2nVtUKUbtFteF/W/FvplxAf+NUZHR9X20RhR9lTX0wdWdqYJhFiXVty4H2O9Bj/O JyLC5FMG5uACJnO2M2QhAY1qpKXVmQOVWgwTxzrfo3dg1i5hps2W04FfO4OprpnhS7H+ /79wpVL35B1ie1Iv4URIIrgbqVKJi+x2H1zi30r2Qq2IpWKm3bs1YGBsu4v5IFK1ul3c s9AaeMhXMABw+DmCZBf2uCvuapR0hzlgm5EZi2F/ffcD1vv1tjL/tERTHj05qu8FuPQ/ fiV0D9o9Mn/RlezJcGP2STU4v5ZBP3KiqRoHwbKoUmkIlIdiihZT7CnaiW/yeKGOaQU6 aUiw== 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=85Ywnojid/8dDHyxgHlf2VroQXX2n1cGxK5TD0UbwWU=; b=D4g4Te0JT+KHUr4j7h+7K5biV7w7XGEcMNz5w+Z0C32KiNdSBloimQ8FiIsseAHHSx EAetpN4QZUc2/8udcA6nWiTw7M4ZW9OCjGGkPIhfW1YgMa+x/E+fDIRZsL2JPmzenNFS I3Gu31VKUwlc+1ECSiIvXB2ha+7W6ad34CtyTMGLff9OCxhIt+WHBmAIeft9HuwjDHgy 8EgkF/U5Dfuf7IZRJg+JPPruKKRCx7fSN2/uk1Eu4fQlc0I9grUurHjCFfjkBXTCWkQT 87DUZ4Uhb8lMH6dYMEYWdltfiCKQy+sgXD+RB+/01nWu8xLSEwT9aCW7yCcfbmcNPc17 Rrbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="f/vWFF0v"; 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 bl18si2705062ejb.171.2020.09.29.05.18.26; Tue, 29 Sep 2020 05:18:49 -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="f/vWFF0v"; 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 S1731550AbgI2MR3 (ORCPT + 99 others); Tue, 29 Sep 2020 08:17:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:49146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730032AbgI2Lg7 (ORCPT ); Tue, 29 Sep 2020 07:36:59 -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 CB3FC23AC4; Tue, 29 Sep 2020 11:32:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601379146; bh=QJ2dpRTbPRNUbz7iVhxRcALpzJs8tArsFex247QhvQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f/vWFF0vwbKdtc4aALll5+KFA5cPmo9npo4oqDmcz569a2vm6AIpXsxBMuG8kg/5K U0A6y0WFZtuE2gNNGFa1b0fmTasWxG3Fm0JrM9odWvL7t7EPa8zJQorV0dWDi3mBM2 r/ZGLTh4DuwFEGo2BztgVRKzfHJfyUsc1yK42ZLk= 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 034/388] drm/amdgpu/powerplay: fix AVFS handling with custom powerplay table Date: Tue, 29 Sep 2020 12:56:05 +0200 Message-Id: <20200929110012.144241359@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 53dbc27ad5a93932ff1892a8e4ef266827d74a0f ] 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/vega10_hwmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c index beacfffbdc3eb..ecbc9daea57e0 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c @@ -3691,6 +3691,13 @@ static int vega10_set_power_state_tasks(struct pp_hwmgr *hwmgr, PP_ASSERT_WITH_CODE(!result, "Failed to upload PPtable!", return 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_dpm_table |= DPMTABLE_OD_UPDATE_VDDC; + vega10_update_avfs(hwmgr); /* -- 2.25.1