summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-10-28 15:20:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-11-19 16:42:51 -0500
commit11520f27085bbab7dcb2b5998dec7e7abe3a5bd1 (patch)
tree2f1d49b69c54967fbc95ac93c5849255894e2645 /drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
parentb97e9d47e549caacea9504822301c34d447c5fcf (diff)
downloadlinux-stable-11520f27085bbab7dcb2b5998dec7e7abe3a5bd1.tar.gz
linux-stable-11520f27085bbab7dcb2b5998dec7e7abe3a5bd1.tar.bz2
linux-stable-11520f27085bbab7dcb2b5998dec7e7abe3a5bd1.zip
drm/amdgpu: split swSMU baco_reset into enter and exit
BACO - Bus Active, Chip Off So we can use it for power savings rather than just reset. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/amdgpu_smu.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/amdgpu_smu.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index b73561957d24..36001a4f65d7 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -2456,14 +2456,28 @@ int smu_baco_get_state(struct smu_context *smu, enum smu_baco_state *state)
return 0;
}
-int smu_baco_reset(struct smu_context *smu)
+int smu_baco_enter(struct smu_context *smu)
{
int ret = 0;
mutex_lock(&smu->mutex);
- if (smu->ppt_funcs->baco_reset)
- ret = smu->ppt_funcs->baco_reset(smu);
+ if (smu->ppt_funcs->baco_enter)
+ ret = smu->ppt_funcs->baco_enter(smu);
+
+ mutex_unlock(&smu->mutex);
+
+ return ret;
+}
+
+int smu_baco_exit(struct smu_context *smu)
+{
+ int ret = 0;
+
+ mutex_lock(&smu->mutex);
+
+ if (smu->ppt_funcs->baco_exit)
+ ret = smu->ppt_funcs->baco_exit(smu);
mutex_unlock(&smu->mutex);