Skip to content

Commit 544dcd7

Browse files
Luben Tuikovalexdeucher
authored andcommitted
drm/amd/pm: Fix a bug in semaphore double-lock
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: 5810323 ("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]>
1 parent b8e4284 commit 544dcd7

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ int smu_cmn_send_msg_without_waiting(struct smu_context *smu,
259259
if (smu->adev->no_hw_access)
260260
return 0;
261261

262-
mutex_lock(&smu->message_lock);
263262
reg = __smu_cmn_poll_stat(smu);
264263
res = __smu_cmn_reg2errno(smu, reg);
265264
if (reg == SMU_RESP_NONE ||
@@ -269,7 +268,6 @@ int smu_cmn_send_msg_without_waiting(struct smu_context *smu,
269268
__smu_cmn_send_msg(smu, msg_index, param);
270269
res = 0;
271270
Out:
272-
mutex_unlock(&smu->message_lock);
273271
return res;
274272
}
275273

0 commit comments

Comments
 (0)