]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix crash during MPO + ODM combine mode recalculation
authorAric Cyr <aric.cyr@amd.com>
Tue, 25 May 2021 19:33:51 +0000 (15:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Jun 2021 16:23:28 +0000 (12:23 -0400)
commit665f28507a2a3d8d72ed9afa9a2b9b17fd43add1
tree612a7877042d9fc5423445a60629b50957ba33d8
parente4e3678260e9734f6f41b4325aac0b171833a618
drm/amd/display: Fix crash during MPO + ODM combine mode recalculation

[Why]
When calculating recout width for an MPO plane on a mode that's using
ODM combine, driver can calculate a negative value, resulting in a
crash.

[How]
For negative widths, use zero such that validation will prune the
configuration correctly and disallow MPO.

Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Reviewed-by: Krunoslav Kovac <Krunoslav.Kovac@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c