Skip to content

Commit 39079fe

Browse files
Wenjing Liualexdeucher
authored andcommitted
drm/amd/display: fix incorrect mpc_combine array size
[why] MAX_SURFACES is per stream, while MAX_PLANES is per asic. The mpc_combine is an array that records all the planes per asic. Therefore MAX_PLANES should be used as the array size. Using MAX_SURFACES causes array overflow when there are more than 3 planes. [how] Use the MAX_PLANES for the mpc_combine array size. Cc: Mario Limonciello <mario.limonciello@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com> Reviewed-by: Nevenko Stupar <nevenko.stupar@amd.com> Reviewed-by: Chaitanya Dhere <chaitanya.dhere@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 31c2bf2 commit 39079fe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ struct pipe_slice_table {
11121112
struct pipe_ctx *pri_pipe;
11131113
struct dc_plane_state *plane;
11141114
int slice_count;
1115-
} mpc_combines[MAX_SURFACES];
1115+
} mpc_combines[MAX_PLANES];
11161116
int mpc_combine_count;
11171117
};
11181118

0 commit comments

Comments
 (0)