drm/amdgpu/powerplay: Refactor SMU message handling for safety
authorMatt Coffin <mcoffin13@gmail.com>
Wed, 26 Feb 2020 23:16:12 +0000 (16:16 -0700)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Feb 2020 21:59:23 +0000 (16:59 -0500)
commit1c58267cbe46f0b5741628a72d10b5464712a012
treecda0abc21d7a98e21afe89c0f485d9b8674f91cd
parent2622e2ae27b5bcc31090cd904d54d29111cc7113
drm/amdgpu/powerplay: Refactor SMU message handling for safety

Move the responsibility for reading argument registers into the
smu_send_smc_msg* implementations, so that adding a message-sending lock
to protect the SMU registers will result in the lock still being held
when the argument is read.

v2: transition smu_v12_0, it's asics, and vega20

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/arcturus_ppt.c
drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h
drivers/gpu/drm/amd/powerplay/inc/smu_v12_0.h
drivers/gpu/drm/amd/powerplay/navi10_ppt.c
drivers/gpu/drm/amd/powerplay/renoir_ppt.c
drivers/gpu/drm/amd/powerplay/smu_internal.h
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
drivers/gpu/drm/amd/powerplay/smu_v12_0.c
drivers/gpu/drm/amd/powerplay/vega20_ppt.c