]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd877c7a3be7952e9e211b46f206241548aa24d04
treecc796e6b4fe557563947968d319ca4168efe31a5
parenta56d436f15f0e6e0258b7daa595246738c522e8a
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