diff options
| author | gdamore <gdamore@NetBSD.org> | 2006-05-09 17:51:03 +0000 |
|---|---|---|
| committer | gdamore <gdamore@NetBSD.org> | 2006-05-09 17:51:03 +0000 |
| commit | 1262ffef3151e40a545a968e55b7a77c1ce59b43 (patch) | |
| tree | f2536e95f013e1fb270d5cd37c3bac15662211aa /sys/dev/videomode | |
| parent | 78d31ae58cc222161599a00c590c6c4a56519ee3 (diff) | |
Handle interlace video refresh modes, so 1024x768i is 87Hz refresh, instead
of 43. This corresponds more closely to the mode name as defined by VESA.
Diffstat (limited to 'sys/dev/videomode')
| -rw-r--r-- | sys/dev/videomode/modelines2c.awk | 6 | ||||
| -rw-r--r-- | sys/dev/videomode/videomode.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/videomode/modelines2c.awk b/sys/dev/videomode/modelines2c.awk index 2aef6f0f792..d1467e01af2 100644 --- a/sys/dev/videomode/modelines2c.awk +++ b/sys/dev/videomode/modelines2c.awk @@ -1,5 +1,5 @@ #! /usr/bin/awk -f -# $NetBSD: modelines2c.awk,v 1.2 2006/03/08 23:46:27 lukem Exp $ +# $NetBSD: modelines2c.awk,v 1.3 2006/05/09 17:51:03 gdamore Exp $ # # Copyright (c) 2006 Itronix Inc. # All rights reserved. @@ -94,16 +94,18 @@ NR == 1 { if ($13 ~ "^-") vflags = "VN"; + ifactor=1.0; if ($14 ~ "[Ii][Nn][Tt][Ee][Rr][Ll][Aa][Cc][Ee]") { iflag = "i"; iflags = "|I"; + ifactor = 2.0; } # why the additional .1 to vrefresh? well it seems that awk likes to # make some "rounding errors", and this will compensate hrefresh= (dotclock * 1000000) / htotal; - vrefresh= int((hrefresh / vtotal) + .1); + vrefresh= int(((hrefresh * ifactor) / vtotal) + .1); modestr = sprintf("%dx%dx%d%s", hdisplay, vdisplay, vrefresh, iflag); diff --git a/sys/dev/videomode/videomode.c b/sys/dev/videomode/videomode.c index 07385cb78c5..db070292230 100644 --- a/sys/dev/videomode/videomode.c +++ b/sys/dev/videomode/videomode.c @@ -1,4 +1,4 @@ -/* $NetBSD: videomode.c,v 1.2 2006/03/04 02:37:24 gdamore Exp $ */ +/* $NetBSD: videomode.c,v 1.3 2006/05/09 17:51:03 gdamore Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. @@ -34,7 +34,7 @@ M("800x600x60",800,600,40000,840,968,1056,601,605,628,HP|VP), M("800x600x72",800,600,50000,856,976,1040,637,643,666,HP|VP), M("800x600x75",800,600,49500,816,896,1056,601,604,625,HP|VP), M("800x600x85",800,600,56300,832,896,1048,601,604,631,HP|VP), -M("1024x768x43i",1024,768,44900,1032,1208,1264,768,776,817,HP|VP|I), +M("1024x768x87i",1024,768,44900,1032,1208,1264,768,776,817,HP|VP|I), M("1024x768x60",1024,768,65000,1048,1184,1344,771,777,806,HN|VN), M("1024x768x70",1024,768,75000,1048,1184,1328,771,777,806,HN|VN), M("1024x768x75",1024,768,78800,1040,1136,1312,769,772,800,HP|VP), @@ -75,7 +75,7 @@ M("400x300x60",400,300,20000,420,484,528,300,302,314,HP|VP|DS), M("400x300x72",400,300,25000,428,488,520,318,321,333,HP|VP|DS), M("400x300x75",400,300,24750,408,448,528,300,302,312,HP|VP|DS), M("400x300x85",400,300,28150,416,448,524,300,302,315,HP|VP|DS), -M("512x384x43i",512,384,22450,516,604,632,384,388,408,HP|VP|DS|I), +M("512x384x87i",512,384,22450,516,604,632,384,388,408,HP|VP|DS|I), M("512x384x60",512,384,32500,524,592,672,385,388,403,HN|VN|DS), M("512x384x70",512,384,37500,524,592,664,385,388,403,HN|VN|DS), M("512x384x75",512,384,39400,520,568,656,384,386,400,HP|VP|DS), |
