Potential freesync Arithmetic Issue
Bryan Angelo
bangelo at gmail.com
Wed Oct 28 17:39:24 UTC 2020
While looking at the following commit, I noticed what might be an
arithmetic issue potentially stemming from some merge/patch conflict
resolution.
commit ad339f69114a6a145fc94d44376851c53dee3475
Author: Jaehyun Chung <jaehyun.chung at amd.com>
Date: Thu Jun 18 15:27:35 2020 -0400
drm/amd/display: Fix incorrect rounding for 10Hz refresh range
[Why]
In cases where refresh range is slightly below 10, FreeSync is not
active or supported. Need to round values before checking refresh range
in order to have FreeSync supported in these cases.
[How]
Remove redundant values and round values before checking valid refresh
range.
Signed-off-by: Jaehyun Chung <jaehyun.chung at amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr at amd.com>
Acked-by: Anthony Koo <Anthony.Koo at amd.com>
Acked-by: Eryk Brol <eryk.brol at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
There appears to be an errant plus sign when calculating the refresh_range
-
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/display/modules/freesync/freesync.c?h=v5.10-rc1#n948
refresh_range = div_u64(in_out_vrr->max_refresh_in_uhz + 500000, 1000000)
-
+ div_u64(in_out_vrr->min_refresh_in_uhz + 500000, 1000000);
I am unfamiliar with the freesync codebase so I opted to present the
potential issue here as opposed to preparing a patch.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20201028/62c96b06/attachment-0001.htm>
More information about the amd-gfx
mailing list