mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 09:09:55 -04:00
drm/amd/display: Decrease stack size in logging path
[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> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user