From: Aurabindo Pillai <aurabindo.pillai@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
Leo Li <sunpeng.li@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>,
Dan Wheeler <daniel.wheeler@amd.com>, Ray Wu <Ray.Wu@amd.com>,
Ivan Lipski <ivan.lipski@amd.com>, Alex Hung <alex.hung@amd.com>,
Reza Amini <reza.amini@amd.com>,
Dillon Varone <dillon.varone@amd.com>
Subject: [PATCH 04/12] drm/amd/display: Decrease stack size in logging path
Date: Wed, 20 Aug 2025 16:19:54 -0400 [thread overview]
Message-ID: <20250820202103.1122706-5-aurabindo.pillai@amd.com> (raw)
In-Reply-To: <20250820202103.1122706-1-aurabindo.pillai@amd.com>
From: Reza Amini <reza.amini@amd.com>
[why]
Reducing stack size can avoid stack over flow
[how]
Make local variables const and static so they are not
on the stack.
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Reza Amini <reza.amini@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
---
drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
index 79c9bea78c47..d633033c98f2 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c
@@ -328,7 +328,7 @@ static void dcn10_log_hubp_states(struct dc *dc, void *log_ctx)
}
DTN_INFO("\n=======HUBP FL======\n");
- char pLabels[18][50] = {
+ static const char * const pLabels[] = {
"inst", "Enabled ", "Done ", "adr_mode ", "width ", "mpc_width ",
"tmz", "xbar_sel_R", "xbar_sel_G", "xbar_sel_B", "adr_hi ",
"adr_low", "REFCYC", "Bias", "Scale", "Mode",
@@ -552,7 +552,7 @@ static void dcn10_log_color_state(struct dc *dc,
dc->caps.color.mpc.ogam_ram,
dc->caps.color.mpc.ocsc);
DTN_INFO("===== MPC RMCM 3DLUT =====\n");
- char pLabels[19][50] = {
+ static const char * const pLabels[] = {
"MPCC", "SIZE", "MODE", "MODE_CUR", "RD_SEL",
"30BIT_EN", "WR_EN_MASK", "RAM_SEL", "OUT_NORM_FACTOR", "FL_SEL",
"OUT_OFFSET", "OUT_SCALE", "FL_DONE", "SOFT_UNDERFLOW", "HARD_UNDERFLOW",
--
2.50.1
next prev parent reply other threads:[~2025-08-20 20:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 20:19 [PATCH 00/12] DC Patches for 25 Aug 2025 Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 01/12] drm/amd/display: Add control flags to force PSR / replay Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 02/12] drm/amd/display: Reserve instance index notified by DMUB Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 03/12] drm/amd/display: track dpia support Aurabindo Pillai
2025-08-20 20:19 ` Aurabindo Pillai [this message]
2025-08-20 20:19 ` [PATCH 05/12] drm/amd/display: Support HW cursor 180 rot for any number of pipe splits Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 06/12] drm/amd/display: Multiplication result converted to larger type Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 07/12] drm/amd/display: Incorrect 'not' operator usage Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 08/12] drm/amd/display: wait for otg update pending latch before clock optimization Aurabindo Pillai
2025-08-20 20:19 ` [PATCH 09/12] drm/amd/display: Array offset used before range check Aurabindo Pillai
2025-08-20 20:20 ` [PATCH 10/12] drm/amd/display: Consider sink max slice width limitation for dsc Aurabindo Pillai
2025-08-20 20:20 ` [PATCH 11/12] drm/amd/display: [FW Promotion] Release 0.1.24.0 Aurabindo Pillai
2025-08-20 20:20 ` [PATCH 12/12] drm/amd/display: DC v3.2.347 Aurabindo Pillai
2025-08-25 13:20 ` [PATCH 00/12] DC Patches for 25 Aug 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=20250820202103.1122706-5-aurabindo.pillai@amd.com \
--to=aurabindo.pillai@amd.com \
--cc=Ray.Wu@amd.com \
--cc=alex.hung@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=chiahsuan.chung@amd.com \
--cc=daniel.wheeler@amd.com \
--cc=dillon.varone@amd.com \
--cc=harry.wentland@amd.com \
--cc=ivan.lipski@amd.com \
--cc=jerry.zuo@amd.com \
--cc=reza.amini@amd.com \
--cc=roman.li@amd.com \
--cc=sunpeng.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;
as well as URLs for NNTP newsgroup(s).