Skip to content
Commit ff536a96 authored by Hamza Mahfooz's avatar Hamza Mahfooz Committed by Greg Kroah-Hartman
Browse files

drm/amd/display: prevent potential division by zero errors

commit 07e388aa upstream.

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: a463b263 ("drm/amd/display: Fix frames_to_insert math")
Fixes: ded6119e ("drm/amd/display: Reinstate LFC optimization")
Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarHamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e1769b1d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment