Fix a bug in smu_cmn_send_msg_without_waiting() in
that this function does not need to take the
smu->message_lock mutex in order to send a message
down to the SMU. The mutex is acquired by the
caller of this function instead.
Cc: Alex Deucher <[email protected]>
Cc: Changfeng Zhu <[email protected]>
Cc: Huang Rui <[email protected]>
Fixes: 5810323ba69289 ("drm/amd/pm: Fix a bug communicating with the SMU (v5)")
Signed-off-by: Luben Tuikov <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
if (smu->adev->no_hw_access)
return 0;
- mutex_lock(&smu->message_lock);
reg = __smu_cmn_poll_stat(smu);
res = __smu_cmn_reg2errno(smu, reg);
if (reg == SMU_RESP_NONE ||
__smu_cmn_send_msg(smu, msg_index, param);
res = 0;
Out:
- mutex_unlock(&smu->message_lock);
return res;
}