Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4485820ybx; Mon, 4 Nov 2019 14:13:04 -0800 (PST) X-Google-Smtp-Source: APXvYqyQgUHpzpOv5ux2/G5upvPlVWthTpru3cqlxWsqJ+wFRNsjEJikMcEVnLdHj7vmNHCbBC8m X-Received: by 2002:a17:906:1354:: with SMTP id x20mr10782801ejb.131.1572905584689; Mon, 04 Nov 2019 14:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905584; cv=none; d=google.com; s=arc-20160816; b=upcO0mMvKIQNtoUKHKEat/Ut/PkF/Rd7iPncT1iS/sO2ghNd7JVZWTlOV4PgKbKx6N Ll78XbjaC68JK3cXzeVN/slvbN34ENn0tbBRW60Iagh/qz7RZ3p7Evxb4b+GrQOeq2oT A4kCeZYWPdXaLcT8ZrL3f2RkruTd1/m+SR6gkH7ixV5kqeYDrcX5ytM1OPNBfnC7KSyT JPcP4L9R0KSfSZaUeexjTu84f684rVMpBlpLfmkaDKPtq1OScNVSrvR6eZf3s+1dOs6k vGo/RMY1yaN+jrgOUC9wUoKkW+Nk92rGQbmxRsu0GvHpHIQno9zu7lJrSmouT4ATTEZm bcMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9/Bzsu3Q4rRD8KUb5oFpYA6vSe1ptMZSAl/IjdvVHJU=; b=p9hr9Effk09Gq35NCEB49Wq4NTNppv+pHdm86h8AJUDCLaF5dSL1/TnAJXRodmHah3 pm/5fIASn+PUHYIC/Ra4J/xuk+7AafLoP3eG26TMV9j42Uq1xSmsoBb4038A0OGOHfpq PE1wcH5vdxzN4K/7I3jKFuG8IAYRfWuUNFlPZloA8cuViXz7ZTT85fK7BNAUXHbyllCf 49OmqQ6WU8e4biT70uvrpW75mY7C/PBxrz+4joWnBM7oQ4eOgH40QJeDRRYJI0PqV4Cf qdADGpT8isUMCXWeGUzOMdrQywSXRT056HMWoGXPAbeosnU61rv7p0/fHTU+VjWYNTaA 82QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AchjqNPS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si12165153ejw.409.2019.11.04.14.12.41; Mon, 04 Nov 2019 14:13:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AchjqNPS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390737AbfKDWMO (ORCPT + 99 others); Mon, 4 Nov 2019 17:12:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:44926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390690AbfKDWLc (ORCPT ); Mon, 4 Nov 2019 17:11:32 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (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 360C420650; Mon, 4 Nov 2019 22:11:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905491; bh=gKENhKeD9LP9ddX25aSN1kM+omzQ76odB0+93gRqV/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AchjqNPS6YDkAzx/J57uljlHXa4P9OPjsC9jlbKAGHnU92AMIVmRe7jIafB0WLMMz nUPyJsVRRiAMltR+JpFv/+7QxjUOBEjeYGJnqhjFVmTKcJJIgeXJNlq2mT8NYuMX4+ HbfG2gIvXi2RuAic4PhEr9Iu4Vgva/ve8sDDvYVg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pelle van Gils , Alex Deucher Subject: [PATCH 5.3 140/163] drm/amdgpu/powerplay/vega10: allow undervolting in p7 Date: Mon, 4 Nov 2019 22:45:30 +0100 Message-Id: <20191104212150.477728899@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pelle van Gils commit e6f4e274c1e52d1f0bfe293fb44ddf59de6c0374 upstream. The vega10_odn_update_soc_table() function does not allow the SCLK dependent voltage to be set for power-state 7 to a value below the default in pptable. Change the for-loop condition to allow undervolting in the highest state. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205277 Signed-off-by: Pelle van Gils Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c @@ -5097,9 +5097,7 @@ static void vega10_odn_update_soc_table( if (type == PP_OD_EDIT_SCLK_VDDC_TABLE) { podn_vdd_dep = &data->odn_dpm_table.vdd_dep_on_sclk; - for (i = 0; i < podn_vdd_dep->count - 1; i++) - od_vddc_lookup_table->entries[i].us_vdd = podn_vdd_dep->entries[i].vddc; - if (od_vddc_lookup_table->entries[i].us_vdd < podn_vdd_dep->entries[i].vddc) + for (i = 0; i < podn_vdd_dep->count; i++) od_vddc_lookup_table->entries[i].us_vdd = podn_vdd_dep->entries[i].vddc; } else if (type == PP_OD_EDIT_MCLK_VDDC_TABLE) { podn_vdd_dep = &data->odn_dpm_table.vdd_dep_on_mclk;