diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-01-10 18:52:11 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-01-10 18:52:11 +0100 |
commit | 02df083201272c0c2e061b18d9c20635974abf6d (patch) | |
tree | 788321ae7a4867c4c06bd1d070cb98d49d009b76 /drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | |
parent | 0679715e714345d273c0e1eb78078535ffc4b2a1 (diff) | |
parent | bef1d88263ff769f15aa0e1515cdcede84e61d15 (diff) |
Merge branch 'linus' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/arcturus_ppt.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c index cc71a1078a7a..472e9fed411a 100644 --- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c @@ -862,18 +862,21 @@ static int arcturus_get_metrics_table(struct smu_context *smu, struct smu_table_context *smu_table= &smu->smu_table; int ret = 0; + mutex_lock(&smu->metrics_lock); if (!smu_table->metrics_time || time_after(jiffies, smu_table->metrics_time + HZ / 1000)) { ret = smu_update_table(smu, SMU_TABLE_SMU_METRICS, 0, (void *)smu_table->metrics_table, false); if (ret) { pr_info("Failed to export SMU metrics table!\n"); + mutex_unlock(&smu->metrics_lock); return ret; } smu_table->metrics_time = jiffies; } memcpy(metrics_table, smu_table->metrics_table, sizeof(SmuMetrics_t)); + mutex_unlock(&smu->metrics_lock); return ret; } |