From: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: <Harry.Wentland@amd.com>, <Sunpeng.Li@amd.com>,
<Rodrigo.Siqueira@amd.com>, <Aurabindo.Pillai@amd.com>,
<roman.li@amd.com>, <wayne.lin@amd.com>,
<agustin.gutierrez@amd.com>, <chiahsuan.chung@amd.com>,
<hersenxs.wu@amd.com>, <jerry.zuo@amd.com>,
Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>,
Charlene Liu <charlene.liu@amd.com>,
"Rodrigo Siqueira" <rodrigo.siqueira@amd.com>
Subject: [PATCH 08/17] drm/amd/display: Fix S4 hang polling on HW power up done for VBIOS DMCUB
Date: Wed, 14 Feb 2024 11:38:39 -0700 [thread overview]
Message-ID: <20240214184006.1356137-9-Rodrigo.Siqueira@amd.com> (raw)
In-Reply-To: <20240214184006.1356137-1-Rodrigo.Siqueira@amd.com>
From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
[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>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
---
drivers/gpu/drm/amd/display/dmub/src/dmub_dcn35.c | 8 +++++++-
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,
--
2.43.0
next prev parent reply other threads:[~2024-02-14 18:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 18:38 [PATCH 00/17] DC Patches February 14, 2024 Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 01/17] drm/amd/display: Remove break after return Rodrigo Siqueira
2024-02-14 18:47 ` Hamza Mahfooz
2024-02-14 18:38 ` [PATCH 02/17] drm/amd/display: Initialize variable with default value Rodrigo Siqueira
2024-02-14 18:48 ` Hamza Mahfooz
2024-02-14 18:38 ` [PATCH 03/17] drm/amd/display: Remove unused file Rodrigo Siqueira
2024-02-14 18:48 ` Hamza Mahfooz
2024-02-14 18:38 ` [PATCH 04/17] drm/amd/display: Add SMU timeout check and retry Rodrigo Siqueira
2024-02-14 18:47 ` Hamza Mahfooz
2024-02-14 18:38 ` [PATCH 05/17] drm/amd/display: Remove redundant FPU guard Rodrigo Siqueira
2024-02-14 18:48 ` Hamza Mahfooz
2024-02-14 18:38 ` [PATCH 06/17] drm/amd/display: adjust few initialization order in dm Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 07/17] drm/amd/display: Only allow dig mapping to pwrseq in new asic Rodrigo Siqueira
2024-02-14 18:38 ` Rodrigo Siqueira [this message]
2024-02-14 18:38 ` [PATCH 09/17] drm/amd/display: Check DP Alt mode DPCS state via DMUB Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 10/17] drm/amd/display: Generalize new minimal transition path Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 11/17] drm/amd/display: fix input states translation error for dcn35 & dcn351 Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 12/17] drm/amd/display: Only log during optimize_bandwidth call Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 13/17] drm/amd/display: Remove pixle rate limit for subvp Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 14/17] drm/amd/display: reenable windowed mpo odm support on dcn32 and dcn321 Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 15/17] drm/amd/display: Drop unnecessary header Rodrigo Siqueira
2024-02-14 18:49 ` Hamza Mahfooz
2024-02-14 18:38 ` [PATCH 16/17] drm/amd/display: Fix nanosec stat overflow Rodrigo Siqueira
2024-02-14 18:38 ` [PATCH 17/17] drm/amd/display: 3.2.273 Rodrigo Siqueira
2024-02-15 21:26 ` [PATCH 00/17] DC Patches February 14, 2024 Wheeler, Daniel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240214184006.1356137-9-Rodrigo.Siqueira@amd.com \
--to=rodrigo.siqueira@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=agustin.gutierrez@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=charlene.liu@amd.com \
--cc=chiahsuan.chung@amd.com \
--cc=hersenxs.wu@amd.com \
--cc=jerry.zuo@amd.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=roman.li@amd.com \
--cc=wayne.lin@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox