[PATCH 1/9] drm/amd/powerplay: drop unnecessary CHIP_ARCTURUS guard
Evan Quan
evan.quan at amd.com
Mon Jun 1 07:29:55 UTC 2020
These APIs internally guard they will not break ARCTURUS.
Change-Id: Ib6775c1c8c5211ea45db6c3fb604a8279411ab37
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 38 +++++++++-----------
drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 8 ++---
2 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 5294aa7cdde1..4998ea942760 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -1049,11 +1049,9 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
return 0;
}
- if (adev->asic_type != CHIP_ARCTURUS) {
- ret = smu_init_display_count(smu, 0);
- if (ret)
- return ret;
- }
+ ret = smu_init_display_count(smu, 0);
+ if (ret)
+ return ret;
if (initialize) {
/* get boot_values from vbios to set revision, gfxclk, and etc. */
@@ -1159,19 +1157,17 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
}
}
- if (adev->asic_type != CHIP_ARCTURUS) {
- ret = smu_notify_display_change(smu);
- if (ret)
- return ret;
+ ret = smu_notify_display_change(smu);
+ if (ret)
+ return ret;
- /*
- * Set min deep sleep dce fclk with bootup value from vbios via
- * SetMinDeepSleepDcefclk MSG.
- */
- ret = smu_set_min_dcef_deep_sleep(smu);
- if (ret)
- return ret;
- }
+ /*
+ * Set min deep sleep dce fclk with bootup value from vbios via
+ * SetMinDeepSleepDcefclk MSG.
+ */
+ ret = smu_set_min_dcef_deep_sleep(smu);
+ if (ret)
+ return ret;
/*
* Set initialized values (get from vbios) to dpm tables context such as
@@ -1188,11 +1184,9 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
return ret;
}
- if (adev->asic_type != CHIP_ARCTURUS) {
- ret = smu_override_pcie_parameters(smu);
- if (ret)
- return ret;
- }
+ ret = smu_override_pcie_parameters(smu);
+ if (ret)
+ return ret;
ret = smu_set_default_od_settings(smu, initialize);
if (ret)
diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
index 302b7e9cb5ba..e856ad36ab01 100644
--- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
@@ -2429,16 +2429,16 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
.populate_smc_tables = smu_v11_0_populate_smc_pptable,
.check_fw_version = smu_v11_0_check_fw_version,
.write_pptable = smu_v11_0_write_pptable,
- .set_min_dcef_deep_sleep = smu_v11_0_set_min_dcef_deep_sleep,
+ .set_min_dcef_deep_sleep = NULL,
.set_driver_table_location = smu_v11_0_set_driver_table_location,
.set_tool_table_location = smu_v11_0_set_tool_table_location,
.notify_memory_pool_location = smu_v11_0_notify_memory_pool_location,
.system_features_control = smu_v11_0_system_features_control,
.send_smc_msg_with_param = smu_v11_0_send_msg_with_param,
- .init_display_count = smu_v11_0_init_display_count,
+ .init_display_count = NULL,
.set_allowed_mask = smu_v11_0_set_allowed_mask,
.get_enabled_mask = smu_v11_0_get_enabled_mask,
- .notify_display_change = smu_v11_0_notify_display_change,
+ .notify_display_change = NULL,
.set_power_limit = smu_v11_0_set_power_limit,
.get_current_clk_freq = smu_v11_0_get_current_clk_freq,
.init_max_sustainable_clocks = smu_v11_0_init_max_sustainable_clocks,
@@ -2462,7 +2462,7 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
.baco_exit = smu_v11_0_baco_exit,
.get_dpm_ultimate_freq = smu_v11_0_get_dpm_ultimate_freq,
.set_soft_freq_limited_range = smu_v11_0_set_soft_freq_limited_range,
- .override_pcie_parameters = smu_v11_0_override_pcie_parameters,
+ .override_pcie_parameters = NULL,
.get_pptable_power_limit = arcturus_get_pptable_power_limit,
.set_df_cstate = arcturus_set_df_cstate,
.allow_xgmi_power_down = arcturus_allow_xgmi_power_down,
--
2.26.2
More information about the amd-gfx
mailing list