drm/amd/display: Guard calls to hdcp_ta and dtm_ta
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Mon, 30 Mar 2020 21:44:00 +0000 (17:44 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Apr 2020 21:01:18 +0000 (17:01 -0400)
commit8913f7ff0580605093563688f58e427dd0014609
treedcdf482acfa7f0c4cee6d69179bd02b3befc51df
parentc0ed2ca61f9085a98b3b3d4a61582741adde9260
drm/amd/display: Guard calls to hdcp_ta and dtm_ta

[Why]
The buffer used when calling psp is a shared buffer. If we have multiple calls
at the same time we can overwrite the buffer.

[How]
Add mutex to guard the shared buffer.

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/display/modules/hdcp/hdcp_psp.c