4 #include <linux/types.h>
6 #define EDID_LENGTH 128
10 #error "EDID structure is little endian, need big endian versions"
17 } __attribute__((packed));
20 u8 hsize; /* need to multiply by 8 then add 248 */
21 u8 vfreq:6; /* need to add 60 */
22 u8 aspect_ratio:2; /* 00=16:10, 01=4:3, 10=5:4, 11=16:9 */
23 } __attribute__((packed));
25 /* If detailed data is pixel timing */
26 struct detailed_pixel_timing {
36 u8 hsync_pulse_width_lo;
37 u8 vsync_pulse_width_lo:4;
39 u8 hsync_pulse_width_hi:2;
41 u8 vsync_pulse_width_hi:2;
56 } __attribute__((packed));
58 /* If it's not pixel timing, it'll be one of the below */
59 struct detailed_data_string {
61 } __attribute__((packed));
63 struct detailed_data_monitor_range {
68 u8 pixel_clock_mhz; /* need to multiply by 10 */
69 u16 sec_gtf_toggle; /* A000=use above, 20=use below */ /* FIXME: byte order */
70 u8 hfreq_start_khz; /* need to multiply by 2 */
71 u8 c; /* need to divide by 2 */
72 u16 m; /* FIXME: byte order */
74 u8 j; /* need to divide by 2 */
75 } __attribute__((packed));
77 struct detailed_data_wpindex {
83 u8 gamma; /* need to divide by 100 then add 1 */
84 } __attribute__((packed));
86 struct detailed_data_color_point {
91 } __attribute__((packed));
93 struct detailed_non_pixel {
95 u8 type; /* ff=serial, fe=string, fd=monitor range, fc=monitor name
96 fb=color point data, fa=standard timing data,
97 f9=undefined, f8=mfg. reserved */
100 struct detailed_data_string str;
101 struct detailed_data_monitor_range range;
102 struct detailed_data_wpindex color;
103 struct std_timing timings[5];
105 } __attribute__((packed));
107 #define EDID_DETAIL_STD_MODES 0xfa
108 #define EDID_DETAIL_MONITOR_CPDATA 0xfb
109 #define EDID_DETAIL_MONITOR_NAME 0xfc
110 #define EDID_DETAIL_MONITOR_RANGE 0xfd
111 #define EDID_DETAIL_MONITOR_STRING 0xfe
112 #define EDID_DETAIL_MONITOR_SERIAL 0xff
114 struct detailed_timing {
115 u16 pixel_clock; /* need to multiply by 10 KHz */ /* FIXME: byte order */
117 struct detailed_pixel_timing pixel_data;
118 struct detailed_non_pixel other_data;
120 } __attribute__((packed));
124 /* Vendor & product info */
127 u32 serial; /* FIXME: byte order */
134 /* input definition */
135 u8 serration_vsync:1;
141 u8 digital:1; /* bits below must be zero if set */
145 /* feature support */
147 u8 preferred_timing:1;
149 u8 display_type:2; /* 00=mono, 01=rgb, 10=non-rgb, 11=unknown */
153 /* Color characteristics */
164 /* Est. timings and mfg rsvd timings*/
165 struct est_timings established_timings;
166 /* Standard timings 1-8*/
167 struct std_timing standard_timings[8];
168 /* Detailing timings 1-4 */
169 struct detailed_timing detailed_timings[4];
170 /* Number of 128 byte ext. blocks */
174 } __attribute__((packed));
176 #define EDID_PRODUCT_ID(e) ((e)->prod_code[0] | ((e)->prod_code[1] << 8))
178 #endif /* __DRM_EDID_H__ */