From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
amd-gfx@lists.freedesktop.org
Cc: Harry.Wentland@amd.com, Sunpeng.Li@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
Subject: Re: [PATCH 04/17] drm/amd/display: Add SMU timeout check and retry
Date: Wed, 14 Feb 2024 13:47:01 -0500 [thread overview]
Message-ID: <1608e6b9-9ac2-4f32-a37b-bd487cedfad9@amd.com> (raw)
In-Reply-To: <20240214184006.1356137-5-Rodrigo.Siqueira@amd.com>
On 2/14/24 13:38, Rodrigo Siqueira wrote:
> Instead of only asserting in the case of the SMU wait time is not what
> we expect, add the SMU timeout check and try again.
>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
> ---
> .../display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c | 11 ++++++++---
> .../drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c | 6 +++++-
> 2 files changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c
> index d72acbb049b1..23b390245b5d 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr_vbios_smu.c
> @@ -26,6 +26,10 @@
> #include "core_types.h"
> #include "clk_mgr_internal.h"
> #include "reg_helper.h"
> +#include "dm_helpers.h"
> +
> +#include "rn_clk_mgr_vbios_smu.h"
> +
> #include <linux/delay.h>
>
> #include "renoir_ip_offset.h"
> @@ -33,8 +37,6 @@
> #include "mp/mp_12_0_0_offset.h"
> #include "mp/mp_12_0_0_sh_mask.h"
>
> -#include "rn_clk_mgr_vbios_smu.h"
> -
> #define REG(reg_name) \
> (MP0_BASE.instance[0].segment[mm ## reg_name ## _BASE_IDX] + mm ## reg_name)
>
> @@ -120,7 +122,10 @@ static int rn_vbios_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
>
> result = rn_smu_wait_for_response(clk_mgr, 10, 200000);
>
> - ASSERT(result == VBIOSSMC_Result_OK || result == VBIOSSMC_Result_UnknownCmd);
> + if (IS_SMU_TIMEOUT(result)) {
> + ASSERT(0);
> + dm_helpers_smu_timeout(CTX, msg_id, param, 10 * 200000);
> + }
>
> /* Actual dispclk set is returned in the parameter register */
> return REG_READ(MP1_SMN_C2PMSG_83);
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c
> index 19e5b3be9275..b4fb17b7a096 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/dcn301_smu.c
> @@ -29,6 +29,7 @@
> #include <linux/delay.h>
>
> #include "dcn301_smu.h"
> +#include "dm_helpers.h"
>
> #include "vangogh_ip_offset.h"
>
> @@ -120,7 +121,10 @@ static int dcn301_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,
>
> result = dcn301_smu_wait_for_response(clk_mgr, 10, 200000);
>
> - ASSERT(result == VBIOSSMC_Result_OK);
> + if (IS_SMU_TIMEOUT(result)) {
> + ASSERT(0);
> + dm_helpers_smu_timeout(CTX, msg_id, param, 10 * 200000);
> + }
>
> /* Actual dispclk set is returned in the parameter register */
> return REG_READ(MP1_SMN_C2PMSG_83);
--
Hamza
next prev parent reply other threads:[~2024-02-14 18:47 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 [this message]
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 ` [PATCH 08/17] drm/amd/display: Fix S4 hang polling on HW power up done for VBIOS DMCUB Rodrigo Siqueira
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=1608e6b9-9ac2-4f32-a37b-bd487cedfad9@amd.com \
--to=hamza.mahfooz@amd.com \
--cc=Aurabindo.Pillai@amd.com \
--cc=Harry.Wentland@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Sunpeng.Li@amd.com \
--cc=agustin.gutierrez@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chiahsuan.chung@amd.com \
--cc=hersenxs.wu@amd.com \
--cc=jerry.zuo@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