Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/videomode Correct "832x624x74".



details:   https://anonhg.NetBSD.org/src/rev/5fc51ad98c75
branches:  trunk
changeset: 763488:5fc51ad98c75
user:      jdc <jdc%NetBSD.org@localhost>
date:      Mon Mar 21 19:34:27 2011 +0000

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

diffstat:

 sys/dev/videomode/edid.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 98347f023e70 -r 5fc51ad98c75 sys/dev/videomode/edid.c
--- a/sys/dev/videomode/edid.c  Mon Mar 21 19:32:26 2011 +0000
+++ b/sys/dev/videomode/edid.c  Mon Mar 21 19:34:27 2011 +0000
@@ -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) {



Home | Main Index | Thread Index | Old Index