From: Wayne Lin <Wayne.Lin@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
Leo Li <sunpeng.li@amd.com>,
Rodrigo Siqueira <rodrigo.siqueira@amd.com>,
Aurabindo Pillai <aurabindo.pillai@amd.com>,
Roman Li <roman.li@amd.com>, Wayne Lin <wayne.lin@amd.com>,
Tom Chung <chiahsuan.chung@amd.com>,
Fangzhi Zuo <jerry.zuo@amd.com>,
Zaeem Mohamed <zaeem.mohamed@amd.com>,
Solomon Chiu <solomon.chiu@amd.com>,
Daniel Wheeler <daniel.wheeler@amd.com>,
"Joshua Aberback" <joshua.aberback@amd.com>,
Alvin Lee <alvin.lee2@amd.com>
Subject: [PATCH 06/11] drm/amd/display: Increase block_sequence array size
Date: Tue, 14 Jan 2025 10:08:55 +0800 [thread overview]
Message-ID: <20250114020900.3804152-7-Wayne.Lin@amd.com> (raw)
In-Reply-To: <20250114020900.3804152-1-Wayne.Lin@amd.com>
From: Joshua Aberback <joshua.aberback@amd.com>
[Why]
It's possible to generate more than 50 steps in hwss_build_fast_sequence,
for example with a 6-pipe asic where all pipes are in one MPC chain. This
overflows the block_sequence buffer and corrupts block_sequence_steps,
causing a crash.
[How]
Expand block_sequence to 100 items. A naive upper bound on the possible
number of steps for a 6-pipe asic, ignoring the potential for steps to be
mutually exclusive, is 91 with current code, therefore 100 is sufficient.
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Joshua Aberback <joshua.aberback@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
index d558efc6e12f..652d52040f4e 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -627,7 +627,7 @@ struct dc_state {
*/
struct bw_context bw_ctx;
- struct block_sequence block_sequence[50];
+ struct block_sequence block_sequence[100];
unsigned int block_sequence_steps;
struct dc_dmub_cmd dc_dmub_cmd[10];
unsigned int dmub_cmd_count;
--
2.37.3
next prev parent reply other threads:[~2025-01-14 2:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 2:08 [PATCH 00/11] DC Patches Jan 20 2025 Wayne Lin
2025-01-14 2:08 ` [PATCH 01/11] drm/amd/display: Support "Broadcast RGB" drm property Wayne Lin
2025-01-14 2:08 ` [PATCH 02/11] drm/amd/display: log destination of vertical interrupt Wayne Lin
2025-01-14 2:08 ` [PATCH 03/11] drm/amd/display: Add AS SDP programming for UHBR link rate Wayne Lin
2025-01-14 2:08 ` [PATCH 04/11] drm/amd/display: Populate register address for dentist for dcn401 Wayne Lin
2025-01-14 2:08 ` [PATCH 05/11] drm/amd/display: Use Nominal vBlank If Provided Instead Of Capping It Wayne Lin
2025-01-14 2:08 ` Wayne Lin [this message]
2025-01-14 2:08 ` [PATCH 07/11] drm/amd/display: Optimize cursor position updates Wayne Lin
2025-01-14 2:08 ` [PATCH 08/11] drm/amd/display: Add hubp cache reset when powergating Wayne Lin
2025-01-14 2:08 ` [PATCH 09/11] drm/amd/display: Exclude clkoffset and ips setting for dcn351 specific Wayne Lin
2025-01-14 2:08 ` [PATCH 10/11] drm/amd/display: Reverse the visual confirm recouts Wayne Lin
2025-01-14 2:09 ` [PATCH 11/11] drm/amd/display: 3.2.317 Wayne Lin
2025-01-20 14:03 ` [PATCH 00/11] DC Patches Jan 20 2025 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=20250114020900.3804152-7-Wayne.Lin@amd.com \
--to=wayne.lin@amd.com \
--cc=alvin.lee2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aurabindo.pillai@amd.com \
--cc=chiahsuan.chung@amd.com \
--cc=daniel.wheeler@amd.com \
--cc=harry.wentland@amd.com \
--cc=jerry.zuo@amd.com \
--cc=joshua.aberback@amd.com \
--cc=rodrigo.siqueira@amd.com \
--cc=roman.li@amd.com \
--cc=solomon.chiu@amd.com \
--cc=sunpeng.li@amd.com \
--cc=zaeem.mohamed@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