]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:31:53 +0000 (14:31 +0200)
commit53ce3ffe7b09dbe5c8a902e287e4670a04e6f270
tree75496bc6ba483e212bb9c864d5bf4a1355f5eb55
parentb4d89d5cb794e76ebdc6c4b001edbac419dd6821
drm/amd/display: Check for invalid input params when building scaling params

[ Upstream commit 73b1da69f5314d96e1f963468863eaa884ee1030 ]

[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>
Stable-dep-of: 374c9faac5a7 ("drm/amd/display: Fix null check for pipe_ctx->plane_state in resource_build_scaling_params")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c