drm/amdgpu/smu: add metrics table lock
commit 073d5eef9e
upstream.
This table is used for lots of things, add it's own lock.
Bug: https://gitlab.freedesktop.org/drm/amd/issues/900
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5.4-rM2-2.2.x-imx-squashed
parent
55ab031c0a
commit
7514bbe975
|
@ -844,6 +844,7 @@ static int smu_sw_init(void *handle)
|
|||
smu->smu_baco.platform_support = false;
|
||||
|
||||
mutex_init(&smu->sensor_lock);
|
||||
mutex_init(&smu->metrics_lock);
|
||||
|
||||
smu->watermarks_bitmap = 0;
|
||||
smu->power_profile_mode = PP_SMC_POWER_PROFILE_BOOTUP_DEFAULT;
|
||||
|
|
|
@ -345,6 +345,7 @@ struct smu_context
|
|||
const struct pptable_funcs *ppt_funcs;
|
||||
struct mutex mutex;
|
||||
struct mutex sensor_lock;
|
||||
struct mutex metrics_lock;
|
||||
uint64_t pool_size;
|
||||
|
||||
struct smu_table_context smu_table;
|
||||
|
|
Loading…
Reference in New Issue