Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp882574pxk; Thu, 17 Sep 2020 20:15:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycpAh6gPuHm2DUhwqIQ13ZcEvNGFLW9le/COayLSSCzpq+6xxx4uF86d7t/lCRUGEdERJR X-Received: by 2002:a50:8524:: with SMTP id 33mr37573959edr.123.1600398901769; Thu, 17 Sep 2020 20:15:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600398901; cv=none; d=google.com; s=arc-20160816; b=kcEt4aSzkOM1za5oVjU5yQz950PLYSVKGj+wUC9dYolsSdXPln3EE9TmNFOTYQ8JnK BV549bJ+PIPLNjVrlRBgGgWDiVmHzDbsScQMKrRGhuyL7VUsOCtoWEw2+VQeWp7qoLpC o95+hewoL23AtrLcAB6h/PTkcf8eLgliuz1faWGhzgVRNSTpArCWujhzQn1g8ZM0EbuX zwfF8HMcl/ji563H+pmfc/hNDPoRPZqxC1JYW5VK+f2urIpzVrtdMCmPCkSIf5RqmdzL rqAWe2d9yo1c3KsWgvCW5FFO9T0MZFWlWjSxlPGNYNe8oyi1dOlCDh0SaujqOlvUjPD/ B+qw== 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=85Ywnojid/8dDHyxgHlf2VroQXX2n1cGxK5TD0UbwWU=; b=JNQJLkcyA77yFg3G5TivV7oM4NGSiwbOZM3TDOi2i8bqfMzZE2XWhiIW+MWPgtNm+f ST+4cXz1YrfYYvoglsikRRgibatBiQeD64fGLKi5n2NbTVyRgLza/WOx/d6zpmqHteFQ wM4Fqrtkny7Sh4h2RZAwDEe9FZk0B2VvbKyjA36iT4VBNed0pSanIsX0YpqgUEwtpgt8 cEFMKmBtYryvxXT2NMKv2XJzRecUJAk9LNEU+KZSOheHvmUnaOVi7JptdYqWm/nrnR3G 4XDXpQiMcHODGS+TGnooqhH+LY7OjqSeYpvwzTBaaXGGEO9SAUMDe7zXk4ejRYSclyUz aIUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1FgVv5h9; 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 dr7si1228986ejc.447.2020.09.17.20.14.38; Thu, 17 Sep 2020 20:15:01 -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=1FgVv5h9; 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 S1730686AbgIRDNp (ORCPT + 99 others); Thu, 17 Sep 2020 23:13:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:46566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726551AbgIRCBy (ORCPT ); Thu, 17 Sep 2020 22:01:54 -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 16FD3208DB; Fri, 18 Sep 2020 02:01:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600394513; bh=QJ2dpRTbPRNUbz7iVhxRcALpzJs8tArsFex247QhvQI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1FgVv5h92Z/PipQRzVY5im3rXfG5mxNGKecnAomgN+voUuyKB1cgXHrRPklTz5VzL /QJbAtIaRtq049QMFOVvekF1P9GHuHuCq/lDrzpcbvgGFHSzplU8hQd7/Ds6uShTne P90QyeRtmBMuOgcf8zmZIm//9e55Ok478BNcpwQc= 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 036/330] drm/amdgpu/powerplay: fix AVFS handling with custom powerplay table Date: Thu, 17 Sep 2020 21:56:16 -0400 Message-Id: <20200918020110.2063155-36-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 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