Commit a29d44ae authored by Stanley.Yang's avatar Stanley.Yang Committed by Alex Deucher

drm/amd/pm: use pm mutex to protect ecc info table

Signed-off-by: default avatarStanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a03b2886
......@@ -643,11 +643,16 @@ int amdgpu_dpm_get_ecc_info(struct amdgpu_device *adev,
void *umc_ecc)
{
struct smu_context *smu = adev->powerplay.pp_handle;
int ret = 0;
if (!is_support_sw_smu(adev))
return -EOPNOTSUPP;
return smu_get_ecc_info(smu, umc_ecc);
mutex_lock(&adev->pm.mutex);
ret = smu_get_ecc_info(smu, umc_ecc);
mutex_unlock(&adev->pm.mutex);
return ret;
}
struct amd_vce_state *amdgpu_dpm_get_vce_clock_state(struct amdgpu_device *adev,
......
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