blob: 6d76bb7efb0482f9ff48a8b77f5e662bd8ca308c [file] [log] [blame]
Ronald G. Minnichb3b72f32013-03-13 14:35:01 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2013 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef EDID_H
21#define EDID_H
22
23/* structure for communicating EDID information from a raw EDID block to
24 * higher level functions.
25 * The size of the data types is not critical, so we leave them as
26 * unsigned int. We can move more into into this struct as needed.
27 */
28
29struct edid {
30 char manuf_name[4];
31 unsigned int model;
32 unsigned int serial;
33 unsigned int year;
34 unsigned int week;
35 unsigned int version[2];
36 unsigned int nonconformant;
37 unsigned int type;
38 unsigned int bpp;
39 unsigned int voltage;
40 unsigned int sync;
41 unsigned int xsize_cm;
42 unsigned int ysize_cm;
43 /* used to compute timing for graphics chips. */
44 unsigned char phsync;
45 unsigned char pvsync;
46 unsigned int ha;
47 unsigned int hbl;
48 unsigned int hso;
49 unsigned int hspw;
50 unsigned int hborder;
51 unsigned int va;
52 unsigned int vbl;
53 unsigned int vso;
54 unsigned int vspw;
55 unsigned int vborder;
56 /* it is unlikely we need these things. */
57 /* if one of these is non-zero, use that one. */
58 unsigned int aspect_landscape;
59 unsigned int aspect_portrait;
60 const char *range_class;
61 const char *syncmethod;
62 const char *stereo;
63};
64
65int decode_edid(unsigned char *edid, int size, struct edid *out);
66#endif /* EDID_H */