]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/display: fix incorrect mpc_combine array size
authorWenjing Liu <wenjing.liu@amd.com>
Thu, 18 Jan 2024 20:14:15 +0000 (15:14 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:37 +0000 (09:51 +0100)
commit0bd8ef618a42d7e6ea3f701065264e15678025e3
tree1e683b8edac6e3bd3d046b1cd1f38d79edce4083
parent32208e49450151eb812a587bc0268a4236c4ac18
drm/amd/display: fix incorrect mpc_combine array size

commit 39079fe8e660851abbafa90cd55cbf029210661f upstream.

[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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c