These two flags halve and double, respectively, the effective refresh rate of a mode.
Signed-off-by: Aaron Plattner <aplatt...@nvidia.com> --- xrandr.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/xrandr.c b/xrandr.c index b0e8cec..54e0ca8 100644 --- a/xrandr.c +++ b/xrandr.c @@ -530,10 +530,22 @@ static double mode_refresh (XRRModeInfo *mode_info) { double rate; + unsigned int vTotal = mode_info->vTotal; + + if (mode_info->modeFlags & RR_DoubleScan) { + /* doublescan doubles the number of lines */ + vTotal *= 2; + } + + if (mode_info->modeFlags & RR_Interlace) { + /* interlace splits the frame into two fields */ + /* the field rate is what is typically reported by monitors */ + vTotal /= 2; + } - if (mode_info->hTotal && mode_info->vTotal) + if (mode_info->hTotal && vTotal) rate = ((double) mode_info->dotClock / - ((double) mode_info->hTotal * (double) mode_info->vTotal)); + ((double) mode_info->hTotal * (double) vTotal)); else rate = 0; return rate; -- 1.7.12 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel