]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix deadlock when falling back to v2 from v3
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 22 Oct 2021 20:14:24 +0000 (16:14 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Oct 2021 02:04:50 +0000 (22:04 -0400)
commitb2fb238b78cd989dab8a7f8d157712531486a8c0
treec9c3c7b485325a38cecd9ded1098d57f3f5bd022
parentbb0dd0a0915fc61ffe1ca349caa742616fdea698
drm/amd/display: Fix deadlock when falling back to v2 from v3

[Why]
A deadlock in the kernel occurs when we fallback from the V3 to V2
add_topology_to_display or remove_topology_to_display because they
both try to acquire the dtm_mutex but recursive locking isn't
supported on mutex_lock().

[How]
Make the mutex_lock/unlock more fine grained and move them up such that
they're only required for the psp invocation itself.

Fixes: 8fb966f8954c ("drm/amd/display: Add DCN3.1 HDCP support")
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c