Skip to contentSkip to conversation

drm/amd/powerplay: add disable_smc_ctf callback in hwmgr.

PATCH In review Rex Zhu 2 participants 4 messages Apr 28, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Rex Zhu

author
#0 lore raw

PATCH 1/3 drm/amd/powerplay: add disable_smc_ctf callback in hwmgr.

export disablesmcctf to eventmgr.
need to disable temperature alert when s3/s4.
otherwise, when resume back,enable temperature
alert will fail.

Change-Id I6bbc85b0fc389e442a44ad4d0db3db3342ff5955
---
 drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 10 ++++++++++
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c      |  1 +
 drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h   |  2 +-
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h             |  1 +
 4 files changed, 13 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c +10 -0
index 23bba2c..fcc722e 100644
@@ -501,3 +501,13 @@ int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_i
 
 	return hwmgr->hwmgr_func->get_max_high_clocks(hwmgr, clocks);
 }
+
+int phm_disable_smc_firmware_ctf(struct pp_hwmgr *hwmgr)
+{
+	PHM_FUNC_CHECK(hwmgr);
+
+	if (hwmgr->hwmgr_func->disable_smc_firmware_ctf == NULL)
+		return -EINVAL;
+
+	return hwmgr->hwmgr_func->disable_smc_firmware_ctf(hwmgr);
+}
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +1 -0
index 8f663ab..4ad8453 100644
@@ -4695,6 +4695,7 @@ static int smu7_avfs_control(struct pp_hwmgr *hwmgr, bool enable)
 	.release_firmware = smu7_release_firmware,
 	.set_power_profile_state = smu7_set_power_profile_state,
 	.avfs_control = smu7_avfs_control,
+	.disable_smc_firmware_ctf = smu7_thermal_disable_alert,
 };
 
 uint8_t smu7_get_sleep_divider_id_from_clock(uint32_t clock,
drivers/gpu/drm/amd/powerplay/inc/hardwaremanager.h +1 -1
index ee58e4c..9ea3d73 100644
@@ -431,6 +431,6 @@ extern int phm_display_clock_voltage_request(struct pp_hwmgr *hwmgr,
 		struct pp_display_clock_request *clock);
 
 extern int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks);
-
+extern int phm_disable_smc_firmware_ctf(struct pp_hwmgr *hwmgr);
 #endif /* _HARDWARE_MANAGER_H_ */
 
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
index 320225d..98d38c3 100644
@@ -373,6 +373,7 @@ struct pp_hwmgr_func {
 	int (*set_power_profile_state)(struct pp_hwmgr *hwmgr,
 			struct amd_pp_profile *request);
 	int (*avfs_control)(struct pp_hwmgr *hwmgr, bool enable);
+	int (*disable_smc_firmware_ctf)(struct pp_hwmgr *hwmgr);
 };
 
 struct pp_table_func {
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#2 lore raw

PATCH 2/3 drm/amd/powerplay: complete disable_smc_firmware_ctf_tasks.

In reply to a message not in the archive
Change-Id I7d7f7607777c5996ddb00a17b34d4b0a3070a965
---
 drivers/gpu/drm/amd/powerplay/eventmgr/eventsubchains.c | 2 +-
 drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c     | 5 +++++
 drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h     | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/eventmgr/eventsubchains.c +1 -1
index 9ef2d90..b82c43a 100644
@@ -219,7 +219,7 @@
 };
 
 const pem_event_action disable_smc_firmware_ctf_tasks[] = {
-	/* PEM_Task_DisableSMCFirmwareCTF,*/
+	pem_task_disable_smc_firmware_ctf,
 	NULL
 };
 
drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.c +5 -0
index e04216e..8c4ebaa 100644
@@ -173,6 +173,11 @@ int pem_task_stop_asic_block_usage(struct pp_eventmgr *eventmgr, struct pem_even
 	return 0;
 }
 
+int pem_task_disable_smc_firmware_ctf(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
+{
+	return phm_disable_smc_firmware_ctf(eventmgr->hwmgr);
+}
+
 int pem_task_setup_asic(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data)
 {
 	return phm_setup_asic(eventmgr->hwmgr);
drivers/gpu/drm/amd/powerplay/eventmgr/eventtasks.h +1 -0
index 6c6297e..37e7ca5 100644
@@ -84,5 +84,6 @@
 /*thermal */
 int pem_task_initialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
 int pem_task_uninitialize_thermal_controller(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
+int pem_task_disable_smc_firmware_ctf(struct pp_eventmgr *eventmgr, struct pem_event_data *event_data);
 
 #endif /* _EVENT_TASKS_H_ */
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
author
#3 lore raw

PATCH 3/3 drm/amd/powerplay: implement stop dpm task for vega10.

In reply to a message not in the archive
Change-Id I19202f1e54ce6a1b8b54aacbc0d42dbba7605662
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 97 ++++++++++++++++++++++
 .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 23 +++++
 .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h |  1 +
 .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c   |  2 +-
 .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h   |  1 +
 5 files changed, 123 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +97 -0
index 5e3e89b..68eae52 100644
@@ -2420,6 +2420,26 @@ static int vega10_enable_thermal_protection(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
+static int vega10_disable_thermal_protection(struct pp_hwmgr *hwmgr)
+{
+	struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend);
+
+	if (data->smu_features[GNLD_THERMAL].supported) {
+		if (!data->smu_features[GNLD_THERMAL].enabled)
+			pr_info("THERMAL Feature Already disabled!");
+
+		PP_ASSERT_WITH_CODE(
+				!vega10_enable_smc_features(hwmgr->smumgr,
+				false,
+				data->smu_features[GNLD_THERMAL].smu_feature_bitmap),
+				"disable THERMAL Feature Failed!",
+				return -1);
+		data->smu_features[GNLD_THERMAL].enabled = false;
+	}
+
+	return 0;
+}
+
 static int vega10_enable_vrhot_feature(struct pp_hwmgr *hwmgr)
 {
 	struct vega10_hwmgr *data =
@@ -2498,6 +2518,37 @@ static int vega10_enable_deep_sleep_master_switch(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
+static int vega10_stop_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap)
+{
+	struct vega10_hwmgr *data =
+			(struct vega10_hwmgr *)(hwmgr->backend);
+	uint32_t i, feature_mask = 0;
+
+
+	if(data->smu_features[GNLD_LED_DISPLAY].supported == true){
+		PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr->smumgr,
+				true, data->smu_features[GNLD_LED_DISPLAY].smu_feature_bitmap),
+		"Attempt to Enable LED DPM feature Failed!", return -EINVAL);
+		data->smu_features[GNLD_LED_DISPLAY].enabled = true;
+	}
+
+	for (i = 0; i < GNLD_DPM_MAX; i++) {
+		if (data->smu_features[i].smu_feature_bitmap & bitmap) {
+			if (data->smu_features[i].supported) {
+				if (data->smu_features[i].enabled) {
+					feature_mask |= data->smu_features[i].
+							smu_feature_bitmap;
+					data->smu_features[i].enabled = false;
+				}
+			}
+		}
+	}
+
+	vega10_enable_smc_features(hwmgr->smumgr, false, feature_mask);
+
+	return 0;
+}
+
 /**
  * @brief Tell SMC to enabled the supported DPMs.
  *
@@ -4356,11 +4407,55 @@ static int vega10_check_states_equal(struct pp_hwmgr *hwmgr,
 	return is_update_required;
 }
 
+static int vega10_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
+{
+	int tmp_result, result = 0;
+
+	tmp_result = (vega10_is_dpm_running(hwmgr)) ? 0 : -1;
+	PP_ASSERT_WITH_CODE(tmp_result == 0,
+			"DPM is not running right now, no need to disable DPM!",
+			return 0);
+
+	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+			PHM_PlatformCaps_ThermalController))
+		vega10_disable_thermal_protection(hwmgr);
+
+	tmp_result = vega10_disable_power_containment(hwmgr);
+	PP_ASSERT_WITH_CODE((tmp_result == 0),
+			"Failed to disable power containment!", result = tmp_result);
+
+	tmp_result = vega10_avfs_enable(hwmgr, false);
+	PP_ASSERT_WITH_CODE((tmp_result == 0),
+			"Failed to disable AVFS!", result = tmp_result);
+
+	tmp_result = vega10_stop_dpm(hwmgr, SMC_DPM_FEATURES);
+	PP_ASSERT_WITH_CODE((tmp_result == 0),
+			"Failed to stop DPM!", result = tmp_result);
+
+	return result;
+}
+
+static int vega10_power_off_asic(struct pp_hwmgr *hwmgr)
+{
+	struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend);
+	int result;
+
+	result = vega10_disable_dpm_tasks(hwmgr);
+	PP_ASSERT_WITH_CODE((0 == result),
+			"[disable_dpm_tasks] Failed to disable DPM!",
+			);
+	data->water_marks_bitmap &= ~(WaterMarksLoaded);
+
+	return result;
+}
+
+
 static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
 	.backend_init = vega10_hwmgr_backend_init,
 	.backend_fini = vega10_hwmgr_backend_fini,
 	.asic_setup = vega10_setup_asic_task,
 	.dynamic_state_management_enable = vega10_enable_dpm_tasks,
+	.dynamic_state_management_disable = vega10_disable_dpm_tasks,
 	.get_num_of_pp_table_entries =
 			vega10_get_number_of_powerplay_table_entries,
 	.get_power_state_size = vega10_get_power_state_size,
@@ -4400,6 +4495,8 @@ static int vega10_check_states_equal(struct pp_hwmgr *hwmgr,
 	.check_states_equal = vega10_check_states_equal,
 	.check_smc_update_required_for_display_configuration =
 			vega10_check_smc_update_required_for_display_configuration,
+	.power_off_asic = vega10_power_off_asic,
+	.disable_smc_firmware_ctf = vega10_thermal_disable_alert,
 };
 
 int vega10_hwmgr_init(struct pp_hwmgr *hwmgr)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +23 -0
index f1e244c..692f752 100644
@@ -113,6 +113,29 @@ int vega10_enable_power_containment(struct pp_hwmgr *hwmgr)
 	return result;
 }
 
+int vega10_disable_power_containment(struct pp_hwmgr *hwmgr)
+{
+	struct vega10_hwmgr *data =
+			(struct vega10_hwmgr *)(hwmgr->backend);
+
+	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+			PHM_PlatformCaps_PowerContainment)) {
+		if (data->smu_features[GNLD_PPT].supported)
+			PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr->smumgr,
+					false, data->smu_features[GNLD_PPT].smu_feature_bitmap),
+					"Attempt to disable PPT feature Failed!",
+					data->smu_features[GNLD_PPT].supported = false);
+
+		if (data->smu_features[GNLD_TDC].supported)
+			PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr->smumgr,
+					false, data->smu_features[GNLD_TDC].smu_feature_bitmap),
+					"Attempt to disable PPT feature Failed!",
+					data->smu_features[GNLD_TDC].supported = false);
+	}
+
+	return 0;
+}
+
 static int vega10_set_overdrive_target_percentage(struct pp_hwmgr *hwmgr,
 		uint32_t adjust_percent)
 {
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h +1 -0
index d9662bf..9ecaa27 100644
@@ -60,6 +60,7 @@ struct vega10_pt_defaults {
 int vega10_enable_power_containment(struct pp_hwmgr *hwmgr);
 int vega10_set_power_limit(struct pp_hwmgr *hwmgr, uint32_t n);
 int vega10_power_control_set_level(struct pp_hwmgr *hwmgr);
+int vega10_disable_power_containment(struct pp_hwmgr *hwmgr);
 
 #endif  /* _VEGA10_POWERTUNE_H_ */
 
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c +1 -1
index f4d77b6..7062ec8 100644
@@ -501,7 +501,7 @@ static int vega10_thermal_enable_alert(struct pp_hwmgr *hwmgr)
 * Disable thermal alerts on the RV770 thermal controller.
 * @param    hwmgr The address of the hardware manager.
 */
-static int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
+int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend);
 
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h +1 -0
index 8036808..70c1d22 100644
@@ -78,6 +78,7 @@ extern int vega10_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr,
 		uint32_t *speed);
 extern int vega10_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr);
 extern uint32_t smu7_get_xclk(struct pp_hwmgr *hwmgr);
+extern int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr);
 
 #endif
 
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by Alex Deucher
#5 lore raw

RE: [PATCH 3/3] drm/amd/powerplay: implement stop dpm task for vega10.

In reply to a message not in the archive
Quoted 11 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Rex Zhu
Sent: Friday, April 28, 2017 1:20 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 3/3] drm/amd/powerplay: implement stop dpm task for vega10.

Change-Id I19202f1e54ce6a1b8b54aacbc0d42dbba7605662

Series is:

Quoted 254 lines
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 97
++++++++++++++++++++++
 .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 23 +++++
 .../gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h |  1 +
 .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c   |  2 +-
 .../gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h   |  1 +
 5 files changed, 123 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +12 -0
index 5e3e89b..68eae52 100644
@@ -2420,6 +2420,26 @@ static int
 vega10_enable_thermal_protection(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
+static int vega10_disable_thermal_protection(struct pp_hwmgr *hwmgr)
+{
+	struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr-
 >backend);
+
+	if (data->smu_features[GNLD_THERMAL].supported) {
+		if (!data->smu_features[GNLD_THERMAL].enabled)
+			pr_info("THERMAL Feature Already disabled!");
+
+		PP_ASSERT_WITH_CODE(
+				!vega10_enable_smc_features(hwmgr-
 >smumgr,
+				false,
+				data-
Quoted 1 line

smu_features[GNLD_THERMAL].smu_feature_bitmap),

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +18 -0
+				"disable THERMAL Feature Failed!",
+				return -1);
+		data->smu_features[GNLD_THERMAL].enabled = false;
+	}
+
+	return 0;
+}
+
 static int vega10_enable_vrhot_feature(struct pp_hwmgr *hwmgr)
 {
 	struct vega10_hwmgr *data =
@@ -2498,6 +2518,37 @@ static int
 vega10_enable_deep_sleep_master_switch(struct pp_hwmgr *hwmgr)
 	return 0;
 }
 
+static int vega10_stop_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap)
+{
+	struct vega10_hwmgr *data =
+			(struct vega10_hwmgr *)(hwmgr->backend);
+	uint32_t i, feature_mask = 0;
+
+
+	if(data->smu_features[GNLD_LED_DISPLAY].supported == true){
+
 	PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr-
 >smumgr,
+				true, data-
Quoted 1 line

smu_features[GNLD_LED_DISPLAY].smu_feature_bitmap),

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +1 -0
+		"Attempt to Enable LED DPM feature Failed!", return -

EINVAL);

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +8 -0
+		data->smu_features[GNLD_LED_DISPLAY].enabled = true;
+	}
+
+	for (i = 0; i < GNLD_DPM_MAX; i++) {
+		if (data->smu_features[i].smu_feature_bitmap & bitmap) {
+			if (data->smu_features[i].supported) {
+				if (data->smu_features[i].enabled) {
+					feature_mask |= data-
Quoted 1 line

smu_features[i].

+

	smu_feature_bitmap;
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +1 -0
+					data->smu_features[i].enabled =

false;

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +6 -0
+				}
+			}
+		}
+	}
+
+	vega10_enable_smc_features(hwmgr->smumgr, false,

feature_mask);

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +50 -0
+
+	return 0;
+}
+
 /**
  * @brief Tell SMC to enabled the supported DPMs.
  *
@@ -4356,11 +4407,55 @@ static int vega10_check_states_equal(struct
 pp_hwmgr *hwmgr,
 	return is_update_required;
 }
 
+static int vega10_disable_dpm_tasks(struct pp_hwmgr *hwmgr)
+{
+	int tmp_result, result = 0;
+
+	tmp_result = (vega10_is_dpm_running(hwmgr)) ? 0 : -1;
+	PP_ASSERT_WITH_CODE(tmp_result == 0,
+			"DPM is not running right now, no need to disable
 DPM!",
+			return 0);
+
+	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+			PHM_PlatformCaps_ThermalController))
+		vega10_disable_thermal_protection(hwmgr);
+
+	tmp_result = vega10_disable_power_containment(hwmgr);
+	PP_ASSERT_WITH_CODE((tmp_result == 0),
+			"Failed to disable power containment!", result =
 tmp_result);
+
+	tmp_result = vega10_avfs_enable(hwmgr, false);
+	PP_ASSERT_WITH_CODE((tmp_result == 0),
+			"Failed to disable AVFS!", result = tmp_result);
+
+	tmp_result = vega10_stop_dpm(hwmgr, SMC_DPM_FEATURES);
+	PP_ASSERT_WITH_CODE((tmp_result == 0),
+			"Failed to stop DPM!", result = tmp_result);
+
+	return result;
+}
+
+static int vega10_power_off_asic(struct pp_hwmgr *hwmgr)
+{
+	struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr-
 >backend);
+	int result;
+
+	result = vega10_disable_dpm_tasks(hwmgr);
+	PP_ASSERT_WITH_CODE((0 == result),
+			"[disable_dpm_tasks] Failed to disable DPM!",
+			);
+	data->water_marks_bitmap &= ~(WaterMarksLoaded);
+
+	return result;
+}
+
+
 static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
 	.backend_init = vega10_hwmgr_backend_init,
 	.backend_fini = vega10_hwmgr_backend_fini,
 	.asic_setup = vega10_setup_asic_task,
 	.dynamic_state_management_enable = vega10_enable_dpm_tasks,
+	.dynamic_state_management_disable = vega10_disable_dpm_tasks,
 	.get_num_of_pp_table_entries =
 			vega10_get_number_of_powerplay_table_entries,
 	.get_power_state_size = vega10_get_power_state_size,
@@ -4400,6 +4495,8 @@ static int vega10_check_states_equal(struct
 pp_hwmgr *hwmgr,
 	.check_states_equal = vega10_check_states_equal,
 	.check_smc_update_required_for_display_configuration =
 
 	vega10_check_smc_update_required_for_display_configuration,
+	.power_off_asic = vega10_power_off_asic,
+	.disable_smc_firmware_ctf = vega10_thermal_disable_alert,
 };

int vega10_hwmgr_init(struct pp_hwmgr *hwmgr)

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +10 -0
index f1e244c..692f752 100644
@@ -113,6 +113,29 @@ int vega10_enable_power_containment(struct
 pp_hwmgr *hwmgr)
 	return result;
 }
 
+int vega10_disable_power_containment(struct pp_hwmgr *hwmgr)
+{
+	struct vega10_hwmgr *data =
+			(struct vega10_hwmgr *)(hwmgr->backend);
+
+	if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+			PHM_PlatformCaps_PowerContainment)) {
+		if (data->smu_features[GNLD_PPT].supported)
+
 	PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr-
 >smumgr,
+					false, data-
Quoted 1 line

smu_features[GNLD_PPT].smu_feature_bitmap),

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +1 -0
+					"Attempt to disable PPT feature

Failed!",

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

smu_features[GNLD_PPT].supported = false);

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +3 -0
+
+		if (data->smu_features[GNLD_TDC].supported)
+

PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr-

Quoted 1 line

smumgr,

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

smu_features[GNLD_TDC].smu_feature_bitmap),

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +1 -0
+					"Attempt to disable PPT feature

Failed!",

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

smu_features[GNLD_TDC].supported = false);

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +5 -0
+	}
+
+	return 0;
+}
+
 static int vega10_set_overdrive_target_percentage(struct pp_hwmgr

*hwmgr,

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c +0 -0
 		uint32_t adjust_percent)
 {
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.h +1 -0
index d9662bf..9ecaa27 100644
@@ -60,6 +60,7 @@ struct vega10_pt_defaults {
 int vega10_enable_power_containment(struct pp_hwmgr *hwmgr);
 int vega10_set_power_limit(struct pp_hwmgr *hwmgr, uint32_t n);
 int vega10_power_control_set_level(struct pp_hwmgr *hwmgr);
+int vega10_disable_power_containment(struct pp_hwmgr *hwmgr);
 
 #endif  /* _VEGA10_POWERTUNE_H_ */
 
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c +1 -1
index f4d77b6..7062ec8 100644
@@ -501,7 +501,7 @@ static int vega10_thermal_enable_alert(struct
 pp_hwmgr *hwmgr)
 * Disable thermal alerts on the RV770 thermal controller.
 * @param    hwmgr The address of the hardware manager.
 */
-static int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
+int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr)
 {
 	struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr-
Quoted 1 line

backend);

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.h +1 -0
index 8036808..70c1d22 100644
@@ -78,6 +78,7 @@ extern int vega10_fan_ctrl_get_fan_speed_rpm(struct
 pp_hwmgr *hwmgr,
 		uint32_t *speed);
 extern int vega10_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr
 *hwmgr);
 extern uint32_t smu7_get_xclk(struct pp_hwmgr *hwmgr);
+extern int vega10_thermal_disable_alert(struct pp_hwmgr *hwmgr);
 

#endif

Quoted 7 lines

--
1.9.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