Module Name: src
Committed By: jdc
Date: Mon Mar 21 19:32:27 UTC 2011
Modified Files:
src/sys/dev/videomode: modelines2c.awk
Log Message:
Clarify vrefresh comment (no functional change)
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/videomode/modelines2c.awk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/videomode/modelines2c.awk
diff -u src/sys/dev/videomode/modelines2c.awk:1.4 src/sys/dev/videomode/modelines2c.awk:1.5
--- src/sys/dev/videomode/modelines2c.awk:1.4 Thu Oct 26 23:19:50 2006
+++ src/sys/dev/videomode/modelines2c.awk Mon Mar 21 19:32:26 2011
@@ -1,5 +1,5 @@
#! /usr/bin/awk -f
-# $NetBSD: modelines2c.awk,v 1.4 2006/10/26 23:19:50 bjh21 Exp $
+# $NetBSD: modelines2c.awk,v 1.5 2011/03/21 19:32:26 jdc Exp $
#
# Copyright (c) 2006 Itronix Inc.
# All rights reserved.
@@ -104,8 +104,9 @@
ifactor = 2.0;
}
- # why the additional .1 to vrefresh? well it seems that awk likes to
- # make some "rounding errors", and this will compensate
+ # We truncate the vrefresh figure, but some mode descriptions rely
+ # on rounding, so we can't win here. Adding an additional .1
+ # compensates to some extent.
hrefresh= (dotclock * 1000000) / htotal;
vrefresh= int(((hrefresh * ifactor) / vtotal) + .1);