Chameleon

Chameleon Svn Source Tree

Root/trunk/i386/include/IOKit/graphics/IOGraphicsTypes.h

1/*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23#ifndef _IOKIT_IOGRAPHICSTYPES_H
24#define _IOKIT_IOGRAPHICSTYPES_H
25
26
27#include <IOKit/IOTypes.h>
28#include <IOKit/IOKitKeys.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#define IOGRAPHICSTYPES_REV 42
35
36typedef SInt32 IOIndex;
37typedef UInt32 IOSelect;
38typedef UInt32 IOFixed1616;
39typedef UInt32 IODisplayVendorID;
40typedef UInt32 IODisplayProductID;
41
42typedef SInt32 IODisplayModeID;
43enum {
44 // This is the ID given to a programmable timing used at boot time
45 kIODisplayModeIDBootProgrammable = (IODisplayModeID)0xFFFFFFFB,
46 // Lowest (unsigned) DisplayModeID reserved by Apple
47 kIODisplayModeIDReservedBase = (IODisplayModeID)0x80000000
48};
49
50enum {
51 kIOMaxPixelBits = 64
52};
53typedef char IOPixelEncoding[ kIOMaxPixelBits ];
54
55// Common Apple pixel formats
56
57#define IO1BitIndexedPixels "P"
58#define IO2BitIndexedPixels "PP"
59#define IO4BitIndexedPixels "PPPP"
60#define IO8BitIndexedPixels "PPPPPPPP"
61#define IO16BitDirectPixels "-RRRRRGGGGGBBBBB"
62#define IO32BitDirectPixels "--------RRRRRRRRGGGGGGGGBBBBBBBB"
63
64#define kIO30BitDirectPixels "--RRRRRRRRRRGGGGGGGGGGBBBBBBBBBB"
65#define kIO64BitDirectPixels "-16R16G16B16"
66
67#define kIO16BitFloatPixels "-16FR16FG16FB16"
68#define kIO32BitFloatPixels "-32FR32FG32FB32"
69
70// other possible pixel formats
71
72#define IOYUV422Pixels "Y4U2V2"
73#define IO8BitOverlayPixels "O8"
74// page flipping
75#define IOPagedPixels "Page1"
76
77#define IO_SampleTypeAlpha 'A'
78#define IO_SampleTypeSkip '-'
79
80// Info about a pixel format
81enum {
82 kIOCLUTPixels = 0,
83 kIOFixedCLUTPixels = 1,
84 kIORGBDirectPixels = 2,
85 kIOMonoDirectPixels = 3,
86 kIOMonoInverseDirectPixels = 4,
87 kIORGBSignedDirectPixels = 5,
88 kIORGBSignedFloatingPointPixels = 6
89};
90
91/*!
92 * @struct IOPixelInformation
93 * @abstract A structure defining the format of a framebuffer.
94 * @discussion This structure is used by IOFramebuffer to define the format of the pixels.
95 * @field bytesPerRow The number of bytes per row.
96 * @field bytesPerPlane Not used.
97 * @field bitsPerPixel The number of bits per pixel, including unused bits and alpha.
98 * @field pixelType One of kIOCLUTPixels (indexed pixels with changeable CLUT), kIORGBDirectPixels (direct pixels).
99 * @field componentCount One for indexed pixels, three for direct pixel formats.
100 * @field bitsPerComponent Number of bits per component in each pixel.
101 * @field componentMasks Mask of the bits valid for each component of the pixel - in R, G, B order for direct pixels.
102 * @field pixelFormat String description of the pixel format - IO32BitDirectPixels, IO16BitDirectPixels etc.
103 * @field flags None defined - set to zero.
104 * @field activeWidth Number of pixels visible per row.
105 * @field activeHeight Number of visible pixel rows.
106 * @field reserved Set to zero.
107 */
108
109struct IOPixelInformation {
110 UInt32 bytesPerRow;
111 UInt32 bytesPerPlane;
112 UInt32 bitsPerPixel;
113 UInt32 pixelType;
114 UInt32 componentCount;
115 UInt32 bitsPerComponent;
116 UInt32 componentMasks[ 8 * 2 ];
117 IOPixelEncoding pixelFormat;
118 UInt32 flags;
119 UInt32 activeWidth;
120 UInt32 activeHeight;
121 UInt32 reserved[ 2 ];
122};
123typedef struct IOPixelInformation IOPixelInformation;
124
125// ID for industry standard display timings
126typedef UInt32 IOAppleTimingID;
127
128/*!
129 * @struct IODisplayModeInformation
130 * @abstract A structure defining the format of a framebuffer.
131 * @discussion This structure is used by IOFramebuffer to define the format of the pixels.
132 * @field nominalWidth Number of pixels visible per row.
133 * @field nominalHeight Number of visible pixel rows.
134 * @field refreshRate Refresh rate in fixed point 16.16.
135 * @field maxDepthIndex Highest depth index available in this display mode.
136 * @field flags Flags for the mode, including: <br>
137 * kDisplayModeInterlacedFlag mode is interlaced. <br>
138 * kDisplayModeSimulscanFlag mode is available on multiple display connections. <br>
139 * kDisplayModeNotPresetFlag mode is not a factory preset for the display (geometry may need correction). <br>
140 * kDisplayModeStretchedFlag mode is stretched/distorted to match the display aspect ratio. <br>
141 * @field imageWidth Physical width of active image if known, in millimeters, otherwise zero. <br>
142 * @field imageHeight Physical height of active image if known, in millimeters, otherwise zero. <br>
143 * @field reserved Set to zero.
144 */
145
146struct IODisplayModeInformation {
147 UInt32 nominalWidth;
148 UInt32 nominalHeight;
149 IOFixed1616 refreshRate;
150 IOIndex maxDepthIndex;
151 UInt32 flags;
152 UInt16imageWidth;
153 UInt16imageHeight;
154 UInt32 reserved[ 3 ];
155};
156typedef struct IODisplayModeInformation IODisplayModeInformation;
157
158// flags
159enum {
160 kDisplayModeSafetyFlags = 0x00000007,
161
162 kDisplayModeAlwaysShowFlag = 0x00000008,
163 kDisplayModeNeverShowFlag = 0x00000080,
164 kDisplayModeNotResizeFlag = 0x00000010,
165 kDisplayModeRequiresPanFlag = 0x00000020,
166
167 kDisplayModeInterlacedFlag = 0x00000040,
168
169 kDisplayModeSimulscanFlag = 0x00000100,
170 kDisplayModeBuiltInFlag = 0x00000400,
171 kDisplayModeNotPresetFlag = 0x00000200,
172 kDisplayModeStretchedFlag = 0x00000800,
173 kDisplayModeNotGraphicsQualityFlag = 0x00001000,
174 kDisplayModeValidateAgainstDisplay = 0x00002000,
175 kDisplayModeTelevisionFlag = 0x00100000,
176 kDisplayModeValidForMirroringFlag = 0x00200000,
177 kDisplayModeAcceleratorBackedFlag = 0x00400000,
178 kDisplayModeValidForHiResFlag = 0x00800000,
179 kDisplayModeValidForAirPlayFlag = 0x01000000,
180 kDisplayModeNativeFlag = 0x02000000
181};
182enum {
183 kDisplayModeValidFlag = 0x00000001,
184 kDisplayModeSafeFlag = 0x00000002,
185 kDisplayModeDefaultFlag = 0x00000004
186};
187
188#ifndef KERNEL
189// Framebuffer info - obsolete
190
191struct IOFramebufferInformation {
192 IOPhysicalAddress baseAddress;
193 UInt32 activeWidth;
194 UInt32 activeHeight;
195 IOByteCount bytesPerRow;
196 IOByteCount bytesPerPlane;
197 UInt32 bitsPerPixel;
198 UInt32 pixelType;
199 UInt32 flags;
200 UInt32 reserved[ 4 ];
201};
202typedef struct IOFramebufferInformation IOFramebufferInformation;
203#endif
204
205// flags
206enum {
207 kFramebufferSupportsCopybackCache = 0x00010000,
208 kFramebufferSupportsWritethruCache = 0x00020000,
209 kFramebufferSupportsGammaCorrection = 0x00040000,
210 kFramebufferDisableAltivecAccess = 0x00080000
211};
212
213// Aperture is an index into supported pixel formats for a mode & depth
214typedef IOIndex IOPixelAperture;
215enum {
216 kIOFBSystemAperture = 0
217};
218
219//// CLUTs
220
221typedef UInt16 IOColorComponent;
222
223/*!
224 * @struct IOColorEntry
225 * @abstract A structure defining one entry of a color lookup table.
226 * @discussion This structure is used by IOFramebuffer to define an entry of a color lookup table.
227 * @field index Number of pixels visible per row.
228 * @field red Value of red component 0-65535.
229 * @field green Value of green component 0-65535.
230 * @field blue Value of blue component 0-65535.
231 */
232
233struct IOColorEntry {
234 UInt16 index;
235 IOColorComponent red;
236 IOColorComponent green;
237 IOColorComponent blue;
238};
239typedef struct IOColorEntry IOColorEntry;
240
241// options (masks)
242enum {
243 kSetCLUTByValue = 0x00000001, // else at index
244 kSetCLUTImmediately = 0x00000002, // else at VBL
245 kSetCLUTWithLuminance = 0x00000004 // else RGB
246};
247
248//// Controller attributes
249
250enum {
251 kIOPowerStateAttribute = 'pwrs',
252 kIOPowerAttribute = 'powr',
253 kIODriverPowerAttribute = 'dpow',
254 kIOHardwareCursorAttribute = 'crsr',
255
256 kIOMirrorAttribute = 'mirr',
257 kIOMirrorDefaultAttribute = 'mrdf',
258
259 kIOCapturedAttribute = 'capd',
260
261 kIOCursorControlAttribute = 'crsc',
262
263 kIOSystemPowerAttribute = 'spwr',
264 kIOWindowServerActiveAttribute = 'wsrv',
265 kIOVRAMSaveAttribute = 'vrsv',
266 kIODeferCLUTSetAttribute = 'vclt',
267
268 kIOClamshellStateAttribute = 'clam',
269
270kIOFBDisplayPortTrainingAttribute = 'dpta',
271};
272
273// values for kIOMirrorAttribute
274enum {
275 kIOMirrorIsPrimary = 0x80000000,
276 kIOMirrorHWClipped = 0x40000000,
277 kIOMirrorIsMirrored = 0x20000000
278};
279
280// values for kIOMirrorDefaultAttribute
281enum {
282 kIOMirrorDefault = 0x00000001,
283 kIOMirrorForced = 0x00000002
284};
285
286//// Display mode timing information
287
288struct IODetailedTimingInformationV1 {
289 // from EDID defn
290 UInt32 pixelClock; // Hertz
291 UInt32 horizontalActive; // pixels
292 UInt32 horizontalBlanking; // pixels
293 UInt32 horizontalBorder; // pixels
294 UInt32 horizontalSyncOffset; // pixels
295 UInt32 horizontalSyncWidth; // pixels
296 UInt32 verticalActive; // lines
297 UInt32 verticalBlanking; // lines
298 UInt32 verticalBorder; // lines
299 UInt32 verticalSyncOffset; // lines
300 UInt32 verticalSyncWidth; // lines
301};
302typedef struct IODetailedTimingInformationV1 IODetailedTimingInformationV1;
303
304/*!
305 * @struct IODetailedTimingInformationV2
306 * @abstract A structure defining the detailed timing information of a display mode.
307 * @discussion This structure is used by IOFramebuffer to define detailed timing information for a display mode. The VESA EDID document has more information.
308 * @field __reservedA Set to zero.
309 * @field horizontalScaledInset If the mode is scaled, sets the number of active pixels to remove the left and right edges in order to display an underscanned image.
310 * @field verticalScaledInset If the mode is scaled, sets the number of active lines to remove the top and bottom edges in order to display an underscanned image.
311 * @field scalerFlags If the mode is scaled,
312 * kIOScaleStretchToFit may be set to allow stretching.
313 * kIOScaleRotateFlags is mask which may have the value given by kIOScaleRotate90, kIOScaleRotate180, kIOScaleRotate270 to display a rotated framebuffer.
314 * @field horizontalScaled If the mode is scaled, sets the size of the image before scaling or rotation.
315 * @field verticalScaled If the mode is scaled, sets the size of the image before scaling or rotation.
316 * @field signalConfig
317 * kIOAnalogSetupExpected set if display expects a blank-to-black setup or pedestal. See VESA signal standards. <br>
318 * kIOInterlacedCEATiming set for a CEA style interlaced timing:<br>
319 * Field 1 vertical blanking = half specified vertical blanking lines. <br>
320 * Field 2 vertical blanking = (half vertical blanking lines) + 1 line. <br>
321 * Field 1 vertical offset = half specified vertical sync offset. <br>
322 * Field 2 vertical offset = (half specified vertical sync offset) + 0.5 lines. <br>
323 * @field signalLevels One of:<br>
324 * kIOAnalogSignalLevel_0700_0300 0.700 - 0.300 V p-p.<br>
325 * kIOAnalogSignalLevel_0714_0286 0.714 - 0.286 V p-p.<br>
326 * kIOAnalogSignalLevel_1000_0400 1.000 - 0.400 V p-p.<br>
327 * kIOAnalogSignalLevel_0700_0000 0.700 - 0.000 V p-p.<br>
328 * @field pixelClock Pixel clock frequency in Hz.
329 * @field minPixelClock Minimum pixel clock frequency in Hz, with error.
330 * @field maxPixelClock Maximum pixel clock frequency in Hz, with error.
331 * @field horizontalActive Pixel clocks per line.
332 * @field horizontalBlanking Blanking clocks per line.
333 * @field horizontalSyncOffset First clock of horizontal sync.
334 * @field horizontalSyncPulseWidth Width of horizontal sync.
335 * @field verticalActive Number of lines per frame.
336 * @field verticalBlanking Blanking lines per frame.
337 * @field verticalSyncOffset First line of vertical sync.
338 * @field verticalSyncPulseWidth Height of vertical sync.
339 * @field horizontalBorderLeft Number of pixels in left horizontal border.
340 * @field horizontalBorderRight Number of pixels in right horizontal border.
341 * @field verticalBorderTop Number of lines in top vertical border.
342 * @field verticalBorderBottom Number of lines in bottom vertical border.
343 * @field horizontalSyncConfig kIOSyncPositivePolarity for positive polarity horizontal sync (0 for negative).
344 * @field horizontalSyncLevel Zero.
345 * @field verticalSyncConfig kIOSyncPositivePolarity for positive polarity vertical sync (0 for negative).
346 * @field verticalSyncLevel Zero.
347 * @field numLinks number of links to be used by a dual link timing, if zero, assume one link.
348 * @field __reservedB Reserved set to zero.
349 */
350
351struct IODetailedTimingInformationV2 {
352
353 UInt32 __reservedA[3]; // Init to 0
354 UInt32 horizontalScaledInset; // pixels
355 UInt32 verticalScaledInset; // lines
356
357 UInt32 scalerFlags;
358 UInt32 horizontalScaled;
359 UInt32 verticalScaled;
360
361 UInt32 signalConfig;
362 UInt32 signalLevels;
363
364 UInt64 pixelClock; // Hz
365
366 UInt64 minPixelClock; // Hz - With error what is slowest actual clock
367 UInt64 maxPixelClock; // Hz - With error what is fasted actual clock
368
369 UInt32 horizontalActive; // pixels
370 UInt32 horizontalBlanking; // pixels
371 UInt32 horizontalSyncOffset; // pixels
372 UInt32 horizontalSyncPulseWidth; // pixels
373
374 UInt32 verticalActive; // lines
375 UInt32 verticalBlanking; // lines
376 UInt32 verticalSyncOffset; // lines
377 UInt32 verticalSyncPulseWidth; // lines
378
379 UInt32 horizontalBorderLeft; // pixels
380 UInt32 horizontalBorderRight; // pixels
381 UInt32 verticalBorderTop; // lines
382 UInt32 verticalBorderBottom; // lines
383
384 UInt32 horizontalSyncConfig;
385 UInt32 horizontalSyncLevel; // Future use (init to 0)
386 UInt32 verticalSyncConfig;
387 UInt32 verticalSyncLevel; // Future use (init to 0)
388 UInt32 numLinks;
389
390 UInt32 __reservedB[7]; // Init to 0
391};
392typedef struct IODetailedTimingInformationV2 IODetailedTimingInformationV2;
393typedef struct IODetailedTimingInformationV2 IODetailedTimingInformation;
394
395struct IOTimingInformation {
396 IOAppleTimingID appleTimingID; // kIOTimingIDXXX const
397 UInt32 flags;
398 union {
399 IODetailedTimingInformationV1 v1;
400 IODetailedTimingInformationV2 v2;
401 } detailedInfo;
402};
403typedef struct IOTimingInformation IOTimingInformation;
404
405enum {
406 // IOTimingInformation flags
407 kIODetailedTimingValid = 0x80000000,
408 kIOScalingInfoValid = 0x40000000
409};
410
411enum {
412 // scalerFlags
413 kIOScaleStretchToFit = 0x00000001,
414
415 kIOScaleRotateFlags = 0x000000f0,
416
417 kIOScaleSwapAxes = 0x00000010,
418 kIOScaleInvertX = 0x00000020,
419 kIOScaleInvertY = 0x00000040,
420
421 kIOScaleRotate0 = 0x00000000,
422 kIOScaleRotate90 = kIOScaleSwapAxes | kIOScaleInvertX,
423 kIOScaleRotate180 = kIOScaleInvertX | kIOScaleInvertY,
424 kIOScaleRotate270 = kIOScaleSwapAxes | kIOScaleInvertY
425};
426
427
428#pragma pack(push, 4)
429struct IOFBDisplayModeDescription {
430 IODisplayModeInformation info;
431 IOTimingInformation timingInfo;
432};
433typedef struct IOFBDisplayModeDescription IOFBDisplayModeDescription;
434#pragma pack(pop)
435
436/*!
437 * @struct IODisplayTimingRange
438 * @abstract A structure defining the limits and attributes of a display or framebuffer.
439 * @discussion This structure is used to define the limits for modes programmed as detailed timings by the OS. The VESA EDID is useful background information for many of these fields. A data property with this structure under the key kIOFBTimingRangeKey in a framebuffer will allow the OS to program detailed timings that fall within its range.
440 * @field __reservedA Set to zero.
441 * @field version Set to zero.
442 * @field __reservedB Set to zero.
443 * @field minPixelClock minimum pixel clock frequency in range, in Hz.
444 * @field minPixelClock maximum pixel clock frequency in range, in Hz.
445 * @field maxPixelError largest variation between specified and actual pixel clock frequency, in Hz.
446 * @field supportedSyncFlags mask of supported sync attributes. The following are defined:<br>
447 * kIORangeSupportsSeparateSyncs - digital separate syncs.<br>
448 * kIORangeSupportsSyncOnGreen - sync on green.<br>
449 * kIORangeSupportsCompositeSync - composite sync.<br>
450 * kIORangeSupportsVSyncSerration - vertical sync has serration and equalization pulses.<br>
451 * @field supportedSignalLevels mask of possible signal levels. The following are defined:<br>
452 * kIORangeSupportsSignal_0700_0300 0.700 - 0.300 V p-p.<br>
453 * kIORangeSupportsSignal_0714_0286 0.714 - 0.286 V p-p.<br>
454 * kIORangeSupportsSignal_1000_0400 1.000 - 0.400 V p-p.<br>
455 * kIORangeSupportsSignal_0700_0000 0.700 - 0.000 V p-p.<br>
456 * @field supportedSignalConfigs mask of possible signal configurations. The following are defined:<br>
457 * kIORangeSupportsInterlacedCEATiming Supports CEA style interlaced timing:<br>
458 * Field 1 vertical blanking = specified vertical blanking lines. <br>
459 * Field 2 vertical blanking = vertical blanking lines + 1 line. <br>
460 * Field 1 vertical offset = specified vertical sync offset. <br>
461 * Field 2 vertical offset = specified vertical sync offset + 0.5 lines. <br>
462 * kIORangeSupportsInterlacedCEATimingWithConfirm Supports CEA style interlaced timing, but require a confirm.
463 * @field minFrameRate minimum frame rate (vertical refresh frequency) in range, in Hz.
464 * @field maxFrameRate maximum frame rate (vertical refresh frequency) in range, in Hz.
465 * @field minLineRate minimum line rate (horizontal refresh frequency) in range, in Hz.
466 * @field maxLineRate maximum line rate (horizontal refresh frequency) in range, in Hz.
467 * @field maxHorizontalTotal maximum clocks in horizontal line (active + blanking).
468 * @field maxVerticalTotal maximum lines in vertical frame (active + blanking).
469 * @field __reservedD Set to zero.
470 * @field charSizeHorizontalActive horizontalActive must be a multiple of charSizeHorizontalActive.
471 * @field charSizeHorizontalBlanking horizontalBlanking must be a multiple of charSizeHorizontalBlanking.
472 * @field charSizeHorizontalSyncOffset horizontalSyncOffset must be a multiple of charSizeHorizontalSyncOffset.
473 * @field charSizeHorizontalSyncPulse horizontalSyncPulse must be a multiple of charSizeHorizontalSyncPulse.
474 * @field charSizeVerticalActive verticalActive must be a multiple of charSizeVerticalActive.
475 * @field charSizeVerticalBlanking verticalBlanking must be a multiple of charSizeVerticalBlanking.
476 * @field charSizeVerticalSyncOffset verticalSyncOffset must be a multiple of charSizeVerticalSyncOffset.
477 * @field charSizeVerticalSyncPulse verticalSyncPulse must be a multiple of charSizeVerticalSyncPulse.
478 * @field charSizeHorizontalBorderLeft horizontalBorderLeft must be a multiple of charSizeHorizontalBorderLeft.
479 * @field charSizeHorizontalBorderRight horizontalBorderRight must be a multiple of charSizeHorizontalBorderRight.
480 * @field charSizeVerticalBorderTop verticalBorderTop must be a multiple of charSizeVerticalBorderTop.
481 * @field charSizeVerticalBorderBottom verticalBorderBottom must be a multiple of charSizeVerticalBorderBottom.
482 * @field charSizeHorizontalTotal (horizontalActive + horizontalBlanking) must be a multiple of charSizeHorizontalTotal.
483 * @field charSizeVerticalTotal (verticalActive + verticalBlanking) must be a multiple of charSizeVerticalTotal.
484 * @field __reservedE Set to zero.
485 * @field minHorizontalActiveClocks minimum value of horizontalActive.
486 * @field maxHorizontalActiveClocks maximum value of horizontalActive.
487 * @field minHorizontalBlankingClocks minimum value of horizontalBlanking.
488 * @field maxHorizontalBlankingClocks maximum value of horizontalBlanking.
489 * @field minHorizontalSyncOffsetClocks minimum value of horizontalSyncOffset.
490 * @field maxHorizontalSyncOffsetClocks maximum value of horizontalSyncOffset.
491 * @field minHorizontalPulseWidthClocks minimum value of horizontalPulseWidth.
492 * @field maxHorizontalPulseWidthClocks maximum value of horizontalPulseWidth.
493 * @field minVerticalActiveClocks minimum value of verticalActive.
494 * @field maxVerticalActiveClocks maximum value of verticalActive.
495 * @field minVerticalBlankingClocks minimum value of verticalBlanking.
496 * @field maxVerticalBlankingClocks maximum value of verticalBlanking.
497 * @field minVerticalSyncOffsetClocks minimum value of verticalSyncOffset.
498 * @field maxVerticalSyncOffsetClocks maximum value of verticalSyncOffset.
499 * @field minVerticalPulseWidthClocks minimum value of verticalPulseWidth.
500 * @field maxVerticalPulseWidthClocks maximum value of verticalPulseWidth.
501 * @field minHorizontalBorderLeft minimum value of horizontalBorderLeft.
502 * @field maxHorizontalBorderLeft maximum value of horizontalBorderLeft.
503 * @field minHorizontalBorderRight minimum value of horizontalBorderRight.
504 * @field maxHorizontalBorderRight maximum value of horizontalBorderRight.
505 * @field minVerticalBorderTop minimum value of verticalBorderTop.
506 * @field maxVerticalBorderTop maximum value of verticalBorderTop.
507 * @field minVerticalBorderBottom minimum value of verticalBorderBottom.
508 * @field maxVerticalBorderBottom maximum value of verticalBorderBottom.
509 * @field maxNumLinks number of links supported, if zero, 1 link is assumed.
510 * @field minLink0PixelClock minimum pixel clock for link 0 (kHz).
511 * @field maxLink0PixelClock maximum pixel clock for link 0 (kHz).
512 * @field minLink1PixelClock minimum pixel clock for link 1 (kHz).
513 * @field maxLink1PixelClock maximum pixel clock for link 1 (kHz).
514 * @field __reservedF Set to zero.
515 */
516
517struct IODisplayTimingRange
518{
519 UInt32 __reservedA[2]; // Init to 0
520 UInt32 version; // Init to 0
521 UInt32 __reservedB[5]; // Init to 0
522
523 UInt64 minPixelClock; // Min dot clock in Hz
524 UInt64 maxPixelClock; // Max dot clock in Hz
525
526 UInt32 maxPixelError; // Max dot clock error
527 UInt32 supportedSyncFlags;
528 UInt32 supportedSignalLevels;
529 UInt32 supportedSignalConfigs;
530
531 UInt32 minFrameRate; // Hz
532 UInt32 maxFrameRate; // Hz
533 UInt32 minLineRate; // Hz
534 UInt32 maxLineRate; // Hz
535
536 UInt32 maxHorizontalTotal; // Clocks - Maximum total (active + blanking)
537 UInt32 maxVerticalTotal; // Clocks - Maximum total (active + blanking)
538 UInt32 __reservedD[2]; // Init to 0
539
540 UInt8 charSizeHorizontalActive;
541 UInt8 charSizeHorizontalBlanking;
542 UInt8 charSizeHorizontalSyncOffset;
543 UInt8 charSizeHorizontalSyncPulse;
544
545 UInt8 charSizeVerticalActive;
546 UInt8 charSizeVerticalBlanking;
547 UInt8 charSizeVerticalSyncOffset;
548 UInt8 charSizeVerticalSyncPulse;
549
550 UInt8 charSizeHorizontalBorderLeft;
551 UInt8 charSizeHorizontalBorderRight;
552 UInt8 charSizeVerticalBorderTop;
553 UInt8 charSizeVerticalBorderBottom;
554
555 UInt8 charSizeHorizontalTotal; // Character size for active + blanking
556 UInt8 charSizeVerticalTotal; // Character size for active + blanking
557 UInt16 __reservedE; // Reserved (Init to 0)
558
559 UInt32 minHorizontalActiveClocks;
560 UInt32 maxHorizontalActiveClocks;
561 UInt32 minHorizontalBlankingClocks;
562 UInt32 maxHorizontalBlankingClocks;
563
564 UInt32 minHorizontalSyncOffsetClocks;
565 UInt32 maxHorizontalSyncOffsetClocks;
566 UInt32 minHorizontalPulseWidthClocks;
567 UInt32 maxHorizontalPulseWidthClocks;
568
569 UInt32 minVerticalActiveClocks;
570 UInt32 maxVerticalActiveClocks;
571 UInt32 minVerticalBlankingClocks;
572 UInt32 maxVerticalBlankingClocks;
573
574 UInt32 minVerticalSyncOffsetClocks;
575 UInt32 maxVerticalSyncOffsetClocks;
576 UInt32 minVerticalPulseWidthClocks;
577 UInt32 maxVerticalPulseWidthClocks;
578
579 UInt32 minHorizontalBorderLeft;
580 UInt32 maxHorizontalBorderLeft;
581 UInt32 minHorizontalBorderRight;
582 UInt32 maxHorizontalBorderRight;
583
584 UInt32 minVerticalBorderTop;
585 UInt32 maxVerticalBorderTop;
586 UInt32 minVerticalBorderBottom;
587 UInt32 maxVerticalBorderBottom;
588 UInt32 maxNumLinks; // number of links, if zero, assume link 1
589 UInt32 minLink0PixelClock; // min pixel clock for link 0 (kHz)
590 UInt32 maxLink0PixelClock; // max pixel clock for link 0 (kHz)
591 UInt32 minLink1PixelClock; // min pixel clock for link 1 (kHz)
592 UInt32 maxLink1PixelClock; // max pixel clock for link 1 (kHz)
593
594 UInt32 __reservedF[3]; // Init to 0
595};
596typedef struct IODisplayTimingRange IODisplayTimingRange;
597
598enum {
599 // supportedSignalLevels
600 kIORangeSupportsSignal_0700_0300 = 0x00000001,
601 kIORangeSupportsSignal_0714_0286 = 0x00000002,
602 kIORangeSupportsSignal_1000_0400 = 0x00000004,
603 kIORangeSupportsSignal_0700_0000 = 0x00000008
604};
605enum {
606 // supportedSyncFlags
607 kIORangeSupportsSeparateSyncs = 0x00000001,
608 kIORangeSupportsSyncOnGreen = 0x00000002,
609 kIORangeSupportsCompositeSync = 0x00000004,
610 kIORangeSupportsVSyncSerration = 0x00000008
611};
612enum {
613 // supportedSignalConfigs
614 kIORangeSupportsInterlacedCEATiming = 0x00000004,
615 kIORangeSupportsInterlacedCEATimingWithConfirm = 0x00000008
616};
617
618enum {
619 // signalConfig
620 kIODigitalSignal = 0x00000001,
621 kIOAnalogSetupExpected = 0x00000002,
622 kIOInterlacedCEATiming = 0x00000004,
623 kIONTSCTiming = 0x00000008,
624 kIOPALTiming = 0x00000010
625};
626
627enum {
628 // signalLevels for analog
629 kIOAnalogSignalLevel_0700_0300 = 0,
630 kIOAnalogSignalLevel_0714_0286 = 1,
631 kIOAnalogSignalLevel_1000_0400 = 2,
632 kIOAnalogSignalLevel_0700_0000 = 3
633};
634
635enum {
636 // horizontalSyncConfig and verticalSyncConfig
637 kIOSyncPositivePolarity = 0x00000001
638};
639
640/*!
641 * @struct IODisplayScalerInformation
642 * @abstract A structure defining the scaling capabilities of a framebuffer.
643 * @discussion This structure is used to define the limits for modes programmed as detailed timings by the OS. A data property with this structure under the key kIOFBScalerInfoKey in a framebuffer will allow the OS to program detailed timings that are scaled to a displays native resolution.
644 * @field __reservedA Set to zero.
645 * @field version Set to zero.
646 * @field __reservedB Set to zero.
647 * @field scalerFeatures Mask of scaling features. The following are defined:<br>
648 * kIOScaleStretchOnly If set the framebuffer can only provide stretched scaling with non-square pixels, without borders.<br>
649 * kIOScaleCanUpSamplePixels If set framebuffer can scale up from a smaller number of source pixels to a larger native timing (eg. 640x480 pixels on a 1600x1200 timing).<br>
650 * kIOScaleCanDownSamplePixels If set framebuffer can scale down from a larger number of source pixels to a smaller native timing (eg. 1600x1200 pixels on a 640x480 timing).<br>
651 * kIOScaleCanScaleInterlaced If set framebuffer can scale an interlaced detailed timing.<br>
652 * kIOScaleCanSupportInset If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields.<br>
653 * kIOScaleCanRotate If set framebuffer can support some of the flags in the kIOScaleRotateFlags mask.<br>
654 * kIOScaleCanBorderInsetOnly If set framebuffer can support scaled modes with non-zero horizontalScaledInset, verticalScaledInset fields, but requires the active pixels to be equal in size to the inset area, ie. can do insets with a border versus scaling an image.<br>
655 * @field maxHorizontalPixels Maximum number of horizontal source pixels (horizontalScaled).<br>
656 * @field maxVerticalPixels Maximum number of vertical source pixels (verticalScaled).<br>
657 * @field __reservedC Set to zero.
658 */
659
660struct IODisplayScalerInformation {
661 UInt32 __reservedA[1]; // Init to 0
662 UInt32 version; // Init to 0
663 UInt32 __reservedB[2]; // Init to 0
664
665 IOOptionBits scalerFeatures;
666 UInt32 maxHorizontalPixels;
667 UInt32 maxVerticalPixels;
668 UInt32 __reservedC[5]; // Init to 0
669};
670typedef struct IODisplayScalerInformation IODisplayScalerInformation;
671
672enum {
673 /* scalerFeatures */
674 kIOScaleStretchOnly = 0x00000001,
675 kIOScaleCanUpSamplePixels = 0x00000002,
676 kIOScaleCanDownSamplePixels = 0x00000004,
677 kIOScaleCanScaleInterlaced = 0x00000008,
678 kIOScaleCanSupportInset = 0x00000010,
679 kIOScaleCanRotate = 0x00000020,
680 kIOScaleCanBorderInsetOnly = 0x00000040
681};
682
683//// Connections
684
685enum {
686 kOrConnections = 0xffffffe,
687 kAndConnections = 0xffffffd
688};
689
690enum {
691 kConnectionFlags = 'flgs',
692 kConnectionSyncEnable = 'sync',
693 kConnectionSyncFlags = 'sycf',
694 kConnectionSupportsAppleSense = 'asns',
695 kConnectionSupportsLLDDCSense = 'lddc',
696 kConnectionSupportsHLDDCSense = 'hddc',
697 kConnectionEnable = 'enab',
698 kConnectionCheckEnable = 'cena',
699 kConnectionProbe = 'prob',
700 kConnectionChanged = 'chng',
701 kConnectionPower = 'powr',
702 kConnectionPostWake = 'pwak',
703 kConnectionDisplayParameterCount = 'pcnt',
704 kConnectionDisplayParameters = 'parm',
705 kConnectionOverscan = 'oscn',
706 kConnectionVideoBest = 'vbst',
707
708 kConnectionRedGammaScale = 'rgsc',
709 kConnectionGreenGammaScale = 'ggsc',
710 kConnectionBlueGammaScale = 'bgsc',
711 kConnectionGammaScale = 'gsc ',
712 kConnectionFlushParameters = 'flus',
713
714 kConnectionVBLMultiplier = 'vblm',
715
716 kConnectionHandleDisplayPortEvent = 'dpir',
717
718 kConnectionPanelTimingDisable = 'pnlt',
719
720 kConnectionColorMode = 'cyuv',
721 kConnectionColorModesSupported = 'colr',
722 kConnectionColorDepthsSupported = ' bpc',
723
724 kConnectionControllerDepthsSupported = '\0grd',
725 kConnectionControllerColorDepth = '\0dpd',
726 kConnectionControllerDitherControl = '\0gdc',
727
728 kConnectionDisplayFlags = 'dflg',
729
730 kConnectionEnableAudio = 'aud ',
731 kConnectionAudioStreaming = 'auds',
732};
733
734// kConnectionFlags values
735enum {
736 kIOConnectionBuiltIn = 0x00000800,
737 kIOConnectionStereoSync = 0x00008000
738};
739
740// kConnectionSyncControl values
741enum {
742 kIOHSyncDisable = 0x00000001,
743 kIOVSyncDisable = 0x00000002,
744 kIOCSyncDisable = 0x00000004,
745 kIONoSeparateSyncControl = 0x00000040,
746 kIOTriStateSyncs = 0x00000080,
747 kIOSyncOnBlue = 0x00000008,
748 kIOSyncOnGreen = 0x00000010,
749 kIOSyncOnRed = 0x00000020
750};
751
752// kConnectionHandleDisplayPortEvent values
753enum {
754 kIODPEventStart = 1,
755 kIODPEventIdle = 2,
756
757 kIODPEventForceRetrain = 3,
758
759 kIODPEventRemoteControlCommandPending = 256,
760 kIODPEventAutomatedTestRequest = 257,
761 kIODPEventContentProtection = 258,
762 kIODPEventMCCS = 259,
763 kIODPEventSinkSpecific = 260
764};
765
766#define kIODisplayAttributesKey "IODisplayAttributes"
767
768#define kIODisplaySupportsUnderscanKey "IODisplaySupportsUnderscan"
769#define kIODisplaySupportsBasicAudioKey "IODisplaySupportsBasicAudio"
770#define kIODisplaySupportsYCbCr444Key "IODisplaySupportsYCbCr444"
771#define kIODisplaySupportsYCbCr422Key "IODisplaySupportsYCbCr422"
772#define kIODisplaySelectedColorModeKey "cmod"
773
774enum
775{
776 kIODisplayColorMode = kConnectionColorMode,
777};
778
779#if 0
780enum
781{
782 // kConnectionColorMode attribute
783 kIODisplayColorModeReserved = 0x00000000,
784 kIODisplayColorModeRGB = 0x00000001,
785 kIODisplayColorModeYCbCr422 = 0x00000010,
786 kIODisplayColorModeYCbCr444 = 0x00000100,
787 kIODisplayColorModeRGBLimited = 0x00001000,
788 kIODisplayColorModeAuto = 0x10000000,
789};
790#endif
791
792enum
793{
794 // kConnectionColorDepthsSupported attribute
795 kIODisplayRGBColorComponentBitsUnknown = 0x00000000,
796 kIODisplayRGBColorComponentBits6 = 0x00000001,
797 kIODisplayRGBColorComponentBits8 = 0x00000002,
798 kIODisplayRGBColorComponentBits10 = 0x00000004,
799 kIODisplayRGBColorComponentBits12 = 0x00000008,
800 kIODisplayRGBColorComponentBits14 = 0x00000010,
801 kIODisplayRGBColorComponentBits16 = 0x00000020,
802
803 kIODisplayYCbCr444ColorComponentBitsUnknown = 0x00000000,
804 kIODisplayYCbCr444ColorComponentBits6 = 0x00000100,
805 kIODisplayYCbCr444ColorComponentBits8 = 0x00000200,
806 kIODisplayYCbCr444ColorComponentBits10 = 0x00000400,
807 kIODisplayYCbCr444ColorComponentBits12 = 0x00000800,
808 kIODisplayYCbCr444ColorComponentBits14 = 0x00001000,
809 kIODisplayYCbCr444ColorComponentBits16 = 0x00002000,
810
811 kIODisplayYCbCr422ColorComponentBitsUnknown = 0x00000000,
812 kIODisplayYCbCr422ColorComponentBits6 = 0x00010000,
813 kIODisplayYCbCr422ColorComponentBits8 = 0x00020000,
814 kIODisplayYCbCr422ColorComponentBits10 = 0x00040000,
815 kIODisplayYCbCr422ColorComponentBits12 = 0x00080000,
816 kIODisplayYCbCr422ColorComponentBits14 = 0x00100000,
817 kIODisplayYCbCr422ColorComponentBits16 = 0x00200000,
818};
819
820enum
821{
822 // kConnectionDitherControl attribute
823 kIODisplayDitherDisable = 0x00000000,
824 kIODisplayDitherSpatial = 0x00000001,
825 kIODisplayDitherTemporal = 0x00000002,
826 kIODisplayDitherFrameRateControl = 0x00000004,
827 kIODisplayDitherDefault = 0x00000080,
828 kIODisplayDitherAll = 0x000000FF,
829 kIODisplayDitherRGBShift = 0,
830 kIODisplayDitherYCbCr444Shift = 8,
831 kIODisplayDitherYCbCr422Shift = 16,
832};
833
834enum
835{
836 // kConnectionDisplayFlags attribute
837 kIODisplayNeedsCEAUnderscan = 0x00000001,
838};
839
840enum
841{
842kIODisplayPowerStateOff =0,
843kIODisplayPowerStateMinUsable =1,
844kIODisplayPowerStateOn = 2,
845};
846
847#define IO_DISPLAY_CAN_FILL 0x00000040
848#define IO_DISPLAY_CAN_BLIT 0x00000020
849
850#define IO_24BPP_TRANSFER_TABLE_SIZE 256
851#define IO_15BPP_TRANSFER_TABLE_SIZE 256
852#define IO_8BPP_TRANSFER_TABLE_SIZE 256
853#define IO_12BPP_TRANSFER_TABLE_SIZE 256
854#define IO_2BPP_TRANSFER_TABLE_SIZE 256
855
856#define STDFB_BM256_TO_BM38_MAP_SIZE 256
857#define STDFB_BM38_TO_BM256_MAP_SIZE 256
858#define STDFB_BM38_TO_256_WITH_LOGICAL_SIZE \
859 (STDFB_BM38_TO_BM256_MAP_SIZE + (256/sizeof(int)))
860
861#define STDFB_4BPS_TO_5BPS_MAP_SIZE 16
862#define STDFB_5BPS_TO_4BPS_MAP_SIZE 32
863
864enum {
865 // connection types for IOServiceOpen
866 kIOFBServerConnectType = 0,
867 kIOFBSharedConnectType = 1
868};
869
870enum {
871 // options for IOServiceRequestProbe()
872 kIOFBUserRequestProbe = 0x00000001
873};
874
875struct IOGPoint {
876 SInt16 x;
877 SInt16 y;
878};
879typedef struct IOGPoint IOGPoint;
880
881struct IOGSize {
882 SInt16 width;
883 SInt16 height;
884};
885typedef struct IOGSize IOGSize;
886
887struct IOGBounds {
888 SInt16 minx;
889 SInt16 maxx;
890 SInt16 miny;
891 SInt16 maxy;
892};
893typedef struct IOGBounds IOGBounds;
894
895#ifndef kIODescriptionKey
896
897#if !defined(__Point__) && !defined(BINTREE_H) && !defined(__MACTYPES__)
898#define __Point__
899typedef IOGPoint Point;
900#endif
901
902#if !defined(__Bounds__) && !defined(BINTREE_H) && !defined(__MACTYPES__)
903#define __Bounds__
904typedef IOGBounds Bounds;
905#endif
906
907#endif /* !kIODescriptionKey */
908
909// cursor description
910
911enum {
912 kTransparentEncoding = 0,
913 kInvertingEncoding
914};
915
916enum {
917 kTransparentEncodingShift = (kTransparentEncoding << 1),
918 kTransparentEncodedPixel = (0x01 << kTransparentEncodingShift),
919
920 kInvertingEncodingShift = (kInvertingEncoding << 1),
921 kInvertingEncodedPixel = (0x01 << kInvertingEncodingShift)
922};
923
924enum {
925 kHardwareCursorDescriptorMajorVersion = 0x0001,
926 kHardwareCursorDescriptorMinorVersion = 0x0000
927};
928
929/*!
930 * @struct IOHardwareCursorDescriptor
931 * @abstract A structure defining the format of a hardware cursor.
932 * @discussion This structure is used by IOFramebuffer to define the format of a hardware cursor.
933 * @field majorVersion Set to kHardwareCursorDescriptorMajorVersion.
934 * @field minorVersion Set to kHardwareCursorDescriptorMinorVersion.
935 * @field height Maximum size of the cursor.
936 * @field width Maximum size of the cursor.
937 * @field bitDepth Number bits per pixel, or a QD/QT pixel type, for example kIO8IndexedPixelFormat, kIO32ARGBPixelFormat.
938 * @field maskBitDepth Unused.
939 * @field numColors Number of colors for indexed pixel types.
940 * @field colorEncodings An array pointer specifying the pixel values corresponding to the indices into the color table, for indexed pixel types.
941 * @field flags None defined, set to zero.
942 * @field supportedSpecialEncodings Mask of supported special pixel values, eg. kTransparentEncodedPixel, kInvertingEncodedPixel.
943 * @field specialEncodings Array of pixel values for each supported special encoding.
944 */
945
946struct IOHardwareCursorDescriptor {
947 UInt16 majorVersion;
948 UInt16 minorVersion;
949 UInt32 height;
950 UInt32 width;
951 UInt32 bitDepth; // bits per pixel, or a QD/QT pixel type
952 UInt32 maskBitDepth; // unused
953 UInt32 numColors; // number of colors in the colorMap. ie.
954 UInt32 * colorEncodings;
955 UInt32 flags;
956 UInt32 supportedSpecialEncodings;
957 UInt32 specialEncodings[16];
958};
959typedef struct IOHardwareCursorDescriptor IOHardwareCursorDescriptor;
960
961enum {
962 kHardwareCursorInfoMajorVersion = 0x0001,
963 kHardwareCursorInfoMinorVersion = 0x0000
964};
965
966/*!
967 * @struct IOHardwareCursorInfo
968 * @abstract A structure defining the converted data of a hardware cursor.
969 * @discussion This structure is used by IOFramebuffer to return the data of a hardware cursor by convertCursorImage() after conversion based on the IOHardwareCursorDescriptor passed to that routine.
970 * @field majorVersion Set to kHardwareCursorInfoMajorVersion.
971 * @field minorVersion Set to kHardwareCursorInfoMinorVersion.
972 * @field cursorHeight The actual size of the cursor is returned.
973 * @field cursorWidth The actual size of the cursor is returned.
974 * @field colorMap Pointer to array of IOColorEntry structures, with the number of elements set by the numColors field of the IOHardwareCursorDescriptor. Zero should be passed for direct pixel formats.
975 * @field hardwareCursorData Buffer to receive the converted cursor data.
976 * @field cursorHotSpotX Cursor's hotspot.
977 * @field cursorHotSpotY Cursor's hotspot.
978 * @field reserved Reserved, set to zero.
979 */
980
981struct IOHardwareCursorInfo {
982 UInt16 majorVersion;
983 UInt16 minorVersion;
984 UInt32 cursorHeight;
985 UInt32 cursorWidth;
986 // nil or big enough for hardware's max colors
987 IOColorEntry * colorMap;
988 UInt8 * hardwareCursorData;
989 UInt16 cursorHotSpotX;
990 UInt16 cursorHotSpotY;
991 UInt32 reserved[5];
992};
993typedef struct IOHardwareCursorInfo IOHardwareCursorInfo;
994
995// interrupt types
996
997enum {
998 kIOFBVBLInterruptType = 'vbl ',
999 kIOFBHBLInterruptType = 'hbl ',
1000 kIOFBFrameInterruptType = 'fram',
1001 // Demand to check configuration (Hardware unchanged)
1002 kIOFBConnectInterruptType = 'dci ',
1003 // Demand to rebuild (Hardware has reinitialized on dependent change)
1004 kIOFBChangedInterruptType = 'chng',
1005 // Demand to remove framebuffer (Hardware not available on dependent change -- but must not buserror)
1006 kIOFBOfflineInterruptType = 'remv',
1007 // Notice that hardware is available (after being removed)
1008 kIOFBOnlineInterruptType = 'add ',
1009 // DisplayPort short pulse
1010 kIOFBDisplayPortInterruptType = 'dpir',
1011 // DisplayPort link event
1012 kIOFBDisplayPortLinkChangeInterruptType = 'dplk',
1013 // MCCS
1014 kIOFBMCCSInterruptType = 'mccs',
1015 // early vram notification
1016 kIOFBWakeInterruptType = 'vwak'
1017};
1018
1019// IOAppleTimingID's
1020enum {
1021 kIOTimingIDInvalid = 0, /* Not a standard timing */
1022 kIOTimingIDApple_FixedRateLCD = 42, /* Lump all fixed-rate LCDs into one category.*/
1023 kIOTimingIDApple_512x384_60hz = 130, /* 512x384 (60 Hz) Rubik timing. */
1024 kIOTimingIDApple_560x384_60hz = 135, /* 560x384 (60 Hz) Rubik-560 timing. */
1025 kIOTimingIDApple_640x480_67hz = 140, /* 640x480 (67 Hz) HR timing. */
1026 kIOTimingIDApple_640x400_67hz = 145, /* 640x400 (67 Hz) HR-400 timing. */
1027 kIOTimingIDVESA_640x480_60hz = 150, /* 640x480 (60 Hz) VGA timing. */
1028 kIOTimingIDVESA_640x480_72hz = 152, /* 640x480 (72 Hz) VGA timing. */
1029 kIOTimingIDVESA_640x480_75hz = 154, /* 640x480 (75 Hz) VGA timing. */
1030 kIOTimingIDVESA_640x480_85hz = 158, /* 640x480 (85 Hz) VGA timing. */
1031 kIOTimingIDGTF_640x480_120hz = 159, /* 640x480 (120 Hz) VESA Generalized Timing Formula */
1032 kIOTimingIDApple_640x870_75hz = 160, /* 640x870 (75 Hz) FPD timing.*/
1033 kIOTimingIDApple_640x818_75hz = 165, /* 640x818 (75 Hz) FPD-818 timing.*/
1034 kIOTimingIDApple_832x624_75hz = 170, /* 832x624 (75 Hz) GoldFish timing.*/
1035 kIOTimingIDVESA_800x600_56hz = 180, /* 800x600 (56 Hz) SVGA timing. */
1036 kIOTimingIDVESA_800x600_60hz = 182, /* 800x600 (60 Hz) SVGA timing. */
1037 kIOTimingIDVESA_800x600_72hz = 184, /* 800x600 (72 Hz) SVGA timing. */
1038 kIOTimingIDVESA_800x600_75hz = 186, /* 800x600 (75 Hz) SVGA timing. */
1039 kIOTimingIDVESA_800x600_85hz = 188, /* 800x600 (85 Hz) SVGA timing. */
1040 kIOTimingIDVESA_1024x768_60hz = 190, /* 1024x768 (60 Hz) VESA 1K-60Hz timing. */
1041 kIOTimingIDVESA_1024x768_70hz = 200, /* 1024x768 (70 Hz) VESA 1K-70Hz timing. */
1042 kIOTimingIDVESA_1024x768_75hz = 204, /* 1024x768 (75 Hz) VESA 1K-75Hz timing (very similar to kIOTimingIDApple_1024x768_75hz). */
1043 kIOTimingIDVESA_1024x768_85hz = 208, /* 1024x768 (85 Hz) VESA timing. */
1044 kIOTimingIDApple_1024x768_75hz = 210, /* 1024x768 (75 Hz) Apple 19" RGB. */
1045 kIOTimingIDVESA_1152x864_75hz = 215, /* 1152x864 (75 Hz) VESA timing. */
1046 kIOTimingIDApple_1152x870_75hz = 220, /* 1152x870 (75 Hz) Apple 21" RGB. */
1047 kIOTimingIDAppleNTSC_ST = 230, /* 512x384 (60 Hz, interlaced, non-convolved). */
1048 kIOTimingIDAppleNTSC_FF = 232, /* 640x480 (60 Hz, interlaced, non-convolved). */
1049 kIOTimingIDAppleNTSC_STconv = 234, /* 512x384 (60 Hz, interlaced, convolved). */
1050 kIOTimingIDAppleNTSC_FFconv = 236, /* 640x480 (60 Hz, interlaced, convolved). */
1051 kIOTimingIDApplePAL_ST = 238, /* 640x480 (50 Hz, interlaced, non-convolved). */
1052 kIOTimingIDApplePAL_FF = 240, /* 768x576 (50 Hz, interlaced, non-convolved). */
1053 kIOTimingIDApplePAL_STconv = 242, /* 640x480 (50 Hz, interlaced, convolved). */
1054 kIOTimingIDApplePAL_FFconv = 244, /* 768x576 (50 Hz, interlaced, convolved). */
1055 kIOTimingIDVESA_1280x960_75hz = 250, /* 1280x960 (75 Hz) */
1056 kIOTimingIDVESA_1280x960_60hz = 252, /* 1280x960 (60 Hz) */
1057 kIOTimingIDVESA_1280x960_85hz = 254, /* 1280x960 (85 Hz) */
1058 kIOTimingIDVESA_1280x1024_60hz = 260, /* 1280x1024 (60 Hz) */
1059 kIOTimingIDVESA_1280x1024_75hz = 262, /* 1280x1024 (75 Hz) */
1060 kIOTimingIDVESA_1280x1024_85hz = 268, /* 1280x1024 (85 Hz) */
1061 kIOTimingIDVESA_1600x1200_60hz = 280, /* 1600x1200 (60 Hz) VESA timing. */
1062 kIOTimingIDVESA_1600x1200_65hz = 282, /* 1600x1200 (65 Hz) VESA timing. */
1063 kIOTimingIDVESA_1600x1200_70hz = 284, /* 1600x1200 (70 Hz) VESA timing. */
1064 kIOTimingIDVESA_1600x1200_75hz = 286, /* 1600x1200 (75 Hz) VESA timing (pixel clock is 189.2 Mhz dot clock). */
1065 kIOTimingIDVESA_1600x1200_80hz = 288, /* 1600x1200 (80 Hz) VESA timing (pixel clock is 216>? Mhz dot clock) - proposed only. */
1066 kIOTimingIDVESA_1600x1200_85hz = 289, /* 1600x1200 (85 Hz) VESA timing (pixel clock is 229.5 Mhz dot clock). */
1067 kIOTimingIDVESA_1792x1344_60hz = 296, /* 1792x1344 (60 Hz) VESA timing (204.75 Mhz dot clock). */
1068 kIOTimingIDVESA_1792x1344_75hz = 298, /* 1792x1344 (75 Hz) VESA timing (261.75 Mhz dot clock). */
1069 kIOTimingIDVESA_1856x1392_60hz = 300, /* 1856x1392 (60 Hz) VESA timing (218.25 Mhz dot clock). */
1070 kIOTimingIDVESA_1856x1392_75hz = 302, /* 1856x1392 (75 Hz) VESA timing (288 Mhz dot clock). */
1071 kIOTimingIDVESA_1920x1440_60hz = 304, /* 1920x1440 (60 Hz) VESA timing (234 Mhz dot clock). */
1072 kIOTimingIDVESA_1920x1440_75hz = 306, /* 1920x1440 (75 Hz) VESA timing (297 Mhz dot clock). */
1073 kIOTimingIDSMPTE240M_60hz = 400, /* 60Hz V, 33.75KHz H, interlaced timing, 16:9 aspect, typical resolution of 1920x1035. */
1074 kIOTimingIDFilmRate_48hz = 410, /* 48Hz V, 25.20KHz H, non-interlaced timing, typical resolution of 640x480. */
1075 kIOTimingIDSony_1600x1024_76hz = 500, /* 1600x1024 (76 Hz) Sony timing (pixel clock is 170.447 Mhz dot clock). */
1076 kIOTimingIDSony_1920x1080_60hz = 510, /* 1920x1080 (60 Hz) Sony timing (pixel clock is 159.84 Mhz dot clock). */
1077 kIOTimingIDSony_1920x1080_72hz = 520, /* 1920x1080 (72 Hz) Sony timing (pixel clock is 216.023 Mhz dot clock). */
1078 kIOTimingIDSony_1920x1200_76hz = 540, /* 1900x1200 (76 Hz) Sony timing (pixel clock is 243.20 Mhz dot clock). */
1079 kIOTimingIDApple_0x0_0hz_Offline = 550, /* Indicates that this timing will take the display off-line and remove it from the system. */
1080 kIOTimingIDVESA_848x480_60hz = 570, /* 848x480 (60 Hz) VESA timing. */
1081 kIOTimingIDVESA_1360x768_60hz = 590 /* 1360x768 (60 Hz) VESA timing. */
1082};
1083
1084// framebuffer property keys
1085
1086#define kIOFramebufferInfoKey "IOFramebufferInformation"
1087
1088#define kIOFBWidthKey "IOFBWidth"
1089#define kIOFBHeightKey "IOFBHeight"
1090#define kIOFBRefreshRateKey "IOFBRefreshRate"
1091#define kIOFBFlagsKey "IOFBFlags"
1092#define kIOFBBytesPerRowKey "IOFBBytesPerRow"
1093#define kIOFBBytesPerPlaneKey "IOFBBytesPerPlane"
1094#define kIOFBBitsPerPixelKey "IOFBBitsPerPixel"
1095#define kIOFBComponentCountKey "IOFBComponentCount"
1096#define kIOFBBitsPerComponentKey "IOFBBitsPerComponent"
1097
1098#define kIOFBDetailedTimingsKey "IOFBDetailedTimings"
1099#define kIOFBTimingRangeKey "IOFBTimingRange"
1100#define kIOFBScalerInfoKey "IOFBScalerInfo"
1101#define kIOFBCursorInfoKey "IOFBCursorInfo"
1102#define kIOFBHDMIDongleROMKey "IOFBHDMIDongleROM"
1103
1104#define kIOFBHostAccessFlagsKey "IOFBHostAccessFlags"
1105
1106#define kIOFBMemorySizeKey "IOFBMemorySize"
1107
1108#define kIOFBNeedsRefreshKey "IOFBNeedsRefresh"
1109
1110#define kIOFBProbeOptionsKey "IOFBProbeOptions"
1111
1112#define kIOFBGammaWidthKey "IOFBGammaWidth"
1113#define kIOFBGammaCountKey "IOFBGammaCount"
1114#define kIOFBCLUTDeferKey "IOFBCLUTDefer"
1115
1116#define kIOFBDisplayPortConfigurationDataKey "dpcd-registers"
1117
1118// exists on the hibernate progress display device
1119#ifndef kIOHibernatePreviewActiveKey
1120#define kIOHibernatePreviewActiveKey "IOHibernatePreviewActive"
1121// values for kIOHibernatePreviewActiveKey set by driver
1122enum {
1123 kIOHibernatePreviewActive = 0x00000001,
1124 kIOHibernatePreviewUpdates = 0x00000002
1125};
1126#endif
1127
1128#define kIOHibernateEFIGfxStatusKey "IOHibernateEFIGfxStatus"
1129
1130// CFNumber/CFData
1131#define kIOFBAVSignalTypeKey "av-signal-type"
1132enum {
1133 kIOFBAVSignalTypeUnknown = 0x00000000,
1134 kIOFBAVSignalTypeVGA = 0x00000001,
1135 kIOFBAVSignalTypeDVI = 0x00000002,
1136 kIOFBAVSignalTypeHDMI = 0x00000008,
1137 kIOFBAVSignalTypeDP = 0x00000010,
1138};
1139
1140// kIOFBDisplayPortTrainingAttribute data
1141
1142struct IOFBDPLinkConfig
1143{
1144 uint16_t version; // 8 bit high (major); 8 bit low (minor)
1145 uint8_t bitRate; // same encoding as the spec
1146 uint8_t __reservedA[1]; // reserved set to zero
1147uint16_t t1Time; // minimum duration of the t1 pattern (microseconds)
1148uint16_t t2Time; // minimum duration of the t2 pattern
1149uint16_t t3Time; // minimum duration of the t3 pattern
1150uint8_t idlePatterns; // minimum number of idle patterns
1151uint8_t laneCount; // number of lanes in the link
1152uint8_t voltage;
1153uint8_t preEmphasis;
1154uint8_t downspread;
1155uint8_t scrambler;
1156uint8_t maxBitRate; // same encoding as the bitRate field
1157uint8_t maxLaneCount; // an integer
1158uint8_t maxDownspread; // 0 = Off. 1 = 0.5
1159uint8_t __reservedB[9];// reserved set to zero - fix align and provide 8 bytes of padding.
1160};
1161typedef struct IOFBDPLinkConfig IOFBDPLinkConfig;
1162
1163enum
1164{
1165 kIOFBBitRateRBR= 0x06,// 1.62 Gbps per lane
1166 kIOFBBitRateHBR= 0x0A,// 2.70 Gbps per lane
1167 kIOFBBitRateHBR2= 0x14,// 5.40 Gbps per lane
1168};
1169
1170enum {
1171 kIOFBLinkVoltageLevel0= 0x00,
1172 kIOFBLinkVoltageLevel1= 0x01,
1173 kIOFBLinkVoltageLevel2= 0x02,
1174 kIOFBLinkVoltageLevel3= 0x03
1175};
1176
1177enum
1178{
1179 kIOFBLinkPreEmphasisLevel0 = 0x00,
1180 kIOFBLinkPreEmphasisLevel1 = 0x01,
1181 kIOFBLinkPreEmphasisLevel2 = 0x02,
1182 kIOFBLinkPreEmphasisLevel3 = 0x03
1183};
1184
1185enum
1186{
1187 kIOFBLinkDownspreadNone = 0x0,
1188 kIOFBLinkDownspreadMax = 0x1
1189};
1190
1191enum
1192{
1193 kIOFBLinkScramblerNormal = 0x0, // for external displays
1194 kIOFBLinkScramblerAlternate = 0x1 // used for eDP
1195};
1196
1197// diagnostic keys
1198
1199#define kIOFBConfigKey "IOFBConfig"
1200#define kIOFBModesKey "IOFBModes"
1201#define kIOFBModeIDKey "ID"
1202#define kIOFBModeDMKey "DM"
1203#define kIOFBModeTMKey "TM"
1204#define kIOFBModeAIDKey "AID"
1205#define kIOFBModeDFKey "DF"
1206#define kIOFBModePIKey "PI"
1207
1208// display property keys
1209
1210#define kIODisplayEDIDKey "IODisplayEDID"
1211#define kIODisplayEDIDOriginalKey "IODisplayEDIDOriginal"
1212#define kIODisplayLocationKey "IODisplayLocation" // CFString
1213#define kIODisplayConnectFlagsKey "IODisplayConnectFlags" // CFNumber
1214#define kIODisplayHasBacklightKey "IODisplayHasBacklight" // CFBoolean
1215#define kIODisplayIsDigitalKey "IODisplayIsDigital" // CFBoolean
1216#define kDisplayBundleKey "DisplayBundle"
1217
1218#define kAppleDisplayTypeKey "AppleDisplayType"
1219#define kAppleSenseKey "AppleSense"
1220
1221#define kIODisplayMCCSVersionKey "IODisplayMCCSVersion"
1222#define kIODisplayTechnologyTypeKey "IODisplayTechnologyType"
1223#define kIODisplayUsageTimeKey "IODisplayUsageTime"
1224#define kIODisplayFirmwareLevelKey "IODisplayFirmwareLevel"
1225
1226enum {
1227 kDisplayVendorIDUnknown = 'unkn',
1228 kDisplayProductIDGeneric = 0x717
1229};
1230
1231#define kDisplayVendorID "DisplayVendorID" // CFNumber
1232#define kDisplayProductID "DisplayProductID" // CFNumber
1233#define kDisplaySerialNumber "DisplaySerialNumber" // CFNumber
1234#define kDisplaySerialString "DisplaySerialString" // CFString
1235#define kDisplayWeekOfManufacture "DisplayWeekManufacture" // CFNumber
1236#define kDisplayYearOfManufacture "DisplayYearManufacture" // CFNumber
1237
1238// CFDictionary of language-locale keys, name values
1239// eg. "en"="Color LCD", "en-GB"="Colour LCD"
1240#define kDisplayProductName "DisplayProductName"
1241
1242// all CFNumber or CFArray of CFNumber (floats)
1243#define kDisplayWhitePointX "DisplayWhitePointX"
1244#define kDisplayWhitePointY "DisplayWhitePointY"
1245#define kDisplayRedPointX "DisplayRedPointX"
1246#define kDisplayRedPointY "DisplayRedPointY"
1247#define kDisplayGreenPointX "DisplayGreenPointX"
1248#define kDisplayGreenPointY "DisplayGreenPointY"
1249#define kDisplayBluePointX "DisplayBluePointX"
1250#define kDisplayBluePointY "DisplayBluePointY"
1251#define kDisplayWhiteGamma "DisplayWhiteGamma"
1252#define kDisplayRedGamma "DisplayRedGamma"
1253#define kDisplayGreenGamma "DisplayGreenGamma"
1254#define kDisplayBlueGamma "DisplayBlueGamma"
1255
1256// Display gamma
1257#define kDisplayGammaChannels "DisplayGammaChannels" // CFNumber 1 or 3 channel count
1258#define kDisplayGammaEntryCount "DisplayGammaEntryCount" // CFNumber 1-based count of entries per channel
1259#define kDisplayGammaEntrySize "DisplayGammaEntrySize" // CFNumber size in bytes of each table entry
1260#define kDisplayGammaTable "DisplayGammaTable" // CFData
1261
1262// CFBoolean
1263#define kDisplayBrightnessAffectsGamma "DisplayBrightnessAffectsGamma"
1264#define kDisplayViewAngleAffectsGamma "DisplayViewAngleAffectsGamma"
1265
1266// CFData
1267#define kDisplayCSProfile "DisplayCSProfile"
1268
1269// CFNumber
1270#define kDisplayHorizontalImageSize "DisplayHorizontalImageSize"
1271#define kDisplayVerticalImageSize "DisplayVerticalImageSize"
1272
1273// Pixel description
1274
1275// CFBoolean
1276#define kDisplayFixedPixelFormat "DisplayFixedPixelFormat"
1277
1278enum {
1279 kDisplaySubPixelLayoutUndefined = 0x00000000,
1280 kDisplaySubPixelLayoutRGB = 0x00000001,
1281 kDisplaySubPixelLayoutBGR = 0x00000002,
1282 kDisplaySubPixelLayoutQuadGBL = 0x00000003,
1283 kDisplaySubPixelLayoutQuadGBR = 0x00000004,
1284
1285 kDisplaySubPixelConfigurationUndefined = 0x00000000,
1286 kDisplaySubPixelConfigurationDelta = 0x00000001,
1287 kDisplaySubPixelConfigurationStripe = 0x00000002,
1288 kDisplaySubPixelConfigurationStripeOffset = 0x00000003,
1289 kDisplaySubPixelConfigurationQuad = 0x00000004,
1290
1291 kDisplaySubPixelShapeUndefined = 0x00000000,
1292 kDisplaySubPixelShapeRound = 0x00000001,
1293 kDisplaySubPixelShapeSquare = 0x00000002,
1294 kDisplaySubPixelShapeRectangular = 0x00000003,
1295 kDisplaySubPixelShapeOval = 0x00000004,
1296 kDisplaySubPixelShapeElliptical = 0x00000005
1297};
1298
1299// CFNumbers
1300#define kDisplaySubPixelLayout "DisplaySubPixelLayout"
1301#define kDisplaySubPixelConfiguration "DisplaySubPixelConfiguration"
1302#define kDisplaySubPixelShape "DisplaySubPixelShape"
1303
1304#define kIODisplayOverrideMatchingKey "IODisplayOverrideMatching"
1305
1306// Display parameters
1307
1308#define kIODisplayParametersKey "IODisplayParameters"
1309#define kIODisplayGUIDKey "IODisplayGUID"
1310
1311#define kIODisplayValueKey "value"
1312#define kIODisplayMinValueKey "min"
1313#define kIODisplayMaxValueKey "max"
1314
1315#define kIODisplayBrightnessKey "brightness"
1316#define kIODisplayLinearBrightnessKey "linear-brightness"
1317#define kIODisplayUsableLinearBrightnessKey "usable-linear-brightness"
1318#define kIODisplayBrightnessFadeKey "brightness-fade"
1319#define kIODisplayContrastKey "contrast"
1320#define kIODisplayHorizontalPositionKey "horizontal-position"
1321#define kIODisplayHorizontalSizeKey "horizontal-size"
1322#define kIODisplayVerticalPositionKey "vertical-position"
1323#define kIODisplayVerticalSizeKey "vertical-size"
1324#define kIODisplayTrapezoidKey "trapezoid"
1325#define kIODisplayPincushionKey "pincushion"
1326#define kIODisplayParallelogramKey "parallelogram"
1327#define kIODisplayRotationKey "rotation"
1328#define kIODisplayTheatreModeKey "theatre-mode"
1329#define kIODisplayTheatreModeWindowKey "theatre-mode-window"
1330#define kIODisplayOverscanKey "oscn"
1331#define kIODisplayVideoBestKey "vbst"
1332
1333#define kIODisplaySpeakerVolumeKey "speaker-volume"
1334#define kIODisplaySpeakerSelectKey "speaker-select"
1335#define kIODisplayMicrophoneVolumeKey "microphone-volume"
1336#define kIODisplayAmbientLightSensorKey "ambient-light-sensor"
1337#define kIODisplayAudioMuteAndScreenBlankKey "audio-mute-and-screen-blank"
1338#define kIODisplayAudioTrebleKey "audio-treble"
1339#define kIODisplayAudioBassKey "audio-bass"
1340#define kIODisplayAudioBalanceLRKey "audio-balance-LR"
1341#define kIODisplayAudioProcessorModeKey "audio-processor-mode"
1342#define kIODisplayPowerModeKey "power-mode"
1343#define kIODisplayManufacturerSpecificKey "manufacturer-specific"
1344
1345#define kIODisplayPowerStateKey "dsyp"
1346
1347#define kIODisplayControllerIDKey"IODisplayControllerID"
1348#define kIODisplayCapabilityStringKey "IODisplayCapabilityString"
1349
1350#define kIODisplayRedGammaScaleKey "rgsc"
1351#define kIODisplayGreenGammaScaleKey "ggsc"
1352#define kIODisplayBlueGammaScaleKey "bgsc"
1353#define kIODisplayGammaScaleKey "gsc "
1354
1355#define kIODisplayParametersCommitKey "commit"
1356#define kIODisplayParametersDefaultKey "defaults"
1357#define kIODisplayParametersFlushKey "flush"
1358
1359#ifdef __cplusplus
1360}
1361#endif
1362
1363#endif /* ! _IOKIT_IOGRAPHICSTYPES_H */
1364

Archive Download this file

Revision: 2783