summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-10-16 14:43:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-10-25 16:50:09 -0400
commit3697b339c64f82af195fd3cc6492ef26b6dfcd47 (patch)
tree3823065f99f5769f0b8774cd298a45d520bbc0de /drivers/gpu/drm/amd/powerplay/smu_v12_0.c
parent6aec5bb4892a2c4881261532e99eef86e5f1c734 (diff)
drm/amd/powerplay: add lock protection for swSMU APIs V2
This is a quick and low risk fix. Those APIs which are exposed to other IPs or to support sysfs/hwmon interfaces or DAL will have lock protection. Meanwhile no lock protection is enforced for swSMU internal used APIs. Future optimization is needed. V2: strip the lock protection for all swSMU internal APIs Signed-off-by: Evan Quan <evan.quan@amd.com> Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Acked-by: Feifei Xu <Feifei.Xu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_v12_0.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smu_v12_0.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
index cac4269cf1d1..6b9eef20554b 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v12_0.c
@@ -316,8 +316,6 @@ static int smu_v12_0_get_dpm_ultimate_freq(struct smu_context *smu, enum smu_clk
int ret = 0;
uint32_t mclk_mask, soc_mask;
- mutex_lock(&smu->mutex);
-
if (max) {
ret = smu_get_profiling_clk_mask(smu, AMD_DPM_FORCED_LEVEL_PROFILE_PEAK,
NULL,
@@ -387,7 +385,6 @@ static int smu_v12_0_get_dpm_ultimate_freq(struct smu_context *smu, enum smu_clk
}
}
failed:
- mutex_unlock(&smu->mutex);
return ret;
}