This is now runtime tested, so the "compile tested only" note under the
--- in the original posting is out of date.
I rebuilt my distro kernel (CachyOS 7.2.2, same source and config, clang
ThinLTO, generic x86_64) with this patch applied. Hardware is Navi 23
(RX 6600, DCN 3.0.2) driving an ASUS XG279CNS over DisplayPort at
1920x1080, VRR range 48-360.
Unpatched:
- the WARN fired once per boot, at the compositor's first modeset
- after resetting /sys/kernel/debug/clear_warn_once it reproduced on
demand at 280 Hz and 360 Hz, and never at or below 240 Hz, which
matches the ~243 Hz threshold in the commit message
Patched:
- no WARN at boot
- no WARN at 280 Hz or 360 Hz, with clear_warn_once reset before each
mode, so those are independent negatives rather than one suppressed
warning
- the function no longer bails out of the hysteresis calculation at
those refresh rates
No display problems observed on the patched kernel.
Thanks,
Francis