Commit 073d5eef authored by Alex Deucher's avatar Alex Deucher
Browse files

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/900


Reviewed-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>
Cc: stable@vger.kernel.org
parent 5d30ed3c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -866,6 +866,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;
+1 −0
Original line number Diff line number Diff line
@@ -349,6 +349,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;