summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPelle van Gils <pelle@vangils.xyz>2019-10-24 16:04:31 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-06 13:06:22 +0100
commitfd9a708c7bde2175357acf87ff3a4416b9807f59 (patch)
tree744136801dc9cbc3b6c2d8deb00fd62896231e68
parent3e285a5c1401191f2ccc58ebf4a8a19293fcf069 (diff)
downloadlinux-stable-fd9a708c7bde2175357acf87ff3a4416b9807f59.tar.gz
linux-stable-fd9a708c7bde2175357acf87ff3a4416b9807f59.tar.bz2
linux-stable-fd9a708c7bde2175357acf87ff3a4416b9807f59.zip
drm/amdgpu/powerplay/vega10: allow undervolting in p7
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 <pelle@vangils.xyz> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index fb86c24394ff..ce459ea4ec3a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -4751,9 +4751,7 @@ static void vega10_odn_update_soc_table(struct pp_hwmgr *hwmgr,
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;