drm/amd/display: Check for invalid input params when building scaling params
authorMichael Strauss <michael.strauss@amd.com>
Wed, 23 Mar 2022 20:06:25 +0000 (16:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Apr 2022 14:29:48 +0000 (10:29 -0400)
commit73b1da69f5314d96e1f963468863eaa884ee1030
treecc796e6b4fe557563947968d319ca4168efe31a5
parent176cd4385aea1e1c1e41c1b8e02764558e4f6a3c
drm/amd/display: Check for invalid input params when building scaling params

[WHY]
Function to calculate scaling ratios can be called with invalid plane
src/dest, causing a divide by zero.

[HOW]
Fail building scaling params if plane state src/dest rects are
unpopulated

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Michael Strauss <michael.strauss@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c