diff options
author | Nicholas Kazlauskas <[email protected]> | 2023-12-12 12:10:49 -0500 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2024-01-03 10:47:05 -0500 |
commit | 4e7738bcfb6765ca669fdbd2be2f7f6f239ed3e5 (patch) | |
tree | 2926790f2fbe4c484c237a0b0fe4ee7127e890a2 | |
parent | 4b5c5f5ad38b9435518730cc7f8f1e8de9c5cb2f (diff) |
drm/amd/display: Switch DMCUB notify idle command to NO_WAIT
[Why]
Race condition between notification of driver idle and the command being
processed. We could theoretically enter idle between the submission and
the wait for idle that occurs after.
[How]
Switch the notification to NO_WAIT to avoid the RPTR access.
Tested-by: Daniel Wheeler <[email protected]>
Reviewed-by: Sung joon Kim <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c index 7724dcadecba..dadeaa9c92dd 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -1209,7 +1209,8 @@ static void dc_dmub_srv_notify_idle(const struct dc *dc, bool allow_idle) } /* NOTE: This does not use the "wake" interface since this is part of the wake path. */ - dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT); + /* We also do not perform a wait since DMCUB could enter idle after the notification. */ + dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_NO_WAIT); } static void dc_dmub_srv_exit_low_power_state(const struct dc *dc) |