drm/amdgpu/powerplay: fix typo in mvdd table setup
Subsystems (2)
PATCH 1/1 drm/amdgpu/powerplay: fix typo in mvdd table setup
Polaris and vegam use count for the value rather than level. This looks like a copy paste typo from when the code was adapted from previous asics.
I'm not sure that the SMU actually uses this value, so I don't know that it actually is a bug per se.
--- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +1 -1
@@ -655,7 +655,7 @@ static int polaris10_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, count =SMU_MAX_SMIO_LEVELS ;for (level =0 ; level < count; level++) { table->SmioTable2.Pattern[level].Voltage = -PP_HOST_TO_SMC_US (data->mvdd_voltage_table.entries[count].value *VOLTAGE_SCALE ); +PP_HOST_TO_SMC_US (data->mvdd_voltage_table.entries[level].value *VOLTAGE_SCALE );/* Index into DpmTable.Smio. Drive bits from Smio entry to get this voltage level.*/ table->SmioTable2.Pattern[level].Smio = (uint8_t ) level;
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c +1 -1
@@ -456,7 +456,7 @@ static int vegam_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, count =SMU_MAX_SMIO_LEVELS ;for (level =0 ; level < count; level++) { table->SmioTable2.Pattern[level].Voltage =PP_HOST_TO_SMC_US ( - data->mvdd_voltage_table.entries[count].value *VOLTAGE_SCALE ); + data->mvdd_voltage_table.entries[level].value *VOLTAGE_SCALE );/* Index into DpmTable.Smio. Drive bits from Smio entry to get this voltage level.*/ table->SmioTable2.Pattern[level].Smio = (uint8_t ) level;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20191003142617.7869-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Quan, Evan
Reviewed-by Evan Quan-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Thursday, October 3, 2019 10:26 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Robert Strube <[email protected]>
Subject: [PATCH] drm/amdgpu/powerplay: fix typo in mvdd table setup
Polaris and vegam use count for the value rather than level. This looks like a copy paste typo from when the code was adapted from previous asics.
I'm not sure that the SMU actually uses this value, so I don't know that it actually is a bug per se.
--- drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 2 +- drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +2 -1
@@ -655,7 +655,7 @@ static int polaris10_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, count =SMU_MAX_SMIO_LEVELS ;for (level =0 ; level < count; level++) { table->SmioTable2.Pattern[level].Voltage = -PP_HOST_TO_SMC_US (data->mvdd_voltage_table.entries[count].value *VOLTAGE_SCALE ); +PP_HOST_TO_SMC_US (data->mvdd_voltage_table.entries[level].value * +VOLTAGE_SCALE );/* Index into DpmTable.Smio. Drive bits from Smio entry to get this voltage level.*/ table->SmioTable2.Pattern[level].Smio =
(uint8_t) level;
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c +1 -1
@@ -456,7 +456,7 @@ static int vegam_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, count =SMU_MAX_SMIO_LEVELS ;for (level =0 ; level < count; level++) { table->SmioTable2.Pattern[level].Voltage =PP_HOST_TO_SMC_US ( - data->mvdd_voltage_table.entries[count].value *VOLTAGE_SCALE ); + data->mvdd_voltage_table.entries[level].value *VOLTAGE_SCALE );/* Index into DpmTable.Smio. Drive bits from Smio entry to get this voltage level.*/ table->SmioTable2.Pattern[level].Smio = (uint8_t ) level;
--
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx