diff options
author | Stylon Wang <stylon.wang@amd.com> | 2022-11-10 21:53:01 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-11-29 11:03:38 -0500 |
commit | ead08b95fa50f40618c72b93a849c4ae30c9cd50 (patch) | |
tree | 4f43fe46c3996e5d4c035904a0856665e4b39656 /drivers/gpu/drm/i915/vlv_sideband_reg.h | |
parent | 719b59a3fac159e974164b3d52c9ad763a5d6bc8 (diff) |
drm/amd/display: Fix race condition in DPIA AUX transfer
[Why]
This fix was intended for improving on coding style but in the process
uncovers a race condition, which explains why we are getting incorrect
length in DPIA AUX replies. Due to the call path of DPIA AUX going from
DC back to DM layer then again into DC and the added complexities on top
of current DC AUX implementation, a proper fix to rely on current dc_lock
to address the race condition is difficult without a major overhual
on how DPIA AUX is implemented.
[How]
- Add a mutex dpia_aux_lock to protect DPIA AUX transfers
- Remove DMUB_ASYNC_TO_SYNC_ACCESS_* codes and rely solely on
aux_return_code_type for error reporting and handling
- Separate SET_CONFIG from DPIA AUX transfer because they have quiet
different processing logic
- Remove unnecessary type casting to and from void * type
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/i915/vlv_sideband_reg.h')
0 files changed, 0 insertions, 0 deletions