diff options
author | Hamza Mahfooz <hamza.mahfooz@amd.com> | 2023-09-05 13:27:22 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-09-06 14:32:39 -0400 |
commit | 084f658ece139645d203fa09c77c7f96cb849bb7 (patch) | |
tree | 02d14811fc4c5893fde3540fe2307a2436838826 /drivers/gpu/drm/amd/display/dc/clk_mgr | |
parent | 3b96ec9633ba13f8fad2c8de15fda8d993ecc13e (diff) | |
download | linux-stable-084f658ece139645d203fa09c77c7f96cb849bb7.tar.gz linux-stable-084f658ece139645d203fa09c77c7f96cb849bb7.tar.bz2 linux-stable-084f658ece139645d203fa09c77c7f96cb849bb7.zip |
drm/amd/display: prevent potential division by zero errors
There are two places in apply_below_the_range() where it's possible for
a divide by zero error to occur. So, to fix this make sure the divisor
is non-zero before attempting the computation in both cases.
Cc: stable@vger.kernel.org
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2637
Fixes: a463b263032f ("drm/amd/display: Fix frames_to_insert math")
Fixes: ded6119e825a ("drm/amd/display: Reinstate LFC optimization")
Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/clk_mgr')
0 files changed, 0 insertions, 0 deletions