ovr_sdk

view 3rdParty/EDID/edid.h @ 0:1b39a1b46319

initial 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 06:51:16 +0200
parents
children
line source
1 #include <X11/extensions/Xrandr.h>
2 #include <X11/Xlib.h>
4 /*
5 * Copyright 2007 Red Hat, Inc.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the "Software"),
9 * to deal in the Software without restriction, including without limitation
10 * on the rights to use, copy, modify, merge, publish, distribute, sub
11 * license, and/or sell copies of the Software, and to permit persons to whom
12 * the Software is furnished to do so, subject to the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the next
15 * paragraph) shall be included in all copies or substantial portions of the
16 * Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
21 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
26 /* Author: Soren Sandmann <sandmann@redhat.com> */
28 typedef enum {
29 UNDEFINED,
30 DVI,
31 HDMI_A,
32 HDMI_B,
33 MDDI,
34 DISPLAY_PORT
35 } Interface;
37 typedef enum {
38 UNDEFINED_COLOR,
39 MONOCHROME,
40 RGB,
41 OTHER_COLOR
42 } ColorType;
44 typedef enum {
45 NO_STEREO,
46 FIELD_RIGHT,
47 FIELD_LEFT,
48 TWO_WAY_RIGHT_ON_EVEN,
49 TWO_WAY_LEFT_ON_EVEN,
50 FOUR_WAY_INTERLEAVED,
51 SIDE_BY_SIDE
52 } StereoType;
54 struct Timing {
55 int width;
56 int height;
57 int frequency;
58 };
60 struct DetailedTiming {
61 int pixel_clock;
62 int h_addr;
63 int h_blank;
64 int h_sync;
65 int h_front_porch;
66 int v_addr;
67 int v_blank;
68 int v_sync;
69 int v_front_porch;
70 int width_mm;
71 int height_mm;
72 int right_border;
73 int top_border;
74 int interlaced;
75 StereoType stereo;
77 int digital_sync;
78 union {
79 struct {
80 int bipolar;
81 int serrations;
82 int sync_on_green;
83 } analog;
85 struct {
86 int composite;
87 int serrations;
88 int negative_vsync;
89 int negative_hsync;
90 } digital;
91 } connector;
92 };
94 struct MonitorInfo {
95 int checksum;
96 char manufacturer_code[4];
97 int product_code;
98 unsigned int serial_number;
100 int production_week; /* -1 if not specified */
101 int production_year; /* -1 if not specified */
102 int model_year; /* -1 if not specified */
104 int major_version;
105 int minor_version;
107 int is_digital;
109 union {
110 struct {
111 int bits_per_primary;
112 Interface interface;
113 int rgb444;
114 int ycrcb444;
115 int ycrcb422;
116 } digital;
118 struct {
119 double video_signal_level;
120 double sync_signal_level;
121 double total_signal_level;
123 int blank_to_black;
125 int separate_hv_sync;
126 int composite_sync_on_h;
127 int composite_sync_on_green;
128 int serration_on_vsync;
129 ColorType color_type;
130 } analog;
131 } connector;
133 int width_mm; /* -1 if not specified */
134 int height_mm; /* -1 if not specified */
135 double aspect_ratio; /* -1.0 if not specififed */
137 double gamma; /* -1.0 if not specified */
139 int standby;
140 int suspend;
141 int active_off;
143 int srgb_is_standard;
144 int preferred_timing_includes_native;
145 int continuous_frequency;
147 double red_x;
148 double red_y;
149 double green_x;
150 double green_y;
151 double blue_x;
152 double blue_y;
153 double white_x;
154 double white_y;
156 Timing established[24]; /* Terminated by 0x0x0 */
157 Timing standard[8];
159 int n_detailed_timings;
160 DetailedTiming detailed_timings[4]; /* If monitor has a preferred
161 * mode, it is the first one
162 * (whether it has, is
163 * determined by the
164 * preferred_timing_includes
165 * bit.
166 */
168 /* Optional product description */
169 char dsc_serial_number[14];
170 char dsc_product_name[14];
171 char dsc_string[14]; /* Unspecified ASCII data */
172 };
174 MonitorInfo * read_edid_data(Display * disp, RROutput id);