drm/amd/display: Wake DMCUB before sending a command for replay feature
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Mon, 4 Dec 2023 21:35:04 +0000 (16:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:17:13 +0000 (16:17 -0400)
commit3601a35a2e9d640233f4bc3496f7603b93f9c143
tree8db98e0abd4da668c618df99b51bd6b9c1e1b0e4
parentb5236da757adc75d7e52c69bdc233d29249a0d0c
drm/amd/display: Wake DMCUB before sending a command for replay feature

[Why]
We can hang in place trying to send commands when the DMCUB isn't
powered on.

[How]
For functions that execute within a DC context or DC lock we can wrap
the direct calls to dm_execute_dmub_cmd/list with code that exits idle
power optimizations and reallows once we're done with the command
submission on success.

For DM direct submissions the DM will need to manage the enter/exit
sequencing manually.

We cannot invoke a DMCUB command directly within the DM execution helper
or we can deadlock.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c