aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/inc
diff options
context:
space:
mode:
authorJoshua Aberback <joshua.aberback@amd.com>2025-03-14 18:33:43 -0400
committerAlex Deucher <alexander.deucher@amd.com>2025-04-07 15:18:36 -0400
commit7b9f8698796f44ac2b551d485a8e5e9aaa761812 (patch)
tree923f5f881508aac4c1e19b2f8344209b28028946 /drivers/gpu/drm/amd/display/dc/inc
parentdrm/amd/display: Set ODM Factor Based On DML Architecture (diff)
downloadlinux-7b9f8698796f44ac2b551d485a8e5e9aaa761812.tar.gz
linux-7b9f8698796f44ac2b551d485a8e5e9aaa761812.zip
drm/amd/display: Use meaningful size for block_sequence array
[Why] This array was initially defined as size 50. There were array overflow issues so the size was increased to 100. To ensure such issues are avoided in the future, the size should be set based on the possible contents instead of an arbitrary value. [How] - upper bound, assume every update occurs on max number of pipes - define array sizes for function parameters, for static analysis Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Joshua Aberback <joshua.aberback@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc')
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/core_types.h2
1 files changed, 1 insertions, 1 deletions
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 c1c8742d4a58..338bc240e803 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -630,7 +630,7 @@ struct dc_state {
*/
struct bw_context bw_ctx;
- struct block_sequence block_sequence[100];
+ struct block_sequence block_sequence[MAX_HWSS_BLOCK_SEQUENCE_SIZE];
unsigned int block_sequence_steps;
struct dc_dmub_cmd dc_dmub_cmd[10];
unsigned int dmub_cmd_count;