Potential freesync Arithmetic Issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
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@xxxxxxx>
    Reviewed-by: Aric Cyr <Aric.Cyr@xxxxxxx>
    Acked-by: Anthony Koo <Anthony.Koo@xxxxxxx>
    Acked-by: Eryk Brol <eryk.brol@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>

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.
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux