drm/amdgpu/smu: Add message sending lock
authorMatt Coffin <mcoffin13@gmail.com>
Wed, 26 Feb 2020 23:16:14 +0000 (16:16 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Feb 2020 21:59:23 +0000 (16:59 -0500)
commiteb696d041fa5e1bc3be90881e1432a9bb169b771
tree6257790df838978072e35a6c196ba7e4e1bf4fbd
parentae458c7b9dcc9284eec81c86ef0deab5a087d136
drm/amdgpu/smu: Add message sending lock

This adds a message lock to the smu_send_smc_msg* implementations to
protect against concurrent access to the mmu registers used to
communicate with the SMU

v2: Implement for smu_v12_0 as well

v3: Add mutex_init for message_lock

Signed-off-by: Matt Coffin <mcoffin13@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
drivers/gpu/drm/amd/powerplay/smu_v12_0.c