diff options
| author | jdc <jdc@NetBSD.org> | 2011-03-21 19:34:27 +0000 |
|---|---|---|
| committer | jdc <jdc@NetBSD.org> | 2011-03-21 19:34:27 +0000 |
| commit | b781dcba190a0fde38d2cfaf497218dfd64934a5 (patch) | |
| tree | 3480bfc7ee3be83f84960a5b8d4de543e113849f /sys/dev/videomode/edid.c | |
| parent | 887295dc0c3f6605af706c603873f0cffa788acf (diff) | |
Correct "832x624x74".
Update comments.
Reverse iteratiion, so that modes are in established timing order.
Diffstat (limited to 'sys/dev/videomode/edid.c')
| -rw-r--r-- | sys/dev/videomode/edid.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/videomode/edid.c b/sys/dev/videomode/edid.c index baeaff991b6..cc1e93a52e5 100644 --- a/sys/dev/videomode/edid.c +++ b/sys/dev/videomode/edid.c @@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: edid.c,v 1.6 2009/11/14 09:19:41 tsutsui Exp $"); #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 @@ static const char *_edid_modes[] = { "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_parse(uint8_t *data, struct edid_info *edid) 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) { |
