Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/videomode Parse the extension block count field, and...
details: https://anonhg.NetBSD.org/src/rev/e4366c227aa3
branches: trunk
changeset: 333795:e4366c227aa3
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Nov 17 00:46:04 2014 +0000
description:
Parse the extension block count field, and make it available in struct edid_info
diffstat:
sys/dev/videomode/edid.c | 8 ++++++--
sys/dev/videomode/edidreg.h | 4 +++-
sys/dev/videomode/edidvar.h | 3 ++-
3 files changed, 11 insertions(+), 4 deletions(-)
diffs (69 lines):
diff -r 03e339915cd0 -r e4366c227aa3 sys/dev/videomode/edid.c
--- a/sys/dev/videomode/edid.c Sun Nov 16 21:34:27 2014 +0000
+++ b/sys/dev/videomode/edid.c Mon Nov 17 00:46:04 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edid.c,v 1.12 2013/02/08 16:35:10 skrll Exp $ */
+/* $NetBSD: edid.c,v 1.13 2014/11/17 00:46:04 jmcneill Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: edid.c,v 1.12 2013/02/08 16:35:10 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: edid.c,v 1.13 2014/11/17 00:46:04 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -286,6 +286,8 @@
DIVIDE(DIVIDE(edid->edid_preferred_mode->dot_clock * 1000,
edid->edid_preferred_mode->htotal),
edid->edid_preferred_mode->vtotal));
+
+ printf("Number of extension blocks: %d\n", edid->edid_ext_block_count);
}
static const struct videomode *
@@ -569,6 +571,8 @@
edid->edid_chroma.ec_whitex = EDID_CHROMA_WHITEX(data);
edid->edid_chroma.ec_whitey = EDID_CHROMA_WHITEY(data);
+ edid->edid_ext_block_count = EDID_EXT_BLOCK_COUNT(data);
+
/* lookup established modes */
edid->edid_nmodes = 0;
edid->edid_preferred_mode = NULL;
diff -r 03e339915cd0 -r e4366c227aa3 sys/dev/videomode/edidreg.h
--- a/sys/dev/videomode/edidreg.h Sun Nov 16 21:34:27 2014 +0000
+++ b/sys/dev/videomode/edidreg.h Mon Nov 17 00:46:04 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edidreg.h,v 1.3 2011/03/30 18:49:56 jdc Exp $ */
+/* $NetBSD: edidreg.h,v 1.4 2014/11/17 00:46:04 jmcneill Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -250,4 +250,6 @@
#define EDID_DESC_STD_TIMING_START 5
#define EDID_DESC_STD_TIMING_COUNT 6
+#define EDID_EXT_BLOCK_COUNT(ptr) ((ptr)[126])
+
#endif /* _DEV_VIDEOMODE_EDIDREG_H */
diff -r 03e339915cd0 -r e4366c227aa3 sys/dev/videomode/edidvar.h
--- a/sys/dev/videomode/edidvar.h Sun Nov 16 21:34:27 2014 +0000
+++ b/sys/dev/videomode/edidvar.h Mon Nov 17 00:46:04 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edidvar.h,v 1.2 2006/05/11 19:05:41 gdamore Exp $ */
+/* $NetBSD: edidvar.h,v 1.3 2014/11/17 00:46:04 jmcneill Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -75,6 +75,7 @@
uint8_t edid_max_vsize; /* in cm */
uint8_t edid_gamma;
uint8_t edid_features;
+ uint8_t edid_ext_block_count;
int edid_have_range;
struct edid_range edid_range;
Home |
Main Index |
Thread Index |
Old Index