drm/amd/display: Validate plane rects before use
authorAric Cyr <aric.cyr@amd.com>
Tue, 28 Sep 2021 20:05:27 +0000 (16:05 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Oct 2021 21:18:22 +0000 (17:18 -0400)
commit94e587b8d1bbfb9fbce5b158c2b63d1af6a73af1
treeec7370cee67887b619f27100fdd81569d84afdc0
parentb78f26d3efef70cc6dbaea1172059696e08f3465
drm/amd/display: Validate plane rects before use

[Why]
Calculation of scaling ratio can result in a crash due to zero'd src or
dst plane rects.

[How]
Validate that src and dst rects are valid before using for scaling
calculations.

Reviewed-by: Josip Pavic <Josip.Pavic@amd.com>
Acked-by: Agustin Gutierrez Sanchez <agustin.gutierrez@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@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