source: trunk/third/sysinfo/edid.h @ 12269

Revision 12269, 9.8 KB checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12268, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * Copyright (c) 1992-1998 Michael A. Cooper.
3 * This software may be freely used and distributed provided it is not
4 * sold for profit or used in part or in whole for commercial gain
5 * without prior written agreement, and the author is credited
6 * appropriately.
7 */
8
9/*
10 * $Revision: 1.1.1.1 $
11 */
12
13/*
14 * This file contains VESA EDID definetions common to SysInfo.
15 *
16 * EDID info from:
17 *      Extended Display Identification Data (EDID) Standard
18 *              Version 3, Revision Date: 11/13/97
19 */
20
21#ifndef __edid_h__
22#define __edid_h__
23
24/*
25 * Standard EDID header should contain EDID_HEADER
26 */
27#define EDID_HEADER     { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 }
28
29/*
30 * Monitor Data Tags identifying type of Descriptor Block (DataType)
31 */
32#define MDD_SERIAL      0xFF            /* Monitor Serial Number (ASCII) */
33#define MDD_STRING      0xFE            /* General ASCII String */
34#define MDD_RANGE       0xFD            /* Monitor Range Limits */
35#define MDD_NAME        0xFC            /* Monitor Name (ASCII) */
36#define MDD_COLORPT     0xFB            /* Color Point Data */
37#define MDD_STDTIMING   0xFA            /* Add. Std Timing Identifications */
38/* DataTypes of range 0x00 - 0x0F are reserved for Manufacturer use */
39
40/*
41 * Detailed Timing Descriptor
42 */
43typedef struct {
44    u_short     PixelClock;             /* Hz */
45    u_char      HorActive1;             /* # Pixels */
46    u_char      HorBlanking1;           /* # Pixels */
47    u_char      HorActive2 : 4,
48                HorBlanking2 : 4;
49    u_char      VerActive2;             /* # Lines */
50    u_char      VerBlanking2;           /* # Lines */
51    u_char      VerActive3 : 4,
52                VerBlanking3 : 4;
53    u_char      HorSyncOffSet1;         /* # Pixels */
54    u_char      HorSyncPulseWidth;      /* # Pixels */
55    u_char      VertSyncOffset1 : 4,    /* # lines */
56                VertSyncPulseWidth1 : 4;/* # lines */
57    u_char      HorSyncOffSet2 : 2,
58                HorSyncPulseWidth2 : 2,
59                VerSyncOffSet2 : 2,
60                VerSyncPulseWidth2 : 2;
61    u_char      HorImageSize1;          /* Horizontal Image Size (mm) */
62    u_char      VerImageSize1;          /* Vertical Image Size (mm) */
63    u_char      HorImageSize2 : 4,
64                VerImageSize2 : 4;
65    u_char      HorBorder;              /* # Pixels */
66    u_char      VerBorder;              /* # Lines */
67    u_char      Interlaced : 1,         /* 0=Non-Interlaced 1=Interlaced */
68                Flags : 7;
69} DetailTiming_t;
70
71/*
72 * Monitor Range Limits
73 * Used when MonDescriptor_t.DataType == MDD_RANGE
74 */
75typedef struct {
76    u_char      MinVertical;            /* Min. Vertical Rate (Hz) */
77    u_char      MaxVertical;            /* Max. Vertical Rate (Hz) */
78    u_char      MinHorizontal;          /* Min. Horizontal rate (KHz) */
79    u_char      MaxHorizontal;          /* Max. Horizontal rate (KHz) */
80    u_char      MaxPixelClock;          /* Max. Support. Pixel Clock (MHz/10)*/
81    u_char      GTFreserved[8];         /* Reserved for GTF standard */
82} MonRange_t;
83
84/*
85 * Monitor Descriptor Block
86 * This is a general buffer that is interpretted based on DataType.
87 */
88typedef struct {
89    u_short     Flag1;                  /* Should be == 0x0000 if descriptor */
90    u_char      Reserved;               /* Reserved */
91    u_char      DataType;               /* Type of data (see MDD_*) */
92    u_char      Flag2;                  /* Should be == 0x00 if descriptor */
93    u_char      Data[13];               /* The data itself */
94} Detail_t;
95
96/*
97 * Standard Timings consistant of 2-byte values
98 */
99typedef struct {
100    u_char      HorActivePixels;        /* Horizontal Active Pixels */
101    u_char      Aspect : 2,             /* Aspect Ratio */
102                RefreshRate : 6;        /* Refesh Rate */
103} StdTiming_t;
104
105/*
106 * EDID Version 1
107 */
108typedef struct {
109    /* EDID Header */
110    u_char              Header[8];      /* EDID Header */
111    /* Vendor / Product Identification */
112                                /* EISA Manufacturer ID code (2-bytes) */
113    u_short             ManIDpad : 1,           /* Padding */
114                        ManIDc1 : 5,            /* Character 1 */
115                        ManIDc2 : 5,            /* Character 2 */
116                        ManIDc3 : 5;            /* Character 3 */
117    u_char              ProductIdCode[2]; /* Product ID code */
118    u_char              Serial[4];      /* Serial number */
119    u_char              ManWeek;        /* Week # manufactured */
120    u_char              ManYear;        /* Year manufactured */
121    /* EDID Version / Revision */
122    u_char              EDIDversion;    /* EDID Version # */
123    u_char              EDIDrevision;   /* EDID Revision # */
124    /* Basic Display Parameters / Features */
125    u_char              SigType : 1,    /* 0=Analog 1=Digital */
126                        SigInfo : 7;
127    u_char              HorImageSize;   /* Max Horizontal Image Size (cm) */
128    u_char              VerImageSize;   /* Max Vertical Image Size (cm) */
129    u_char              Gamma;          /* Display Transfer Characteristic */
130    u_char              DpmsStandBy : 1,/* Supports DPMS Stand-By mode */
131                        DpmsSuspend : 1,/* Supports DPMS Suspend mode */
132                        DpmsActiveOff : 1, /* Supports DPMS Active-Off */
133                        DisplayType : 2,/* mono, color, etc */
134                        StdColorSpace : 1,/* Uses std default color space */
135                        HasPrefTiming : 1,/* Preferred Timing in 1st Detail
136                                             Timing Block */
137                        HasGtf : 1;     /* Supports GTF standard timings */
138    /* Color Characteristics */
139    u_char              ColorChars[10];
140    /* Established Timings */
141    u_char              EstTimings[3];
142    /* Standard Timings */
143    StdTiming_t         StdTimings[8];
144    /* Detailed Timing Descriptor Blocks */
145    Detail_t            Details[4];
146    /* Misc */
147    u_char              ExtFlag;        /* Extension Flag: # of following
148                                           128-byte EDID extension blocks */
149    u_char              CheckSum;       /* 1-byte sum of all 128-bytes in
150                                           this EDID should == 0 */
151} EDIDv1_t;
152
153#define EDID_V1_SIZE            128     /* This better be 128-bytes */
154
155/*
156 * EDID Version 2
157 */
158typedef struct {
159    /* EDID Info */
160    u_char              EDIDversion : 4,        /* EDID Version */
161                        EDIDrevision : 4;       /* EDID Revision */
162    /* Manufacturer / Product Info */
163                                /* EISA Manufacturer ID code (2-bytes) */
164    u_short             ManIDpad : 1,           /* Padding */
165                        ManIDc1 : 5,            /* Character 1 */
166                        ManIDc2 : 5,            /* Character 2 */
167                        ManIDc3 : 5;            /* Character 3 */
168    u_char              ProductIdCode[2]; /* Product ID code */
169    u_char              ManWeek;        /* Week # manufactured */
170    u_short             ManYear;        /* Year manufactured */
171    u_char              ManProduct[32]; /* Manufacturer + Product names */
172    u_char              Serial[16];     /* Serial number */
173    /* Basic Display Parameters/Features */
174    u_char              PriPhysInt : 4, /* Primary physical interface */
175                        SecPhysInt : 4; /* Secondary physical interface */
176    u_char              PriVidInt : 4,  /* Primary Video interface */
177                        SecVidInt : 4;  /* Secondary Video interface */
178        /* Analog Interface */
179    u_char              AnalogInfo;     /* Analog interface info */
180    u_char              PixelClock : 1, /* Has Pixel Clock */
181                        Reserved0 : 7;
182    u_char              Reserved1[2];
183        /* Digital Interface */
184    u_char              DisplayEnableParity : 1, /* Display enabled */
185                        EdgeShiftClock : 1,     /* falling edge shift clock */
186                        RecvrUnits : 2, /* # of data receiver units */
187                        ChSpeed : 4;    /* Channel Speed Exponent */
188    u_char              MinChSpeed;     /* Min. channel speed */
189    u_char              MaxChSpeed;     /* Max. channel speed */
190    u_char              DigitalFormat;  /* Digital interface data format */
191    u_char              ColorEncoding : 4,      /* Color encoding */
192                        SecColorEncoding : 4;   /* Secondary color encoding */
193    u_char              DepthSub0 : 4,  /* Bit-Depth sub-channel 0 */
194                        DepthSub1 : 4;  /* Bit-Depth sub-channel 1 */
195    u_char              DepthSub2 : 4,  /* Bit-Depth sub-channel 2 */
196                        DepthSub3 : 4;  /* Bit-Depth sub-channel 3 */
197        /* Not sure why this is repeated in the std */
198    u_char              OthDepthSub0 : 4,/* Bit-Depth sub-channel 0 */
199                        OthDepthSub1 : 4;/* Bit-Depth sub-channel 1 */
200    u_char              OthDepthSub2 : 4,/* Bit-Depth sub-channel 2 */
201                        OthDepthSub3 : 4;/* Bit-Depth sub-channel 3 */
202        /* Display Device Description */
203    u_char              DispTechType : 4,       /* Display Technology Type */
204                        DispTypeSubType : 4;    /*    " subtype */
205    u_char              DisplayType : 1,        /* Mono, Color */
206                        SelChromat : 1, /* Selectable Display chromaticity */
207                        CondUpdate : 1, /* Conditional Update */
208                        ScanOrient : 2, /* Scan Orientation */
209                        DispBg : 1,     /* Display Background */
210                        PhysImp : 2;    /* Physical Implementation */
211    u_char              DpmsStandBy : 1,/* Supports DPMS Stand-By mode */
212                        DpmsSuspend : 1,/* Supports DPMS Suspend mode */
213                        DpmsActiveOff : 1, /* Supports DPMS Active-Off */
214                        DpmsOff : 1,    /* Supports DPMS Off */
215                        Stereo : 3,     /* Stereo Support info */
216                        Reserved2 : 1;
217    u_char              AudioInType : 1,        /* Audio Input Type */
218                        AudioInInt : 2,         /* Audio Input Interface */
219                        AudioOutType : 1,       /* Audio Output Type */
220                        AudioOutInt : 2,        /* Audio Output Interface */
221                        VideoInType : 2;        /* Video Input Type */
222    u_char              TouchScreen : 1,        /* Contains touch screen */
223                        LightPen : 1,           /* Supports light pen */
224                        LumProbe : 1,           /* Supports Luminance Probe */
225                        Colorimeter : 1,        /* Supports colorimeter */
226                        AdjOrient : 1,          /* Adjustable orientation */
227                        Reserved3 : 3;
228        /* Display Response Time */
229    u_char              RiseExp : 4,    /* Rise Time Exponenet */
230                        RiseSecs : 4;   /* Rise Time in seconds */
231    u_char              FallExp : 4,    /* Fall Time Exponent */
232                        FallSecs : 4;   /* Fall Time in seconds */
233        /* Color/Luminance */
234    u_char              GammaWhite;     /* White Gamma */
235    u_char              GammaColor0;    /* Color 0 (red) Gamma */
236    u_char              GammaColor1;    /* Color 1 (green) Gamma */
237    u_char              GammaColor2;    /* Color 2 (blue) Gamma */
238    u_short             MaxLum;         /* Max Luminance */
239    u_char              StdRGB : 1,     /* Standard RGB model */
240                        AdjGamma : 1,   /* Adjustable Gamma */
241                        Reserved4 : 6;
242    u_char              LumOffSet;      /* Luminance Offset */
243        /* Chromaticity */
244    u_char              Chromaticity[10];
245    u_char              WhitePoints[10];
246        /* Display Spatial Description */
247    u_short             HorImageSize;   /* Max Horizontal Image Size (mm) */
248    u_short             VerImageSize;   /* Max Vertical Image Size (mm) */
249    u_short             MaxHorAddr;     /* Max. Hor. Addressibility (pixels) */
250    u_short             MaxVerAddr;     /* Max. Ver. Addressibility (pixels) */
251    u_char              HorPitch;       /* Max Hor. Pixel Pitch */
252    u_char              VerPitch;       /* Max Ver. Pixel Pitch */
253        /* GTF */
254    u_char              GTF;
255        /* Timing codes */
256    u_char              ExtFlag : 1,    /* 1 more EDID block follows */
257                        HasPrefTiming : 1,      /* Preferred Timing in 1st
258                                                   Detail Timing Block */
259                        HasLumTab : 1,          /* Luminance Table provided */
260                        NumFreqRanges : 3,      /* # of Frequency Ranges */
261                        NumDetailRange : 2;     /* # of Detail Range Limits */
262    u_char              NumTimingCodes : 5,     /* # of Timing Codes listed */
263                        NumDetailTimings : 3;   /* # of De3tailed Timings */
264        /* Tables */
265    u_char              Tables[127];
266    u_char              CheckSum;       /* 1-byte sum of all == 0 */
267} EDIDv2_t;
268#define EDID_V2_SIZE            256     /* Better be 256 */
269
270#endif  /* __edid_h__ */
Note: See TracBrowser for help on using the repository browser.