Skip to contentSkip to conversation

drm/amd/powerplay: fix PSI not enabled by kmd

PATCH In review Rex Zhu 2 participants 2 messages Aug 2, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/1 drm/amd/powerplay: fix PSI not enabled by kmd

cherry-pick from windows driver.

Change-Id Ie7ff2e26bdf65a98eab21779a2bf94ee416c52be
---
 drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c +1 -1
index cd33eb1..c062844 100644
@@ -142,7 +142,7 @@ int pp_atomfwctrl_get_voltage_table_v4(struct pp_hwmgr *hwmgr,
 		}
 	} else if (voltage_mode == VOLTAGE_OBJ_SVID2) {
 		voltage_table->psi1_enable =
-			voltage_object->svid2_voltage_obj.loadline_psi1 & 0x1;
+			(voltage_object->svid2_voltage_obj.loadline_psi1 & 0x20) >> 5;
 		voltage_table->psi0_enable =
 			voltage_object->svid2_voltage_obj.psi0_enable & 0x1;
 		voltage_table->max_vid_step =
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +3 -0
index 2aab33d..679c768 100644
@@ -2521,6 +2521,9 @@ static int vega10_init_smc_table(struct pp_hwmgr *hwmgr)
 	pp_table->DisplayDpmVoltageMode =
 			(uint8_t)(table_info->uc_dcef_dpm_voltage_mode);
 
+	data->vddc_voltage_table.psi0_enable = voltage_table.psi0_enable;
+	data->vddc_voltage_table.psi1_enable = voltage_table.psi1_enable;
+
 	if (data->registry_data.ulv_support &&
 			table_info->us_ulv_voltage_offset) {
 		result = vega10_populate_ulv_state(hwmgr);
Signature · 6 lines
1.9.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): 1501673353-23686-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Wednesday, August 02, 2017 7:29 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amd/powerplay: fix PSI not enabled by kmd

Quoted 4 lines

cherry-pick from windows driver.

Change-Id Ie7ff2e26bdf65a98eab21779a2bf94ee416c52be
Quoted 42 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c | 2 +-
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c +1 -1
index cd33eb1..c062844 100644
@@ -142,7 +142,7 @@ int pp_atomfwctrl_get_voltage_table_v4(struct
 pp_hwmgr *hwmgr,
 		}
 	} else if (voltage_mode == VOLTAGE_OBJ_SVID2) {
 		voltage_table->psi1_enable =
-			voltage_object->svid2_voltage_obj.loadline_psi1 &
 0x1;
+			(voltage_object->svid2_voltage_obj.loadline_psi1 &
 0x20) >> 5;
drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c +0 -0
 		voltage_table->psi0_enable =
 			voltage_object->svid2_voltage_obj.psi0_enable &

0x1;

drivers/gpu/drm/amd/powerplay/hwmgr/ppatomfwctrl.c +0 -0
 		voltage_table->max_vid_step =
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +3 -0
index 2aab33d..679c768 100644
@@ -2521,6 +2521,9 @@ static int vega10_init_smc_table(struct pp_hwmgr
 *hwmgr)
 	pp_table->DisplayDpmVoltageMode =
 			(uint8_t)(table_info->uc_dcef_dpm_voltage_mode);
 
+	data->vddc_voltage_table.psi0_enable = voltage_table.psi0_enable;
+	data->vddc_voltage_table.psi1_enable = voltage_table.psi1_enable;
+
 	if (data->registry_data.ulv_support &&
 			table_info->us_ulv_voltage_offset) {

result = vega10_populate_ulv_state(hwmgr);
--
1.9.1

Quoted 4 lines

_______________________________________________
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