summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-11-04 17:31:29 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-11-19 12:08:38 -0500
commit0a650c1d35e2ff6487976bca3e009f63479716b2 (patch)
tree6aec62bba9e9f20a24e585df8ed760e4ee952e19 /drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
parentb4f8285a1960f133cc679445049bb75e5c65a33f (diff)
drm/amd/powerplay: add Arcturus baco reset support
Enable baco reset support on Arcturus. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/arcturus_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/arcturus_ppt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
index 58c7c4a3053e..1af0b1ab6f70 100644
--- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c
@@ -495,6 +495,7 @@ static int arcturus_store_powerplay_table(struct smu_context *smu)
{
struct smu_11_0_powerplay_table *powerplay_table = NULL;
struct smu_table_context *table_context = &smu->smu_table;
+ struct smu_baco_context *smu_baco = &smu->smu_baco;
int ret = 0;
if (!table_context->power_play_table)
@@ -507,6 +508,12 @@ static int arcturus_store_powerplay_table(struct smu_context *smu)
table_context->thermal_controller_type = powerplay_table->thermal_controller_type;
+ mutex_lock(&smu_baco->mutex);
+ if (powerplay_table->platform_caps & SMU_11_0_PP_PLATFORM_CAP_BACO ||
+ powerplay_table->platform_caps & SMU_11_0_PP_PLATFORM_CAP_MACO)
+ smu_baco->platform_support = true;
+ mutex_unlock(&smu_baco->mutex);
+
return ret;
}