diff options
author | Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> | 2023-10-03 19:18:44 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-10-27 01:55:58 +0300 |
commit | d5f9a92bd1e234b8a7cf6f350b5bc0169221ae59 (patch) | |
tree | e6895e9213e20ae51e1ae5b5131086e373660f7a /drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | |
parent | 543068f0e3721e1cbd6cee48c17f277950f59670 (diff) | |
download | linux-d5f9a92bd1e234b8a7cf6f350b5bc0169221ae59.tar.xz |
drm/amd/display: Revert "Improve x86 and dmub ips handshake"
This reverts commit 1288d702080949f87688d49dfeeacc99f40adc9b.
Causes intermittent hangs during reboot stress testing.
Reviewed-by: Duncan Ma <duncan.ma@amd.com>
Acked-by: Roman Li <roman.li@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>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 57 |
1 files changed, 12 insertions, 45 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 4fd3f09432be..a388f34c6d04 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c @@ -1100,64 +1100,31 @@ void dc_dmub_srv_notify_idle(const struct dc *dc, bool allow_idle) cmd.idle_opt_notify_idle.cntl_data.driver_idle = allow_idle; - if (allow_idle) { - if (dc->hwss.set_idle_state) - dc->hwss.set_idle_state(dc, true); - } - dm_execute_dmub_cmd(dc->ctx, &cmd, DM_DMUB_WAIT_TYPE_WAIT); + + if (allow_idle) + udelay(500); } void dc_dmub_srv_exit_low_power_state(const struct dc *dc) { - uint32_t allow_state = 0; - uint32_t commit_state = 0; - if (dc->debug.dmcub_emulation) return; if (!dc->idle_optimizations_allowed) return; - if (dc->hwss.get_idle_state && - dc->hwss.set_idle_state && - dc->clk_mgr->funcs->exit_low_power_state) { - - allow_state = dc->hwss.get_idle_state(dc); - dc->hwss.set_idle_state(dc, false); - - if (allow_state & DMUB_IPS2_ALLOW_MASK) { - // Wait for evaluation time - udelay(dc->debug.ips2_eval_delay_us); - commit_state = dc->hwss.get_idle_state(dc); - if (commit_state & DMUB_IPS2_COMMIT_MASK) { - // Tell PMFW to exit low power state - dc->clk_mgr->funcs->exit_low_power_state(dc->clk_mgr); - - // Wait for IPS2 entry upper bound - udelay(dc->debug.ips2_entry_delay_us); - dc->clk_mgr->funcs->exit_low_power_state(dc->clk_mgr); + // Tell PMFW to exit low power state + if (dc->clk_mgr->funcs->exit_low_power_state) + dc->clk_mgr->funcs->exit_low_power_state(dc->clk_mgr); - do { - commit_state = dc->hwss.get_idle_state(dc); - } while (commit_state & DMUB_IPS2_COMMIT_MASK); + // Wait for dmcub to load up + dc_dmub_srv_is_hw_pwr_up(dc->ctx->dmub_srv, true); - if (!dc_dmub_srv_is_hw_pwr_up(dc->ctx->dmub_srv, true)) - ASSERT(0); - - return; - } - } - - dc_dmub_srv_notify_idle(dc, false); - if (allow_state & DMUB_IPS1_ALLOW_MASK) { - do { - commit_state = dc->hwss.get_idle_state(dc); - } while (commit_state & DMUB_IPS1_COMMIT_MASK); - } - } + // Notify dmcub disallow idle + dc_dmub_srv_notify_idle(dc, false); - if (!dc_dmub_srv_is_hw_pwr_up(dc->ctx->dmub_srv, true)) - ASSERT(0); + // Confirm dmu is powered up + dc_dmub_srv_is_hw_pwr_up(dc->ctx->dmub_srv, true); } |