[PATCH 2/3] drm/amd/powerplay: drop unnecessary wrappers
Evan Quan
evan.quan at amd.com
Fri Jun 5 11:04:10 UTC 2020
These APIs are used in amdgpu_smu.c only. Thus these wrappers
are unnecessary.
Change-Id: I7768a84e3a7dfbbfa624ac97d94138de52402827
Signed-off-by: Evan Quan <evan.quan at amd.com>
---
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 24 ++++----------------
drivers/gpu/drm/amd/powerplay/smu_internal.h | 3 ---
2 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 00bf24c9ac45..8ea100b3187b 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -1328,8 +1328,8 @@ static int smu_hw_init(void *handle)
if (smu->is_apu) {
smu_powergate_sdma(&adev->smu, false);
- smu_powergate_vcn(&adev->smu, false);
- smu_powergate_jpeg(&adev->smu, false);
+ smu_dpm_set_uvd_enable(smu, true);
+ smu_dpm_set_jpeg_enable(smu, true);
smu_set_gfx_cgpg(&adev->smu, true);
}
@@ -1460,8 +1460,8 @@ static int smu_hw_fini(void *handle)
if (smu->is_apu) {
smu_powergate_sdma(&adev->smu, true);
- smu_powergate_vcn(&adev->smu, true);
- smu_powergate_jpeg(&adev->smu, true);
+ smu_dpm_set_uvd_enable(smu, false);
+ smu_dpm_set_jpeg_enable(smu, false);
}
if (!smu->pm_enabled)
@@ -2832,19 +2832,3 @@ uint32_t smu_get_pptable_power_limit(struct smu_context *smu)
return ret;
}
-
-int smu_powergate_vcn(struct smu_context *smu, bool gate)
-{
- if (!smu->is_apu)
- return 0;
-
- return smu_dpm_set_uvd_enable(smu, !gate);
-}
-
-int smu_powergate_jpeg(struct smu_context *smu, bool gate)
-{
- if (!smu->is_apu)
- return 0;
-
- return smu_dpm_set_jpeg_enable(smu, !gate);
-}
diff --git a/drivers/gpu/drm/amd/powerplay/smu_internal.h b/drivers/gpu/drm/amd/powerplay/smu_internal.h
index bb4eabd6664a..f9041f981daf 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_internal.h
+++ b/drivers/gpu/drm/amd/powerplay/smu_internal.h
@@ -208,7 +208,4 @@ static inline int smu_send_smc_msg(struct smu_context *smu, enum smu_message_typ
#define smu_log_thermal_throttling(smu) \
((smu)->ppt_funcs->log_thermal_throttling_event ? (smu)->ppt_funcs->log_thermal_throttling_event((smu)) : 0)
-int smu_powergate_vcn(struct smu_context *smu, bool gate);
-int smu_powergate_jpeg(struct smu_context *smu, bool gate);
-
#endif
--
2.27.0
More information about the amd-gfx
mailing list