Module Name:    src
Committed By:   jdc
Date:           Mon Mar 21 19:34:27 UTC 2011

Modified Files:
        src/sys/dev/videomode: edid.c

Log Message:
Correct "832x624x74".
Update comments.
Reverse iteratiion, so that modes are in established timing order.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/videomode/edid.c

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/edid.c
diff -u src/sys/dev/videomode/edid.c:1.6 src/sys/dev/videomode/edid.c:1.7
--- src/sys/dev/videomode/edid.c:1.6	Sat Nov 14 09:19:41 2009
+++ src/sys/dev/videomode/edid.c	Mon Mar 21 19:34:27 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: edid.c,v 1.6 2009/11/14 09:19:41 tsutsui Exp $ */
+/* $NetBSD: edid.c,v 1.7 2011/03/21 19:34:27 jdc Exp $ */
 
 /*-
  * Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
  */ 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: edid.c,v 1.6 2009/11/14 09:19:41 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: edid.c,v 1.7 2011/03/21 19:34:27 jdc Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -48,13 +48,14 @@
 #define	EDIDVERBOSE	1
 #define	DIVIDE(x,y)	(((x) + ((y) / 2)) / (y))
 
+/* These are reversed established timing order */
 static const char *_edid_modes[] =  {
 	"1280x1024x75",
 	"1024x768x75",
 	"1024x768x70",
 	"1024x768x60",
 	"1024x768x87i",
-	"832x768x74",	/* rounding error, 74.55 Hz aka "832x624x75" */
+	"832x624x74",	/* rounding error, 74.55 Hz aka "832x624x75" */
 	"800x600x75",
 	"800x600x72",
 	"800x600x60",
@@ -63,8 +64,8 @@
 	"640x480x72",
 	"640x480x67",
 	"640x480x60",
-	"720x400x85",	/* should this really be "720x400x88" ? */
-	"720x400x70",	/* hmm... videmode.c doesn't have this one */
+	"720x400x87",	/* rounding error, 87.85 Hz aka "720x400x88" */
+	"720x400x70",
 };
 
 #ifdef	EDIDVERBOSE
@@ -542,7 +543,8 @@
 	edid->edid_nmodes = 0;
 	edid->edid_preferred_mode = NULL;
 	estmodes = EDID_EST_TIMING(data);
-	for (i = 0; i < 16; i++) {
+	/* Iterate in esztablished timing order */
+	for (i = 15; i >= 0; i--) {
 		if (estmodes & (1 << i)) {
 			vmp = edid_mode_lookup_list(_edid_modes[i]);
 			if (vmp != NULL) {

Reply via email to