summaryrefslogtreecommitdiff
path: root/hw/xfree86/ddc
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2007-12-28 13:55:39 -0500
committerAdam Jackson <ajax@redhat.com>2007-12-28 16:53:16 -0500
commitf6df66cc89bcd0a0be2e7bca05839fdd428c1d4c (patch)
treef6719846ed4250cbc5a34a166f4a457c81befbc2 /hw/xfree86/ddc
parentbac3ecde39cc914ab515991234b7dc2138005b84 (diff)
EDID 1.4: Trivial support for new detailed sections.
Nothing actually decoded yet, but at least we print what they are. New in EDID 1.4: - Color Management Data (0xF9), Section 3.10.3.7 - CVT 3 Byte Code Descriptor (0xF8), Section 3.10.3.8 - Established Timings III Descriptor (0xF7), section 3.10.3.9 - Manufacturer-specified data tag (0x00 - 0x0F), section 3.10.3.12
Diffstat (limited to 'hw/xfree86/ddc')
-rw-r--r--hw/xfree86/ddc/edid.h8
-rw-r--r--hw/xfree86/ddc/interpret_edid.c38
-rw-r--r--hw/xfree86/ddc/print_edid.c17
3 files changed, 60 insertions, 3 deletions
diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index 02f5d09c5..2e3e7df4f 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -286,6 +286,9 @@
#define _WHITE_GAMMA2(x) _GAMMA(x[14])
#define WHITE_GAMMA2 _WHITE_GAMMA2(c)
#define ADD_STD_TIMINGS 0xFA
+#define COLOR_MANAGEMENT_DATA 0xF9
+#define CVT_3BYTE_DATA 0xF8
+#define ADD_EST_TIMINGS 0xF7
#define ADD_DUMMY 0x10
#define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN))
@@ -418,8 +421,13 @@ struct detailed_timings {
#define DS_RANGES 0xFD
#define DS_WHITE_P 0xFB
#define DS_STD_TIMINGS 0xFA
+#define DS_CMD 0xF9
+#define DS_CVT 0xF8
+#define DS_EST_III 0xF7
#define DS_DUMMY 0x10
#define DS_UNKOWN 0x100 /* type is an int */
+#define DS_VENDOR 0x101
+#define DS_VENDOR_MAX 0x110
struct monitor_ranges {
int min_v;
diff --git a/hw/xfree86/ddc/interpret_edid.c b/hw/xfree86/ddc/interpret_edid.c
index 7b4b2b9ec..ecec2b039 100644
--- a/hw/xfree86/ddc/interpret_edid.c
+++ b/hw/xfree86/ddc/interpret_edid.c
@@ -1,8 +1,28 @@
-
-/* interpret_edid.c: interpret a primary EDID block
- *
+/*
* Copyright 1998 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE>
+ * Copyright 2007 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software")
+ * to deal in the software without restriction, including without limitation
+ * on the rights to use, copy, modify, merge, publish, distribute, sub
+ * license, and/or sell copies of the Software, and to permit persons to whom
+ * them Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * interpret_edid.c: interpret a primary EDID block
*/
+
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>
#endif
@@ -207,6 +227,15 @@ get_dt_md_section(Uchar *c, struct edid_version *ver,
det_mon[i].type = DS_STD_TIMINGS;
get_dst_timing_section(c,det_mon[i].section.std_t, ver);
break;
+ case COLOR_MANAGEMENT_DATA:
+ det_mon[i].type = DS_CMD;
+ break;
+ case CVT_3BYTE_DATA:
+ det_mon[i].type = DS_CVT;
+ break;
+ case ADD_EST_TIMINGS:
+ det_mon[i].type = DS_EST_III;
+ break;
case ADD_DUMMY:
det_mon[i].type = DS_DUMMY;
break;
@@ -214,6 +243,9 @@ get_dt_md_section(Uchar *c, struct edid_version *ver,
det_mon[i].type = DS_UNKOWN;
break;
}
+ if (c[3] <= 0x0F) {
+ det_mon[i].type = DS_VENDOR + c[3];
+ }
} else {
det_mon[i].type = DT;
get_detailed_timing_section(c,&det_mon[i].section.d_timings);
diff --git a/hw/xfree86/ddc/print_edid.c b/hw/xfree86/ddc/print_edid.c
index 30b607d4f..17e21aca8 100644
--- a/hw/xfree86/ddc/print_edid.c
+++ b/hw/xfree86/ddc/print_edid.c
@@ -290,10 +290,27 @@ print_detailed_monitor_section(int scrnIndex,
m[i].section.wp[j].white_y,
m[i].section.wp[j].white_gamma);
break;
+ case DS_CMD:
+ xf86DrvMsg(scrnIndex, X_INFO,
+ "Color management data: (not decoded)\n");
+ break;
+ case DS_CVT:
+ xf86DrvMsg(scrnIndex, X_INFO,
+ "CVT 3-byte-code modes: (not decoded)\n");
+ break;
+ case DS_EST_III:
+ xf86DrvMsg(scrnIndex, X_INFO,
+ "Established timings III: (not decoded)\n");
+ break;
case DS_DUMMY:
default:
break;
}
+ if (m[i].type >= DS_VENDOR && m[i].type <= DS_VENDOR_MAX) {
+ xf86DrvMsg(scrnIndex, X_WARNING,
+ "Unknown vendor-specific block %hx\n",
+ m[i].type - DS_VENDOR);
+ }
}
}