Commit fa7df751 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/smu: add metrics table lock

This table is used for lots of things, add it's own lock.

Bug: https://gitlab.freedesktop.org/drm/amd/issues/900Reviewed-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d012ea92
...@@ -872,6 +872,7 @@ static int smu_sw_init(void *handle) ...@@ -872,6 +872,7 @@ static int smu_sw_init(void *handle)
smu->smu_baco.platform_support = false; smu->smu_baco.platform_support = false;
mutex_init(&smu->sensor_lock); mutex_init(&smu->sensor_lock);
mutex_init(&smu->metrics_lock);
smu->watermarks_bitmap = 0; smu->watermarks_bitmap = 0;
smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT; smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
......
...@@ -350,6 +350,7 @@ struct smu_context ...@@ -350,6 +350,7 @@ struct smu_context
const struct pptable_funcs *ppt_funcs; const struct pptable_funcs *ppt_funcs;
struct mutex mutex; struct mutex mutex;
struct mutex sensor_lock; struct mutex sensor_lock;
struct mutex metrics_lock;
uint64_t pool_size; uint64_t pool_size;
struct smu_table_context smu_table; struct smu_table_context smu_table;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment