Skip to contentSkip to conversation

Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

PATCH In review Tom St Denis 2 participants 4 messages Oct 4, 2017 3 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

The commit being reverted breaks Tonga support by causing visible noise on the screen. The original patch should have been split up to begin with as adding CI functionality shouldn't result in functional changes to non-CI platforms at the same time.

This reverts commit 0b6b4cbf77c995a34a4ec3d705a636434dadc51a.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c      |  58 +++++------
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 118 +++++------------------
 2 files changed, 47 insertions(+), 129 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +25 -33
index 35e80c969737..089d55d4ad2c 100644
@@ -53,7 +53,6 @@ static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr);
 static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 static int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr);
-static int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 
 uint8_t convert_to_vid(uint16_t vddc)
 {
@@ -155,14 +154,6 @@ int hwmgr_early_init(struct pp_instance *handle)
 	hwmgr->reload_fw = 1;
 
 	switch (hwmgr->chip_family) {
-	case AMDGPU_FAMILY_CI:
-		hwmgr->smumgr_funcs = &ci_smu_funcs;
-		ci_set_asic_special_caps(hwmgr);
-		hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK |
-					PP_ENABLE_GFX_CG_THRU_SMU);
-		hwmgr->pp_table_version = PP_TABLE_V0;
-		smu7_init_function_pointers(hwmgr);
-		break;
 	case AMDGPU_FAMILY_CZ:
 		hwmgr->smumgr_funcs = &cz_smu_funcs;
 		cz_init_function_pointers(hwmgr);
@@ -882,8 +873,28 @@ void phm_apply_dal_min_voltage_request(struct pp_hwmgr *hwmgr)
 
 void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
 {
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableVoltageTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableEngineTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableMemoryTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableMGClockGating);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableMGCGTSSM);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableLSClockGating);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_Force3DClockSupport);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableLightSleep);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableMCLS);
+	phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisablePowerGating);
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableDPM);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_DisableSMUUVDHandshake);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_ThermalAutoThrottling);
+
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_PCIEPerformanceRequest);
 
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_NoOD5Support);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UserMaxClockForMultiDisplays);
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VpuRecoveryInProgress);
+
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDDPM);
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VCEDPM);
 
@@ -908,6 +919,7 @@ void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
 
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 						PHM_PlatformCaps_FanSpeedInTableIsRPM);
+
 	return;
 }
 
@@ -956,8 +968,7 @@ int phm_get_voltage_evv_on_sclk(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
 
 int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
+
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 						PHM_PlatformCaps_SQRamping);
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
@@ -983,8 +994,6 @@ int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 
 int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SQRamping);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
@@ -993,13 +1002,12 @@ int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 			PHM_PlatformCaps_TDRamping);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_TCPRamping);
+
 	return 0;
 }
 
 int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SQRamping);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
@@ -1013,25 +1021,11 @@ int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 		      PHM_PlatformCaps_UVDPowerGating);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 		      PHM_PlatformCaps_VCEPowerGating);
-	return 0;
-}
 
-int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
-{
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_SQRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_DBRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TDRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TCPRamping);
 	return 0;
 }
 
-int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr)
+int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SQRamping);
@@ -1042,8 +1036,6 @@ int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_TCPRamping);
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_MemorySpreadSpectrumSupport);
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_EngineSpreadSpectrumSupport);
+		    PHM_PlatformCaps_EVV);
 	return 0;
 }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +22 -96

209 lines not on this page · raw message

Signature · 6 lines
2.12.0

_______________________________________________
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): [email protected]

Acked-by Alex Deucher
#2 lore raw
Quoted 483 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, October 04, 2017 1:13 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH] Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

The commit being reverted breaks Tonga support by causing visible noise on the screen. The original patch should have been split up to begin with as adding CI functionality shouldn't result in functional changes to non-CI platforms at the same time.

This reverts commit 0b6b4cbf77c995a34a4ec3d705a636434dadc51a.

---
 drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c      |  58 +++++------
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 118 +++++-------
-----------
 2 files changed, 47 insertions(+), 129 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -1
index 35e80c969737..089d55d4ad2c 100644
@@ -53,7 +53,6 @@ static int hwmgr_set_user_specify_caps(struct
 pp_hwmgr *hwmgr);
 static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 static int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr);
-static int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 
 uint8_t convert_to_vid(uint16_t vddc)

{

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -4
@@ -155,14 +154,6 @@ int hwmgr_early_init(struct pp_instance *handle)
 	hwmgr->reload_fw = 1;
 
 	switch (hwmgr->chip_family) {
-	case AMDGPU_FAMILY_CI:
-		hwmgr->smumgr_funcs = &ci_smu_funcs;
-		ci_set_asic_special_caps(hwmgr);
-		hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK

|

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +5 -4
-					PP_ENABLE_GFX_CG_THRU_SMU);
-		hwmgr->pp_table_version = PP_TABLE_V0;
-		smu7_init_function_pointers(hwmgr);
-		break;
 	case AMDGPU_FAMILY_CZ:
 		hwmgr->smumgr_funcs = &cz_smu_funcs;
 		cz_init_function_pointers(hwmgr);
@@ -882,8 +873,28 @@ void phm_apply_dal_min_voltage_request(struct
 pp_hwmgr *hwmgr)
 
 void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
 {
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableVoltageTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableEngineTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableMemoryTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableMGClockGating);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableMGCGTSSM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableLSClockGating);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_Force3DClockSupport);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableLightSleep);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableMCLS);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_set(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisablePowerGating);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableDPM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableSMUUVDHandshake);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_ThermalAutoThrottling);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_PCIEPerformanceRequest);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_NoOD5Support);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_UserMaxClockForMultiDisplays);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_VpuRecoveryInProgress);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_UVDDPM);
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_VCEDPM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
@@ -908,6 +919,7 @@ void hwmgr_init_default_caps(struct pp_hwmgr
 *hwmgr)
 
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
 	PHM_PlatformCaps_FanSpeedInTableIsRPM);
+
 	return;

}

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
@@ -956,8 +968,7 @@ int phm_get_voltage_evv_on_sclk(struct pp_hwmgr
 *hwmgr, uint8_t voltage_type,
 
 int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
+
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
	PHM_PlatformCaps_SQRamping);
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -2
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
@@ -983,8 +994,6 @@ int polaris_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
 
 int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SQRamping);
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
@@ -993,13 +1002,12 @@ int fiji_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
 			PHM_PlatformCaps_TDRamping);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_TCPRamping);
+
 	return 0;
 }
 
 int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_SQRamping);
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -15
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
@@ -1013,25 +1021,11 @@ int tonga_set_asic_special_caps(struct
 pp_hwmgr *hwmgr)
 		      PHM_PlatformCaps_UVDPowerGating);
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 		      PHM_PlatformCaps_VCEPowerGating);
-	return 0;
-}
 
-int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
-{
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_SQRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_DBRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TDRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TCPRamping);
 	return 0;
 }
 
-int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr)
+int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
 {
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -3
 			PHM_PlatformCaps_SQRamping);
@@ -1042,8 +1036,6 @@ int ci_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
 	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_TCPRamping);
 	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-
 	PHM_PlatformCaps_MemorySpreadSpectrumSupport);
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-
	PHM_PlatformCaps_EngineSpreadSpectrumSupport);
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+		    PHM_PlatformCaps_EVV);
 	return 0;
 }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -9
index 8dbe9148aad3..45ff94e4ec47 100644
@@ -26,7 +26,6 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <asm/div64.h>
-#include <drm/amdgpu_drm.h>
 #include "pp_acpi.h"
 #include "ppatomctrl.h"
 #include "atombios.h"
@@ -585,20 +584,13 @@ static int smu7_setup_default_pcie_table(struct
 pp_hwmgr *hwmgr)
 		data->dpm_table.pcie_speed_table.count = 6;
 	}
 	/* Populate last level for boot PCIE level, but do not increment count.
 */
-	if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-		for (i = 0; i <= data->dpm_table.pcie_speed_table.count; i++)
-			phm_setup_pcie_table_entry(&data-
 >dpm_table.pcie_speed_table, i,
-				get_pcie_gen_support(data->pcie_gen_cap,
-						PP_Max_PCIEGen),
-				data-
 >vbios_boot_state.pcie_lane_bootup_value);
-	} else {
-		phm_setup_pcie_table_entry(&data-
 >dpm_table.pcie_speed_table,
+	phm_setup_pcie_table_entry(&data-
 >dpm_table.pcie_speed_table,
 			data->dpm_table.pcie_speed_table.count,
 			get_pcie_gen_support(data->pcie_gen_cap,
 					PP_Min_PCIEGen),
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -1
 			get_pcie_lane_support(data->pcie_lane_cap,
 					PP_Max_PCIELane));
-	}
+
 	return 0;
 }
@@ -674,7 +666,7 @@ static int smu7_setup_dpm_tables_v0(struct
 pp_hwmgr *hwmgr)
 				allowed_vdd_sclk_table->entries[i].clk) {
 			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].value =

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
 				allowed_vdd_sclk_table->entries[i].clk;
-			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].enabled = (i == 0) ? 1 : 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; to do */

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
 			data->dpm_table.sclk_table.count++;
 		}
 	}
@@ -688,7 +680,7 @@ static int smu7_setup_dpm_tables_v0(struct
 pp_hwmgr *hwmgr)
 			allowed_vdd_mclk_table->entries[i].clk) {
 			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].value =

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
 				allowed_vdd_mclk_table->entries[i].clk;
-			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].enabled = (i == 0) ? 1 : 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; */

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -12
 			data->dpm_table.mclk_table.count++;
 		}
 	}
@@ -948,24 +940,13 @@ static int smu7_enable_sclk_mclk_dpm(struct
 pp_hwmgr *hwmgr)
 
 		PHM_WRITE_FIELD(hwmgr->device, MC_SEQ_CNTL_3,
 CAC_EN, 0x1);
 
-
-		if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d30, 0x5);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d3c, 0x5);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d80, 0x100005);
-			udelay(10);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d30, 0x400005);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d3c, 0x400005);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d80, 0x500005);
-		} else {
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x5);
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x100005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
-			udelay(10);
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x500005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -1
-		}
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x100005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -0
+		udelay(10);
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x500005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -4
 	}
 
 	return 0;
@@ -994,10 +975,6 @@ static int smu7_start_dpm(struct pp_hwmgr
 *hwmgr)
 	PHM_WRITE_INDIRECT_FIELD(hwmgr->device,
 CGS_IND_REG__PCIE,
 			SWRST_COMMAND_1, RESETLC, 0x0);
 
-	if (hwmgr->chip_family == AMDGPU_FAMILY_CI)
-		cgs_write_register(hwmgr->device, 0x1488,
-			(cgs_read_register(hwmgr->device, 0x1488) &
 ~0x1));
-
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -14
 	if (smu7_enable_sclk_mclk_dpm(hwmgr)) {
 		pr_err("Failed to enable Sclk DPM and Mclk DPM!");
 		return -EINVAL;
@@ -1389,29 +1366,12 @@ static void smu7_init_dpm_defaults(struct
 pp_hwmgr *hwmgr)
 						&tmp3);
 		tmp3 = (tmp3 >> 5) & 0x3;
 		data->vddc_phase_shed_control = ((tmp3 << 1) | (tmp3 >>
 1)) & 0x3;
-	} else if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-		data->vddc_phase_shed_control = 1;
-	} else {
-		data->vddc_phase_shed_control = 0;
-	}
-
-	if (hwmgr->chip_id  == CHIP_HAWAII) {
-		data->thermal_temp_setting.temperature_low = 94500;
-		data->thermal_temp_setting.temperature_high = 95000;
-		data->thermal_temp_setting.temperature_shutdown =
 104000;
-	} else {
-		data->thermal_temp_setting.temperature_low = 99500;
-		data->thermal_temp_setting.temperature_high = 100000;
-		data->thermal_temp_setting.temperature_shutdown =
 104000;
 	}
 
 	data->fast_watermark_threshold = 100;
 	if (atomctrl_is_voltage_controlled_by_gpio_v3(hwmgr,
 			VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_SVID2))
 		data->voltage_control =

SMU7_VOLTAGE_CONTROL_BY_SVID2;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -3
-	else if (atomctrl_is_voltage_controlled_by_gpio_v3(hwmgr,
-			VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_GPIO_LUT))
-		data->voltage_control =

SMU7_VOLTAGE_CONTROL_BY_GPIO;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -1
 	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_ControlVDDGFX)) {
@@ -1431,9 +1391,10 @@ static void smu7_init_dpm_defaults(struct
 pp_hwmgr *hwmgr)
 			data->mvdd_control =
 SMU7_VOLTAGE_CONTROL_BY_SVID2;
 	}
 
-	if (SMU7_VOLTAGE_CONTROL_NONE == data->vdd_gfx_control)
+	if (SMU7_VOLTAGE_CONTROL_NONE == data->vdd_gfx_control) {
 		phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_ControlVDDGFX);
+	}
 
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
 	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
 			PHM_PlatformCaps_ControlVDDCI)) {
@@ -2290,7 +2251,7 @@ static int
 smu7_set_private_data_based_on_pptable_v0(struct pp_hwmgr *hwmgr)
 		data->max_vddci_in_pptable =

(uint16_t)allowed_mclk_vddci_table->entries[allowed_mclk_vddci_table-

Quoted 1 line

count - 1].v;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
 	}
 
-	if (hwmgr->dyn_state.vddci_dependency_on_mclk != NULL &&

hwmgr->dyn_state.vddci_dependency_on_mclk->count >= 1)

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+	if (hwmgr->dyn_state.vddci_dependency_on_mclk != NULL &&

hwmgr->dyn_state.vddci_dependency_on_mclk->count > 1)
hwmgr->dyn_state.max_clock_voltage_on_ac.vddci =
hwmgr->dyn_state.vddci_dependency_on_mclk->entries[hwmgr-

Quoted 1 line

dyn_state.vddci_dependency_on_mclk->count - 1].v;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -14
 	return 0;
@@ -2306,38 +2267,10 @@ static int smu7_hwmgr_backend_fini(struct
 pp_hwmgr *hwmgr)
 	return 0;
 }
 
-static int smu7_get_elb_voltages(struct pp_hwmgr *hwmgr)
-{
-	uint16_t virtual_voltage_id, vddc, vddci, efuse_voltage_id;
-	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr-
 >backend);
-	int i;
-
-	if (atomctrl_get_leakage_id_from_efuse(hwmgr,
 &efuse_voltage_id) == 0) {
-		for (i = 0; i < SMU7_MAX_LEAKAGE_COUNT; i++) {
-			virtual_voltage_id = ATOM_VIRTUAL_VOLTAGE_ID0
+ i;
-			if
 (atomctrl_get_leakage_vddc_base_on_leakage(hwmgr, &vddc, &vddci,
-
 	virtual_voltage_id,
-
 	efuse_voltage_id) == 0) {
-				if (vddc != 0 && vddc != virtual_voltage_id) {
-					data-
Quoted 1 line

vddc_leakage.actual_voltage[data->vddc_leakage.count] = vddc;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-					data-
Quoted 1 line

vddc_leakage.leakage_id[data->vddc_leakage.count] = virtual_voltage_id;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -4
-					data->vddc_leakage.count++;
-				}
-				if (vddci != 0 && vddci != virtual_voltage_id) {
-					data-
Quoted 1 line

vddci_leakage.actual_voltage[data->vddci_leakage.count] = vddci;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-					data-
Quoted 1 line

vddci_leakage.leakage_id[data->vddci_leakage.count] = virtual_voltage_id;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +6 -18
-					data->vddci_leakage.count++;
-				}
-			}
-		}
-	}
-	return 0;
-}
-
 static int smu7_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
 {
 	struct smu7_hwmgr *data;
-	int result = 0;
+	int result;
 
 	data = kzalloc(sizeof(struct smu7_hwmgr), GFP_KERNEL);
 	if (data == NULL)
@@ -2348,15 +2281,11 @@ static int smu7_hwmgr_backend_init(struct
 pp_hwmgr *hwmgr)
 	smu7_init_dpm_defaults(hwmgr);
 
 	/* Get leakage voltage based on leakage ID. */
-	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_EVV)) {
-		result = smu7_get_evv_voltages(hwmgr);
-		if (result) {
-			pr_info("Get EVV Voltage Failed.  Abort Driver
 loading!\n");
-			return -EINVAL;
-		}
-	} else {
-		smu7_get_elb_voltages(hwmgr);
+	result = smu7_get_evv_voltages(hwmgr);
+
+	if (result) {
+		pr_info("Get EVV Voltage Failed.  Abort Driver loading!\n");
+		return -EINVAL;
 	}
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
 	if (hwmgr->pp_table_version == PP_TABLE_V1) {
@@ -3825,14 +3754,11 @@ static int

smu7_notify_link_speed_change_after_state_change(
static int smu7_notify_smc_display(struct pp_hwmgr *hwmgr) {
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr-

Quoted 1 line

backend);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
-	int ret = 0;
 
-	if (hwmgr->feature_mask & PP_VBI_TIME_SUPPORT_MASK) {
+	if (hwmgr->feature_mask & PP_VBI_TIME_SUPPORT_MASK)
 		smum_send_msg_to_smc_with_parameter(hwmgr,
 			(PPSMC_Msg)PPSMC_MSG_SetVBITimeout, data-
Quoted 1 line

frame_time_x2);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-		ret = (smum_send_msg_to_smc(hwmgr,

(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 : -EINVAL;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
-	}
-	return ret;
+	return (smum_send_msg_to_smc(hwmgr,
Quoted 2 lines

(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 : -EINVAL;
}

Does just reverting this last chunk fix the issue? I think that is the issue. Either way, the patch is:

Alex

Quoted 10 lines

static int smu7_set_power_state_tasks(struct pp_hwmgr *hwmgr, const
void *input)
--
2.12.0

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): BN6PR12MB16526756915BE3D1DA054EBBF7730-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#4 lore raw
Quoted 487 lines · Alexander
Quoted 483 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Tom St Denis
Sent: Wednesday, October 04, 2017 1:13 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH] Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

The commit being reverted breaks Tonga support by causing visible noise on the screen. The original patch should have been split up to begin with as adding CI functionality shouldn't result in functional changes to non-CI platforms at the same time.

This reverts commit 0b6b4cbf77c995a34a4ec3d705a636434dadc51a.

---
  drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c      |  58 +++++------
  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 118 +++++-------
-----------
  2 files changed, 47 insertions(+), 129 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -1
index 35e80c969737..089d55d4ad2c 100644
@@ -53,7 +53,6 @@ static int hwmgr_set_user_specify_caps(struct
 pp_hwmgr *hwmgr);
  static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr);
  static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr);
  static int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr);
-static int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 
  uint8_t convert_to_vid(uint16_t vddc)
  {
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -4
@@ -155,14 +154,6 @@ int hwmgr_early_init(struct pp_instance *handle)
  	hwmgr->reload_fw = 1;
 
  	switch (hwmgr->chip_family) {
-	case AMDGPU_FAMILY_CI:
-		hwmgr->smumgr_funcs = &ci_smu_funcs;
-		ci_set_asic_special_caps(hwmgr);
-		hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK

|

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +5 -4
-					PP_ENABLE_GFX_CG_THRU_SMU);
-		hwmgr->pp_table_version = PP_TABLE_V0;
-		smu7_init_function_pointers(hwmgr);
-		break;
  	case AMDGPU_FAMILY_CZ:
  		hwmgr->smumgr_funcs = &cz_smu_funcs;
  		cz_init_function_pointers(hwmgr);
@@ -882,8 +873,28 @@ void phm_apply_dal_min_voltage_request(struct
 pp_hwmgr *hwmgr)
 
  void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
  {
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableVoltageTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableEngineTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableMemoryTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableMGClockGating);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableMGCGTSSM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableLSClockGating);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_Force3DClockSupport);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableLightSleep);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableMCLS);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_set(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisablePowerGating);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableDPM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableSMUUVDHandshake);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_ThermalAutoThrottling);
+
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_PCIEPerformanceRequest);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_NoOD5Support);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_UserMaxClockForMultiDisplays);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_VpuRecoveryInProgress);
+
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_UVDDPM);
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_VCEDPM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
@@ -908,6 +919,7 @@ void hwmgr_init_default_caps(struct pp_hwmgr
 *hwmgr)
 
  	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
 	PHM_PlatformCaps_FanSpeedInTableIsRPM);
+
  	return;
  }
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
@@ -956,8 +968,7 @@ int phm_get_voltage_evv_on_sclk(struct pp_hwmgr
 *hwmgr, uint8_t voltage_type,
 
  int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
+
  	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
	PHM_PlatformCaps_SQRamping);

phm_cap_set(hwmgr->platform_descriptor.platformCaps,

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -2
@@ -983,8 +994,6 @@ int polaris_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
 
  int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_SQRamping);

phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
@@ -993,13 +1002,12 @@ int fiji_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
  			PHM_PlatformCaps_TDRamping);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_TCPRamping);
+
  	return 0;
  }
 
  int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_SQRamping);

phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -15
@@ -1013,25 +1021,11 @@ int tonga_set_asic_special_caps(struct
 pp_hwmgr *hwmgr)
  		      PHM_PlatformCaps_UVDPowerGating);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  		      PHM_PlatformCaps_VCEPowerGating);
-	return 0;
-}
 
-int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
-{
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_SQRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_DBRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TDRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TCPRamping);
  	return 0;
  }
 
-int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr)
+int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_SQRamping);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -3
@@ -1042,8 +1036,6 @@ int ci_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_TCPRamping);
  	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-
 	PHM_PlatformCaps_MemorySpreadSpectrumSupport);
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-
	PHM_PlatformCaps_EngineSpreadSpectrumSupport);
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+		    PHM_PlatformCaps_EVV);
  	return 0;
  }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -9
index 8dbe9148aad3..45ff94e4ec47 100644
@@ -26,7 +26,6 @@
  #include <linux/module.h>
  #include <linux/slab.h>
  #include <asm/div64.h>
-#include <drm/amdgpu_drm.h>
  #include "pp_acpi.h"
  #include "ppatomctrl.h"
  #include "atombios.h"
@@ -585,20 +584,13 @@ static int smu7_setup_default_pcie_table(struct
 pp_hwmgr *hwmgr)
  		data->dpm_table.pcie_speed_table.count = 6;
  	}
  	/* Populate last level for boot PCIE level, but do not increment count.
 */
-	if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-		for (i = 0; i <= data->dpm_table.pcie_speed_table.count; i++)
-			phm_setup_pcie_table_entry(&data-
 > dpm_table.pcie_speed_table, i,
-				get_pcie_gen_support(data->pcie_gen_cap,
-						PP_Max_PCIEGen),
-				data-
 > vbios_boot_state.pcie_lane_bootup_value);
-	} else {
-		phm_setup_pcie_table_entry(&data-
 > dpm_table.pcie_speed_table,
+	phm_setup_pcie_table_entry(&data-
 > dpm_table.pcie_speed_table,
  			data->dpm_table.pcie_speed_table.count,
  			get_pcie_gen_support(data->pcie_gen_cap,
  					PP_Min_PCIEGen),

get_pcie_lane_support(data->pcie_lane_cap,
PP_Max_PCIELane));

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -1
-	}
+
  	return 0;
  }
@@ -674,7 +666,7 @@ static int smu7_setup_dpm_tables_v0(struct
 pp_hwmgr *hwmgr)
  				allowed_vdd_sclk_table->entries[i].clk) {
  			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].value =

allowed_vdd_sclk_table->entries[i].clk;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].enabled = (i == 0) ? 1 : 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; to do */

data->dpm_table.sclk_table.count++;
}
}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -688,7 +680,7 @@ static int smu7_setup_dpm_tables_v0(struct
 pp_hwmgr *hwmgr)
  			allowed_vdd_mclk_table->entries[i].clk) {
  			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].value =

allowed_vdd_mclk_table->entries[i].clk;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].enabled = (i == 0) ? 1 : 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; */

data->dpm_table.mclk_table.count++;
}
}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -12
@@ -948,24 +940,13 @@ static int smu7_enable_sclk_mclk_dpm(struct
 pp_hwmgr *hwmgr)
 
  		PHM_WRITE_FIELD(hwmgr->device, MC_SEQ_CNTL_3,
 CAC_EN, 0x1);
 
-
-		if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d30, 0x5);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d3c, 0x5);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d80, 0x100005);
-			udelay(10);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d30, 0x400005);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d3c, 0x400005);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d80, 0x500005);
-		} else {
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x5);
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x100005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
-			udelay(10);
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x500005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -1
-		}
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x100005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -0
+		udelay(10);
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x500005);
}

return 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -4
@@ -994,10 +975,6 @@ static int smu7_start_dpm(struct pp_hwmgr
 *hwmgr)
  	PHM_WRITE_INDIRECT_FIELD(hwmgr->device,
 CGS_IND_REG__PCIE,
  			SWRST_COMMAND_1, RESETLC, 0x0);
 
-	if (hwmgr->chip_family == AMDGPU_FAMILY_CI)
-		cgs_write_register(hwmgr->device, 0x1488,
-			(cgs_read_register(hwmgr->device, 0x1488) &
 ~0x1));
-

if (smu7_enable_sclk_mclk_dpm(hwmgr)) {
pr_err("Failed to enable Sclk DPM and Mclk DPM!"); return -EINVAL;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -14
@@ -1389,29 +1366,12 @@ static void smu7_init_dpm_defaults(struct
 pp_hwmgr *hwmgr)
  						&tmp3);
  		tmp3 = (tmp3 >> 5) & 0x3;
  		data->vddc_phase_shed_control = ((tmp3 << 1) | (tmp3 >>
 1)) & 0x3;
-	} else if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-		data->vddc_phase_shed_control = 1;
-	} else {
-		data->vddc_phase_shed_control = 0;
-	}
-
-	if (hwmgr->chip_id  == CHIP_HAWAII) {
-		data->thermal_temp_setting.temperature_low = 94500;
-		data->thermal_temp_setting.temperature_high = 95000;
-		data->thermal_temp_setting.temperature_shutdown =
 104000;
-	} else {
-		data->thermal_temp_setting.temperature_low = 99500;
-		data->thermal_temp_setting.temperature_high = 100000;
-		data->thermal_temp_setting.temperature_shutdown =
 104000;
  	}
 
  	data->fast_watermark_threshold = 100;
  	if (atomctrl_is_voltage_controlled_by_gpio_v3(hwmgr,
  			VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_SVID2))
  		data->voltage_control =

SMU7_VOLTAGE_CONTROL_BY_SVID2;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -3
-	else if (atomctrl_is_voltage_controlled_by_gpio_v3(hwmgr,
-			VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_GPIO_LUT))
-		data->voltage_control =

SMU7_VOLTAGE_CONTROL_BY_GPIO;

  	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_ControlVDDGFX)) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -1
@@ -1431,9 +1391,10 @@ static void smu7_init_dpm_defaults(struct
 pp_hwmgr *hwmgr)
  			data->mvdd_control =
 SMU7_VOLTAGE_CONTROL_BY_SVID2;
  	}
 
-	if (SMU7_VOLTAGE_CONTROL_NONE == data->vdd_gfx_control)
+	if (SMU7_VOLTAGE_CONTROL_NONE == data->vdd_gfx_control) {
  		phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_ControlVDDGFX);
+	}
 
  	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_ControlVDDCI)) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -2290,7 +2251,7 @@ static int
 smu7_set_private_data_based_on_pptable_v0(struct pp_hwmgr *hwmgr)
  		data->max_vddci_in_pptable =

(uint16_t)allowed_mclk_vddci_table->entries[allowed_mclk_vddci_table-

Quoted 1 line

count - 1].v;

}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-	if (hwmgr->dyn_state.vddci_dependency_on_mclk != NULL &&

hwmgr->dyn_state.vddci_dependency_on_mclk->count >= 1)

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+	if (hwmgr->dyn_state.vddci_dependency_on_mclk != NULL &&

hwmgr->dyn_state.vddci_dependency_on_mclk->count > 1)
hwmgr->dyn_state.max_clock_voltage_on_ac.vddci =
hwmgr->dyn_state.vddci_dependency_on_mclk->entries[hwmgr-

Quoted 1 line

dyn_state.vddci_dependency_on_mclk->count - 1].v;

return 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -14
@@ -2306,38 +2267,10 @@ static int smu7_hwmgr_backend_fini(struct
 pp_hwmgr *hwmgr)
  	return 0;
  }
 
-static int smu7_get_elb_voltages(struct pp_hwmgr *hwmgr)
-{
-	uint16_t virtual_voltage_id, vddc, vddci, efuse_voltage_id;
-	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr-
 > backend);
-	int i;
-
-	if (atomctrl_get_leakage_id_from_efuse(hwmgr,
 &efuse_voltage_id) == 0) {
-		for (i = 0; i < SMU7_MAX_LEAKAGE_COUNT; i++) {
-			virtual_voltage_id = ATOM_VIRTUAL_VOLTAGE_ID0
+ i;
-			if
 (atomctrl_get_leakage_vddc_base_on_leakage(hwmgr, &vddc, &vddci,
-
 	virtual_voltage_id,
-
 	efuse_voltage_id) == 0) {
-				if (vddc != 0 && vddc != virtual_voltage_id) {
-					data-
Quoted 1 line

vddc_leakage.actual_voltage[data->vddc_leakage.count] = vddc;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-					data-
Quoted 1 line

vddc_leakage.leakage_id[data->vddc_leakage.count] = virtual_voltage_id;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -4
-					data->vddc_leakage.count++;
-				}
-				if (vddci != 0 && vddci != virtual_voltage_id) {
-					data-
Quoted 1 line

vddci_leakage.actual_voltage[data->vddci_leakage.count] = vddci;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-					data-
Quoted 1 line

vddci_leakage.leakage_id[data->vddci_leakage.count] = virtual_voltage_id;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +6 -18
-					data->vddci_leakage.count++;
-				}
-			}
-		}
-	}
-	return 0;
-}
-
  static int smu7_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
  {
  	struct smu7_hwmgr *data;
-	int result = 0;
+	int result;
 
  	data = kzalloc(sizeof(struct smu7_hwmgr), GFP_KERNEL);
  	if (data == NULL)
@@ -2348,15 +2281,11 @@ static int smu7_hwmgr_backend_init(struct
 pp_hwmgr *hwmgr)
  	smu7_init_dpm_defaults(hwmgr);
 
  	/* Get leakage voltage based on leakage ID. */
-	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_EVV)) {
-		result = smu7_get_evv_voltages(hwmgr);
-		if (result) {
-			pr_info("Get EVV Voltage Failed.  Abort Driver
 loading!\n");
-			return -EINVAL;
-		}
-	} else {
-		smu7_get_elb_voltages(hwmgr);
+	result = smu7_get_evv_voltages(hwmgr);
+
+	if (result) {
+		pr_info("Get EVV Voltage Failed.  Abort Driver loading!\n");
+		return -EINVAL;
  	}
  	if (hwmgr->pp_table_version == PP_TABLE_V1) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -3825,14 +3754,11 @@ static int

smu7_notify_link_speed_change_after_state_change(
static int smu7_notify_smc_display(struct pp_hwmgr *hwmgr) {
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr-

Quoted 1 line

backend);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
-	int ret = 0;
 
-	if (hwmgr->feature_mask & PP_VBI_TIME_SUPPORT_MASK) {
+	if (hwmgr->feature_mask & PP_VBI_TIME_SUPPORT_MASK)
  		smum_send_msg_to_smc_with_parameter(hwmgr,
  			(PPSMC_Msg)PPSMC_MSG_SetVBITimeout, data-
Quoted 1 line

frame_time_x2);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-		ret = (smum_send_msg_to_smc(hwmgr,

(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 : -EINVAL;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
-	}
-	return ret;
+	return (smum_send_msg_to_smc(hwmgr,
Quoted 2 lines

(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 : -EINVAL;
}

Does just reverting this last chunk fix the issue? I think that is the issue. Either way, the patch is:

Quoted 1 line

Darn you... that's the only (non-CI) hunk I didn't revert ...

Reverting that fixes issues on Tonga. I don't know if that opens issues on CI though.

Let's drop this patch (I just emailed the new one).

Tom
_______________________________________________
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): 2127cb92-2a30-be2a-4ca2-1fa6362a4fb9-5C7GfCeVMHo@public.gmane.org

#6 lore raw
Quoted 504 lines

-----Original Message-----
From: StDenis, Tom
Sent: Wednesday, October 04, 2017 1:50 PM
To: Deucher, Alexander; [email protected]
Subject: Re: [PATCH] Revert "drm/amd/powerplay: Add support for CI asics to hwmgr"

Quoted 2 lines · Alexander
Quoted 2 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On

Behalf

Quoted 5 lines
Quoted 5 lines

Of Tom St Denis
Sent: Wednesday, October 04, 2017 1:13 PM
To: [email protected]
Cc: StDenis, Tom
Subject: [PATCH] Revert "drm/amd/powerplay: Add support for CI asics

to

Quoted 7 lines
Quoted 7 lines

hwmgr"

The commit being reverted breaks Tonga support by causing visible noise on the screen. The original patch should have been split up to begin with as adding CI functionality shouldn't result in functional changes to non-CI platforms at the same time.

Quoted 6 lines
Quoted 6 lines

This reverts commit 0b6b4cbf77c995a34a4ec3d705a636434dadc51a.

---
  drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c      |  58 +++++------
  drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 118 +++++--

-----

Quoted 20 lines
Quoted 20 lines

-----------

  2 files changed, 47 insertions(+), 129 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -1
index 35e80c969737..089d55d4ad2c 100644
@@ -53,7 +53,6 @@ static int hwmgr_set_user_specify_caps(struct
 pp_hwmgr *hwmgr);
  static int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr);
  static int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr);
  static int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr);
-static int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr);
 
  uint8_t convert_to_vid(uint16_t vddc)
  {
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -0
@@ -155,14 +154,6 @@ int hwmgr_early_init(struct pp_instance *handle)
  	hwmgr->reload_fw = 1;
 
Quoted 14 lines

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c void

Quoted 14 lines
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -4
  	switch (hwmgr->chip_family) {
-	case AMDGPU_FAMILY_CI:
-		hwmgr->smumgr_funcs = &ci_smu_funcs;
-		ci_set_asic_special_caps(hwmgr);
-		hwmgr->feature_mask &= ~(PP_VBI_TIME_SUPPORT_MASK

|

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -4
-					PP_ENABLE_GFX_CG_THRU_SMU);
-		hwmgr->pp_table_version = PP_TABLE_V0;
-		smu7_init_function_pointers(hwmgr);
-		break;
  	case AMDGPU_FAMILY_CZ:
  		hwmgr->smumgr_funcs = &cz_smu_funcs;
  		cz_init_function_pointers(hwmgr);
@@ -882,8 +873,28 @@ void

phm_apply_dal_min_voltage_request(struct

Quoted 51 lines
Quoted 51 lines
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +5 -0
 pp_hwmgr *hwmgr)
 
  void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)
  {
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableVoltageTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableEngineTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableMemoryTransition);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
 PHM_PlatformCaps_DisableMGClockGating);
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableMGCGTSSM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableLSClockGating);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_Force3DClockSupport);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableLightSleep);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableMCLS);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_set(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisablePowerGating);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableDPM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_DisableSMUUVDHandshake);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_ThermalAutoThrottling);
+
phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_PCIEPerformanceRequest);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_NoOD5Support);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_UserMaxClockForMultiDisplays);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +2 -0
+
+	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_VpuRecoveryInProgress);
+
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_UVDDPM);
phm_cap_set(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_VCEDPM);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -0
@@ -908,6 +919,7 @@ void hwmgr_init_default_caps(struct pp_hwmgr
 *hwmgr)
 
Quoted 8 lines

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c int phm_get_voltage_evv_on_sclk(struct

Quoted 8 lines
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
  	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
 	PHM_PlatformCaps_FanSpeedInTableIsRPM);
+
  	return;
  }
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -0
@@ -956,8 +968,7 @@ int phm_get_voltage_evv_on_sclk(struct

pp_hwmgr

Quoted 260 lines
Quoted 260 lines
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
 *hwmgr, uint8_t voltage_type,
 
  int polaris_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
+
  	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
	PHM_PlatformCaps_SQRamping);

phm_cap_set(hwmgr->platform_descriptor.platformCaps,

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -2
@@ -983,8 +994,6 @@ int polaris_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
 
  int fiji_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_SQRamping);

phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -2
@@ -993,13 +1002,12 @@ int fiji_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
  			PHM_PlatformCaps_TDRamping);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_TCPRamping);
+
  	return 0;
  }
 
  int tonga_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_SQRamping);

phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -15
@@ -1013,25 +1021,11 @@ int tonga_set_asic_special_caps(struct
 pp_hwmgr *hwmgr)
  		      PHM_PlatformCaps_UVDPowerGating);
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  		      PHM_PlatformCaps_VCEPowerGating);
-	return 0;
-}
 
-int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
-{
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-						PHM_PlatformCaps_EVV);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_SQRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_DBRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TDRamping);
-	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_TCPRamping);
  	return 0;
  }
 
-int ci_set_asic_special_caps(struct pp_hwmgr *hwmgr)
+int topaz_set_asic_special_caps(struct pp_hwmgr *hwmgr)
  {
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,

PHM_PlatformCaps_SQRamping);

drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +0 -3
@@ -1042,8 +1036,6 @@ int ci_set_asic_special_caps(struct pp_hwmgr
 *hwmgr)
  	phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_TCPRamping);
  	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-
 	PHM_PlatformCaps_MemorySpreadSpectrumSupport);
-	phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-
	PHM_PlatformCaps_EngineSpreadSpectrumSupport);
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c +1 -0
+		    PHM_PlatformCaps_EVV);
  	return 0;
  }
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -9
index 8dbe9148aad3..45ff94e4ec47 100644
@@ -26,7 +26,6 @@
  #include <linux/module.h>
  #include <linux/slab.h>
  #include <asm/div64.h>
-#include <drm/amdgpu_drm.h>
  #include "pp_acpi.h"
  #include "ppatomctrl.h"
  #include "atombios.h"
@@ -585,20 +584,13 @@ static int smu7_setup_default_pcie_table(struct
 pp_hwmgr *hwmgr)
  		data->dpm_table.pcie_speed_table.count = 6;
  	}
  	/* Populate last level for boot PCIE level, but do not increment count.
 */
-	if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-		for (i = 0; i <= data->dpm_table.pcie_speed_table.count; i++)
-			phm_setup_pcie_table_entry(&data-
 > dpm_table.pcie_speed_table, i,
-				get_pcie_gen_support(data->pcie_gen_cap,
-						PP_Max_PCIEGen),
-				data-
 > vbios_boot_state.pcie_lane_bootup_value);
-	} else {
-		phm_setup_pcie_table_entry(&data-
 > dpm_table.pcie_speed_table,
+	phm_setup_pcie_table_entry(&data-
 > dpm_table.pcie_speed_table,
  			data->dpm_table.pcie_speed_table.count,
  			get_pcie_gen_support(data->pcie_gen_cap,
  					PP_Min_PCIEGen),

get_pcie_lane_support(data->pcie_lane_cap,
PP_Max_PCIELane));

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -1
-	}
+
  	return 0;
  }
@@ -674,7 +666,7 @@ static int smu7_setup_dpm_tables_v0(struct
 pp_hwmgr *hwmgr)
  				allowed_vdd_sclk_table->entries[i].clk) {
  			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].value =

allowed_vdd_sclk_table->entries[i].clk;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].enabled = (i == 0) ? 1 : 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+			data->dpm_table.sclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.sclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; to do */

data->dpm_table.sclk_table.count++;
}
}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -688,7 +680,7 @@ static int smu7_setup_dpm_tables_v0(struct
 pp_hwmgr *hwmgr)
  			allowed_vdd_mclk_table->entries[i].clk) {
  			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].value =

allowed_vdd_mclk_table->entries[i].clk;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].enabled = (i == 0) ? 1 : 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+			data->dpm_table.mclk_table.dpm_levels[data-
Quoted 1 line

dpm_table.mclk_table.count].enabled = 1; /*(i==0) ? 1 : 0; */

data->dpm_table.mclk_table.count++;
}
}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -12
@@ -948,24 +940,13 @@ static int smu7_enable_sclk_mclk_dpm(struct
 pp_hwmgr *hwmgr)
 
  		PHM_WRITE_FIELD(hwmgr->device, MC_SEQ_CNTL_3,
 CAC_EN, 0x1);
 
-
-		if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d30, 0x5);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d3c, 0x5);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d80, 0x100005);
-			udelay(10);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d30, 0x400005);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d3c, 0x400005);
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, 0xc0400d80, 0x500005);
-		} else {
-			cgs_write_ind_register(hwmgr->device,
 CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x5);
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x100005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -2
-			udelay(10);
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-			cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x500005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -1
-		}
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x5);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x100005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -0
+		udelay(10);
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC0_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_MC1_CNTL, 0x400005);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+		cgs_write_ind_register(hwmgr->device,

CGS_IND_REG__SMC, ixLCAC_CPL_CNTL, 0x500005);
}

return 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -4
@@ -994,10 +975,6 @@ static int smu7_start_dpm(struct pp_hwmgr
 *hwmgr)
  	PHM_WRITE_INDIRECT_FIELD(hwmgr->device,
 CGS_IND_REG__PCIE,
  			SWRST_COMMAND_1, RESETLC, 0x0);
 
-	if (hwmgr->chip_family == AMDGPU_FAMILY_CI)
-		cgs_write_register(hwmgr->device, 0x1488,
-			(cgs_read_register(hwmgr->device, 0x1488) &
 ~0x1));
-

if (smu7_enable_sclk_mclk_dpm(hwmgr)) {
pr_err("Failed to enable Sclk DPM and Mclk DPM!"); return -EINVAL;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -14
@@ -1389,29 +1366,12 @@ static void smu7_init_dpm_defaults(struct
 pp_hwmgr *hwmgr)
  						&tmp3);
  		tmp3 = (tmp3 >> 5) & 0x3;
  		data->vddc_phase_shed_control = ((tmp3 << 1) | (tmp3 >>
 1)) & 0x3;
-	} else if (hwmgr->chip_family == AMDGPU_FAMILY_CI) {
-		data->vddc_phase_shed_control = 1;
-	} else {
-		data->vddc_phase_shed_control = 0;
-	}
-
-	if (hwmgr->chip_id  == CHIP_HAWAII) {
-		data->thermal_temp_setting.temperature_low = 94500;
-		data->thermal_temp_setting.temperature_high = 95000;
-		data->thermal_temp_setting.temperature_shutdown =
 104000;
-	} else {
-		data->thermal_temp_setting.temperature_low = 99500;
-		data->thermal_temp_setting.temperature_high = 100000;
-		data->thermal_temp_setting.temperature_shutdown =
 104000;
  	}
 
  	data->fast_watermark_threshold = 100;
  	if (atomctrl_is_voltage_controlled_by_gpio_v3(hwmgr,
  			VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_SVID2))
  		data->voltage_control =

SMU7_VOLTAGE_CONTROL_BY_SVID2;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -3
-	else if (atomctrl_is_voltage_controlled_by_gpio_v3(hwmgr,
-			VOLTAGE_TYPE_VDDC, VOLTAGE_OBJ_GPIO_LUT))
-		data->voltage_control =

SMU7_VOLTAGE_CONTROL_BY_GPIO;

  	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_ControlVDDGFX)) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +2 -1
@@ -1431,9 +1391,10 @@ static void smu7_init_dpm_defaults(struct
 pp_hwmgr *hwmgr)
  			data->mvdd_control =
 SMU7_VOLTAGE_CONTROL_BY_SVID2;
  	}
 
-	if (SMU7_VOLTAGE_CONTROL_NONE == data->vdd_gfx_control)
+	if (SMU7_VOLTAGE_CONTROL_NONE == data->vdd_gfx_control) {
  		phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_ControlVDDGFX);
+	}
 
Quoted 4 lines
Quoted 4 lines
  	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
  			PHM_PlatformCaps_ControlVDDCI)) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -2290,7 +2251,7 @@ static int

smu7_set_private_data_based_on_pptable_v0(struct pp_hwmgr

*hwmgr)

Quoted 43 lines
Quoted 2 lines

data->max_vddci_in_pptable =
(uint16_t)allowed_mclk_vddci_table-

entries[allowed_mclk_vddci_table-

Quoted 40 lines
Quoted 1 line

count - 1].v;

}

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-	if (hwmgr->dyn_state.vddci_dependency_on_mclk != NULL &&

hwmgr->dyn_state.vddci_dependency_on_mclk->count >= 1)

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
+	if (hwmgr->dyn_state.vddci_dependency_on_mclk != NULL &&

hwmgr->dyn_state.vddci_dependency_on_mclk->count > 1)
hwmgr->dyn_state.max_clock_voltage_on_ac.vddci =
hwmgr->dyn_state.vddci_dependency_on_mclk->entries[hwmgr-

Quoted 1 line

dyn_state.vddci_dependency_on_mclk->count - 1].v;

return 0;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -14
@@ -2306,38 +2267,10 @@ static int smu7_hwmgr_backend_fini(struct
 pp_hwmgr *hwmgr)
  	return 0;
  }
 
-static int smu7_get_elb_voltages(struct pp_hwmgr *hwmgr)
-{
-	uint16_t virtual_voltage_id, vddc, vddci, efuse_voltage_id;
-	struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr-
 > backend);
-	int i;
-
-	if (atomctrl_get_leakage_id_from_efuse(hwmgr,
 &efuse_voltage_id) == 0) {
-		for (i = 0; i < SMU7_MAX_LEAKAGE_COUNT; i++) {
-			virtual_voltage_id = ATOM_VIRTUAL_VOLTAGE_ID0
+ i;
-			if
 (atomctrl_get_leakage_vddc_base_on_leakage(hwmgr, &vddc, &vddci,
-
 	virtual_voltage_id,
-
 	efuse_voltage_id) == 0) {
-				if (vddc != 0 && vddc != virtual_voltage_id) {
-					data-
Quoted 1 line

vddc_leakage.actual_voltage[data->vddc_leakage.count] = vddc;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-					data-
Quoted 1 line

vddc_leakage.leakage_id[data->vddc_leakage.count] =

virtual_voltage_id;

Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -4
-					data->vddc_leakage.count++;
-				}
-				if (vddci != 0 && vddci != virtual_voltage_id) {
-					data-
Quoted 1 line

vddci_leakage.actual_voltage[data->vddci_leakage.count] = vddci;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-					data-
Quoted 1 line

vddci_leakage.leakage_id[data->vddci_leakage.count] =

virtual_voltage_id;

Quoted 52 lines
Quoted 52 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +6 -18
-					data->vddci_leakage.count++;
-				}
-			}
-		}
-	}
-	return 0;
-}
-
  static int smu7_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
  {
  	struct smu7_hwmgr *data;
-	int result = 0;
+	int result;
 
  	data = kzalloc(sizeof(struct smu7_hwmgr), GFP_KERNEL);
  	if (data == NULL)
@@ -2348,15 +2281,11 @@ static int smu7_hwmgr_backend_init(struct
 pp_hwmgr *hwmgr)
  	smu7_init_dpm_defaults(hwmgr);
 
  	/* Get leakage voltage based on leakage ID. */
-	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
-			PHM_PlatformCaps_EVV)) {
-		result = smu7_get_evv_voltages(hwmgr);
-		if (result) {
-			pr_info("Get EVV Voltage Failed.  Abort Driver
 loading!\n");
-			return -EINVAL;
-		}
-	} else {
-		smu7_get_elb_voltages(hwmgr);
+	result = smu7_get_evv_voltages(hwmgr);
+
+	if (result) {
+		pr_info("Get EVV Voltage Failed.  Abort Driver loading!\n");
+		return -EINVAL;
  	}
  	if (hwmgr->pp_table_version == PP_TABLE_V1) {
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -0
@@ -3825,14 +3754,11 @@ static int

smu7_notify_link_speed_change_after_state_change(
static int smu7_notify_smc_display(struct pp_hwmgr *hwmgr) {
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr-

Quoted 1 line

backend);

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
-	int ret = 0;
 
-	if (hwmgr->feature_mask & PP_VBI_TIME_SUPPORT_MASK) {
+	if (hwmgr->feature_mask & PP_VBI_TIME_SUPPORT_MASK)
  		smum_send_msg_to_smc_with_parameter(hwmgr,
  			(PPSMC_Msg)PPSMC_MSG_SetVBITimeout, data-
Quoted 1 line

frame_time_x2);

Quoted 9 lines
Quoted 7 lines
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +0 -1
-		ret = (smum_send_msg_to_smc(hwmgr,

(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 : -EINVAL;

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -2
-	}
-	return ret;
+	return (smum_send_msg_to_smc(hwmgr,

(PPSMC_Msg)PPSMC_HasDisplay) == 0) ? 0 : -EINVAL;
}

Does just reverting this last chunk fix the issue? I think that is the issue.

Quoted 8 lines

Either way, the patch is:

Quoted 1 line

Darn you... that's the only (non-CI) hunk I didn't revert ...

Reverting that fixes issues on Tonga. I don't know if that opens issues on CI though.

CI requires this as well so we should be ok.

Alex

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx