]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Remove redundant macro of refresh rate
authorWeiguang Li <wei-guang.li@amd.com>
Thu, 12 Jun 2025 03:10:12 +0000 (11:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jun 2025 13:55:58 +0000 (09:55 -0400)
[Why&How]
Found that we add redundant macro on refresh rate when calculating vtotal,
so we remove it.

Reviewed-by: Robin Chen <robin.chen@amd.com>
Signed-off-by: Weiguang Li <wei-guang.li@amd.com>
Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/modules/freesync/freesync.c

index 3ba9b62ba70b8d512e9c555a751a593f6d217739..6a939f2f2fb9ac9c68f0b50373f026909ce09299 100644 (file)
@@ -147,7 +147,7 @@ unsigned int mod_freesync_calc_v_total_from_refresh(
                        ((unsigned int)(div64_u64((1000000000ULL * 1000000),
                                        refresh_in_uhz)));
 
-       if (MICRO_HZ_TO_HZ(refresh_in_uhz) <= stream->timing.min_refresh_in_uhz) {
+       if (refresh_in_uhz <= stream->timing.min_refresh_in_uhz) {
                /* When the target refresh rate is the minimum panel refresh rate,
                 * round down the vtotal value to avoid stretching vblank over
                 * panel's vtotal boundary.