diff options
author | Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> | 2024-02-06 01:13:40 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-02-22 18:18:00 +0300 |
commit | c4a060372590848d886c24b8215139cab122c0ed (patch) | |
tree | eb9e61e4e61e5592930843b1d879435b549ae553 /drivers/gpu | |
parent | 4af4d2c275aeb667bc2bca0d2135b825e931a55a (diff) | |
download | linux-c4a060372590848d886c24b8215139cab122c0ed.tar.xz |
drm/amd/display: Fix S4 hang polling on HW power up done for VBIOS DMCUB
[Why]
VBIOS DMCUB firmware doesn't set the dal_fw bit and we end up hanging
waiting for HW power up done because of it.
[How]
Simplify the path and allow mailbox_rdy to be a functional check when
we detect VBIOS firmware.
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c index 60223efc6fc8..53f359f3fae2 100644 --- a/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c +++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c @@ -555,8 +555,14 @@ uint32_t dmub_dcn35_read_inbox0_ack_register(struct dmub_srv *dmub) bool dmub_dcn35_is_hw_powered_up(struct dmub_srv *dmub) { union dmub_fw_boot_status status; + uint32_t is_enable; + + REG_GET(DMCUB_CNTL, DMCUB_ENABLE, &is_enable); + if (is_enable == 0) + return false; status.all = REG_READ(DMCUB_SCRATCH0); - return status.bits.hw_power_init_done; + return (status.bits.dal_fw && status.bits.hw_power_init_done && status.bits.mailbox_rdy) || + (!status.bits.dal_fw && status.bits.mailbox_rdy); } diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c index fb66832dc996..cd97983cf759 100644 --- a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c +++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c @@ -800,20 +800,13 @@ enum dmub_status dmub_srv_cmd_execute(struct dmub_srv *dmub) bool dmub_srv_is_hw_pwr_up(struct dmub_srv *dmub) { - union dmub_fw_boot_status status; - if (!dmub->hw_funcs.is_hw_powered_up) return true; if (!dmub->hw_funcs.is_hw_powered_up(dmub)) return false; - if (!dmub->hw_funcs.is_hw_init(dmub)) - return false; - - status = dmub->hw_funcs.get_fw_status(dmub); - - return status.bits.dal_fw && status.bits.mailbox_rdy; + return true; } enum dmub_status dmub_srv_wait_for_hw_pwr_up(struct dmub_srv *dmub, |