[PATCH 2/2] drm/radeon: remove never called dpm functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



remove some dpm functions never called, mostly xxx_dpm_reset_asic
functions. Here the list:
 * btc_dpm_reset_asic
 * ci_power_control_set_level
 * ci_set_boot_state
 * ci_dpm_power_control_set_level
 * ci_dpm_reset_asic
 * cypress_dpm_reset_asic
 * kv_dpm_reset_asic
 * ni_dpm_reset_asic
 * rv770_dpm_reset_asic
 * si_set_boot_state
 * si_dpm_reset_asic
 * sumo_dpm_reset_asic
 * trinity_dpm_reset_asic

Signed-off-by: Michele Curti <michele.curti@xxxxxxxxx>
---
 drivers/gpu/drm/radeon/btc_dpm.c     |  8 --------
 drivers/gpu/drm/radeon/ci_dpm.c      | 39 ------------------------------------
 drivers/gpu/drm/radeon/cypress_dpm.c |  6 ------
 drivers/gpu/drm/radeon/kv_dpm.c      | 21 -------------------
 drivers/gpu/drm/radeon/ni_dpm.c      |  6 ------
 drivers/gpu/drm/radeon/rv770_dpm.c   | 13 ------------
 drivers/gpu/drm/radeon/si_dpm.c      | 14 -------------
 drivers/gpu/drm/radeon/sumo_dpm.c    | 12 -----------
 drivers/gpu/drm/radeon/trinity_dpm.c | 16 ---------------
 9 files changed, 135 deletions(-)

diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c
index d6243f1..b3f1919 100644
--- a/drivers/gpu/drm/radeon/btc_dpm.c
+++ b/drivers/gpu/drm/radeon/btc_dpm.c
@@ -2260,14 +2260,6 @@ static void btc_update_requested_ps(struct radeon_device *rdev,
 	eg_pi->requested_rps.ps_priv = &eg_pi->requested_ps;
 }
 
-void btc_dpm_reset_asic(struct radeon_device *rdev)
-{
-	rv770_restrict_performance_levels_before_switch(rdev);
-	btc_disable_ulv(rdev);
-	btc_set_boot_state_timing(rdev);
-	rv770_set_boot_state(rdev);
-}
-
 int btc_dpm_pre_set_power_state(struct radeon_device *rdev)
 {
 	struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
diff --git a/drivers/gpu/drm/radeon/ci_dpm.c b/drivers/gpu/drm/radeon/ci_dpm.c
index 11a55e9..75e9622 100644
--- a/drivers/gpu/drm/radeon/ci_dpm.c
+++ b/drivers/gpu/drm/radeon/ci_dpm.c
@@ -690,30 +690,6 @@ static int ci_enable_smc_cac(struct radeon_device *rdev, bool enable)
 	return ret;
 }
 
-static int ci_power_control_set_level(struct radeon_device *rdev)
-{
-	struct ci_power_info *pi = ci_get_pi(rdev);
-	struct radeon_cac_tdp_table *cac_tdp_table =
-		rdev->pm.dpm.dyn_state.cac_tdp_table;
-	s32 adjust_percent;
-	s32 target_tdp;
-	int ret = 0;
-	bool adjust_polarity = false; /* ??? */
-
-	if (pi->caps_power_containment &&
-	    (pi->power_containment_features & POWERCONTAINMENT_FEATURE_BAPM)) {
-		adjust_percent = adjust_polarity ?
-			rdev->pm.dpm.tdp_adjustment : (-1 * rdev->pm.dpm.tdp_adjustment);
-		target_tdp = ((100 + adjust_percent) *
-			      (s32)cac_tdp_table->configurable_tdp) / 100;
-		target_tdp *= 256;
-
-		ret = ci_set_overdrive_target_tdp(rdev, (u32)target_tdp);
-	}
-
-	return ret;
-}
-
 void ci_dpm_powergate_uvd(struct radeon_device *rdev, bool gate)
 {
 	struct ci_power_info *pi = ci_get_pi(rdev);
@@ -1313,11 +1289,6 @@ static int ci_set_overdrive_target_tdp(struct radeon_device *rdev,
 	return 0;
 }
 
-static int ci_set_boot_state(struct radeon_device *rdev)
-{
-	return ci_enable_sclk_mclk_dpm(rdev, false);
-}
-
 static u32 ci_get_average_sclk_freq(struct radeon_device *rdev)
 {
 	u32 sclk_freq;
@@ -4804,16 +4775,6 @@ int ci_dpm_set_power_state(struct radeon_device *rdev)
 	return 0;
 }
 
-int ci_dpm_power_control_set_level(struct radeon_device *rdev)
-{
-	return ci_power_control_set_level(rdev);
-}
-
-void ci_dpm_reset_asic(struct radeon_device *rdev)
-{
-	ci_set_boot_state(rdev);
-}
-
 void ci_dpm_display_configuration_changed(struct radeon_device *rdev)
 {
 	ci_program_display_gap(rdev);
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 9aad032..d3f8208 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -2005,12 +2005,6 @@ int cypress_dpm_set_power_state(struct radeon_device *rdev)
 	return 0;
 }
 
-void cypress_dpm_reset_asic(struct radeon_device *rdev)
-{
-	rv770_restrict_performance_levels_before_switch(rdev);
-	rv770_set_boot_state(rdev);
-}
-
 void cypress_dpm_display_configuration_changed(struct radeon_device *rdev)
 {
 	cypress_program_display_gap(rdev);
diff --git a/drivers/gpu/drm/radeon/kv_dpm.c b/drivers/gpu/drm/radeon/kv_dpm.c
index 1dd976f..6889a79 100644
--- a/drivers/gpu/drm/radeon/kv_dpm.c
+++ b/drivers/gpu/drm/radeon/kv_dpm.c
@@ -1925,27 +1925,6 @@ void kv_dpm_setup_asic(struct radeon_device *rdev)
 	kv_init_sclk_t(rdev);
 }
 
-void kv_dpm_reset_asic(struct radeon_device *rdev)
-{
-	struct kv_power_info *pi = kv_get_pi(rdev);
-
-	if (rdev->family == CHIP_KABINI || rdev->family == CHIP_MULLINS) {
-		kv_force_lowest_valid(rdev);
-		kv_init_graphics_levels(rdev);
-		kv_program_bootup_state(rdev);
-		kv_upload_dpm_settings(rdev);
-		kv_force_lowest_valid(rdev);
-		kv_unforce_levels(rdev);
-	} else {
-		kv_init_graphics_levels(rdev);
-		kv_program_bootup_state(rdev);
-		kv_freeze_sclk_dpm(rdev, true);
-		kv_upload_dpm_settings(rdev);
-		kv_freeze_sclk_dpm(rdev, false);
-		kv_set_enabled_level(rdev, pi->graphics_boot_level);
-	}
-}
-
 //XXX use sumo_dpm_display_configuration_changed
 
 static void kv_construct_max_power_limits_table(struct radeon_device *rdev,
diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index 6d2f16c..dcd5568 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -3862,12 +3862,6 @@ void ni_dpm_post_set_power_state(struct radeon_device *rdev)
 	ni_update_current_ps(rdev, new_ps);
 }
 
-void ni_dpm_reset_asic(struct radeon_device *rdev)
-{
-	ni_restrict_performance_levels_before_switch(rdev);
-	rv770_set_boot_state(rdev);
-}
-
 union power_info {
 	struct _ATOM_POWERPLAY_INFO info;
 	struct _ATOM_POWERPLAY_INFO_V2 info_2;
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index 755a8f9..8ee6ff5 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -2075,19 +2075,6 @@ int rv770_dpm_set_power_state(struct radeon_device *rdev)
 	return 0;
 }
 
-void rv770_dpm_reset_asic(struct radeon_device *rdev)
-{
-	struct rv7xx_power_info *pi = rv770_get_pi(rdev);
-	struct radeon_ps *boot_ps = rdev->pm.dpm.boot_ps;
-
-	rv770_restrict_performance_levels_before_switch(rdev);
-	if (pi->dcodt)
-		rv770_program_dcodt_before_state_switch(rdev, boot_ps, boot_ps);
-	rv770_set_boot_state(rdev);
-	if (pi->dcodt)
-		rv770_program_dcodt_after_state_switch(rdev, boot_ps, boot_ps);
-}
-
 void rv770_dpm_setup_asic(struct radeon_device *rdev)
 {
 	struct rv7xx_power_info *pi = rv770_get_pi(rdev);
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index 267949a..f06c6f9 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -3296,12 +3296,6 @@ int si_dpm_force_performance_level(struct radeon_device *rdev,
 	return 0;
 }
 
-static int si_set_boot_state(struct radeon_device *rdev)
-{
-	return (si_send_msg_to_smc(rdev, PPSMC_MSG_SwitchToInitialState) == PPSMC_Result_OK) ?
-		0 : -EINVAL;
-}
-
 static int si_set_sw_state(struct radeon_device *rdev)
 {
 	return (si_send_msg_to_smc(rdev, PPSMC_MSG_SwitchToSwState) == PPSMC_Result_OK) ?
@@ -6129,14 +6123,6 @@ void si_dpm_post_set_power_state(struct radeon_device *rdev)
 	ni_update_current_ps(rdev, new_ps);
 }
 
-
-void si_dpm_reset_asic(struct radeon_device *rdev)
-{
-	si_restrict_performance_levels_before_switch(rdev);
-	si_disable_ulv(rdev);
-	si_set_boot_state(rdev);
-}
-
 void si_dpm_display_configuration_changed(struct radeon_device *rdev)
 {
 	si_program_display_gap(rdev);
diff --git a/drivers/gpu/drm/radeon/sumo_dpm.c b/drivers/gpu/drm/radeon/sumo_dpm.c
index 1f8a883..698e785 100644
--- a/drivers/gpu/drm/radeon/sumo_dpm.c
+++ b/drivers/gpu/drm/radeon/sumo_dpm.c
@@ -1338,18 +1338,6 @@ void sumo_dpm_post_set_power_state(struct radeon_device *rdev)
 	sumo_update_current_ps(rdev, new_ps);
 }
 
-void sumo_dpm_reset_asic(struct radeon_device *rdev)
-{
-	sumo_program_bootup_state(rdev);
-	sumo_enable_power_level_0(rdev);
-	sumo_set_forced_level_0(rdev);
-	sumo_set_forced_mode_enabled(rdev);
-	sumo_wait_for_level_0(rdev);
-	sumo_set_forced_mode_disabled(rdev);
-	sumo_set_forced_mode_enabled(rdev);
-	sumo_set_forced_mode_disabled(rdev);
-}
-
 void sumo_dpm_setup_asic(struct radeon_device *rdev)
 {
 	struct sumo_power_info *pi = sumo_get_pi(rdev);
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c
index b4ec5c4..7428da0 100644
--- a/drivers/gpu/drm/radeon/trinity_dpm.c
+++ b/drivers/gpu/drm/radeon/trinity_dpm.c
@@ -1269,22 +1269,6 @@ void trinity_dpm_setup_asic(struct radeon_device *rdev)
 	trinity_release_mutex(rdev);
 }
 
-void trinity_dpm_reset_asic(struct radeon_device *rdev)
-{
-	struct trinity_power_info *pi = trinity_get_pi(rdev);
-
-	trinity_acquire_mutex(rdev);
-	if (pi->enable_dpm) {
-		trinity_enable_power_level_0(rdev);
-		trinity_force_level_0(rdev);
-		trinity_wait_for_level_0(rdev);
-		trinity_program_bootup_state(rdev);
-		trinity_force_level_0(rdev);
-		trinity_unforce_levels(rdev);
-	}
-	trinity_release_mutex(rdev);
-}
-
 static u16 trinity_convert_voltage_index_to_value(struct radeon_device *rdev,
 						  u32 vid_2bit)
 {
-- 
2.1.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux