Annotation of XNU/iokit/IOKit/ndrvsupport/IONDRVFramebuffer.h, revision 1.1.1.1

1.1       root        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:  * Copyright (c) 1997-1998 Apple Computer, Inc.
                     24:  *
                     25:  *
                     26:  * HISTORY
                     27:  *
                     28:  * sdouglas  22 Oct 97 - first checked in.
                     29:  * sdouglas  24 Jul 98 - start IOKit.
                     30:  * sdouglas  15 Dec 98 - cpp.
                     31:  *
                     32:  */
                     33: 
                     34: #ifndef _IOKIT_IONDRVFRAMEBUFFER_H
                     35: #define _IOKIT_IONDRVFRAMEBUFFER_H
                     36: 
                     37: #include <IOKit/graphics/IOFramebuffer.h>
                     38: #include <IOKit/ndrvsupport/IOMacOSVideo.h>
                     39: 
                     40: class IONDRVFramebuffer : public IOFramebuffer
                     41: {
                     42:     OSDeclareDefaultStructors(IONDRVFramebuffer)
                     43: 
                     44: protected:
                     45: 
                     46:     IOService *                        nub;
                     47:     class IONDRV *             ndrv;
                     48: 
                     49:     // current configuration
                     50:     IODisplayModeID            currentDisplayMode;
                     51:     IOIndex                    currentDepth;
                     52:     IOIndex                    currentPage;
                     53:     bool                       directMode;
                     54: 
                     55:     IOPhysicalAddress          physicalFramebuffer;
                     56:     IODeviceMemory     *       vramRange;
                     57: 
                     58:     IOIndex                    startAt8;
                     59:     UInt8                      grayMode;
                     60:     UInt8                      lastGrayMode;
                     61:     VDClutBehavior             lastClutSetting;
                     62: 
                     63:     bool                       consoleDevice;
                     64:     UInt32                     ndrvState;
                     65:     SInt32                     ndrvEnter;
                     66: 
                     67:     IODeviceMemory *           vramMemory;
                     68: 
                     69:     VDResolutionInfoRec                cachedVDResolution;
                     70: 
                     71:     struct _VSLService *       vslServices;
                     72: 
                     73: private:
                     74: 
                     75:     void initForPM ( void );
                     76:     IOReturn setPowerState( unsigned long, IOService* );
                     77:     unsigned long maxCapabilityForDomainState( IOPMPowerFlags );
                     78:     unsigned long initialPowerStateForDomainState( IOPMPowerFlags );
                     79:     unsigned long powerStateForDomainState( IOPMPowerFlags );
                     80: 
                     81:     virtual IOReturn checkDriver( void );
                     82:     virtual UInt32 iterateAllModes( IODisplayModeID * displayModeIDs );
                     83:     virtual IOReturn getResInfoForMode( IODisplayModeID modeID,
                     84:                                     VDResolutionInfoRec ** theInfo );
                     85:     virtual void getCurrentConfiguration( void );
                     86: 
                     87: public:
                     88:     virtual IOReturn doControl( UInt32 code, void * params );
                     89:     virtual IOReturn doStatus( UInt32 code, void * params );
                     90: 
                     91: public:
                     92: 
                     93:     virtual IOService * probe( IOService *     provider,
                     94:                                SInt32 *        score );
                     95: 
                     96:     virtual bool start( IOService * provider );
                     97: 
                     98:     virtual void free( void );
                     99: 
                    100:     virtual IOReturn enableController( void );
                    101: 
                    102:     virtual IODeviceMemory * makeSubRange( IOPhysicalAddress start,
                    103:                                            IOPhysicalLength length );
                    104:     virtual IODeviceMemory * getApertureRange( IOPixelAperture aperture );
                    105:     virtual IODeviceMemory * getVRAMRange( void );
                    106: 
                    107:     virtual IODeviceMemory * findVRAM( void );
                    108: 
                    109:     virtual bool isConsoleDevice( void );
                    110: 
                    111:     virtual const char * getPixelFormats( void );
                    112: 
                    113:     // Array of supported display modes
                    114:     virtual IOItemCount getDisplayModeCount( void );
                    115:     virtual IOReturn getDisplayModes( IODisplayModeID * allDisplayModes );
                    116: 
                    117:     // Info about a display mode
                    118:     virtual IOReturn getInformationForDisplayMode( IODisplayModeID displayMode,
                    119:                     IODisplayModeInformation * info );
                    120: 
                    121:     // Mask of pixel formats available in mode and depth
                    122:     virtual UInt64  getPixelFormatsForDisplayMode( IODisplayModeID displayMode,
                    123:                     IOIndex depth );
                    124: 
                    125:     virtual IOReturn getPixelInformation(
                    126:        IODisplayModeID displayMode, IOIndex depth,
                    127:        IOPixelAperture aperture, IOPixelInformation * pixelInfo );
                    128: 
                    129:     // Framebuffer info
                    130: 
                    131:     // Current display mode and depth
                    132:     virtual IOReturn getCurrentDisplayMode( IODisplayModeID * displayMode,
                    133:                             IOIndex * depth );
                    134: 
                    135:     // Set display mode and depth
                    136:     virtual IOReturn setDisplayMode( IODisplayModeID displayMode,
                    137:                             IOIndex depth );
                    138: 
                    139:     // For pages
                    140:     virtual IOReturn setApertureEnable( IOPixelAperture aperture,
                    141:                    IOOptionBits enable );
                    142: 
                    143:     virtual IOReturn setStartupDisplayMode( IODisplayModeID displayMode,
                    144:                             IOIndex depth );
                    145:     virtual IOReturn getStartupDisplayMode( IODisplayModeID * displayMode,
                    146:                             IOIndex * depth );
                    147: 
                    148:     //// CLUTs
                    149: 
                    150:     virtual IOReturn setCLUTWithEntries( IOColorEntry * colors, UInt32 index,
                    151:                 UInt32 numEntries, IOOptionBits options );
                    152: 
                    153:     //// Gamma
                    154: 
                    155:     virtual IOReturn setGammaTable( UInt32 channelCount, UInt32 dataCount,
                    156:                     UInt32 dataWidth, void * data );
                    157: 
                    158:     //// Display mode timing information
                    159: 
                    160:     virtual IOReturn getTimingInfoForDisplayMode( IODisplayModeID displayMode,
                    161:                 IOTimingInformation * info );
                    162: 
                    163:     //// Controller attributes
                    164: 
                    165:     virtual IOReturn getAttribute( IOSelect attribute, UInt32 * value );
                    166: 
                    167:     //// Connections
                    168: 
                    169:     virtual IOItemCount getConnectionCount( void );
                    170: 
                    171:     virtual IOReturn getAttributeForConnection( IOIndex connectIndex,
                    172:                     IOSelect attribute, UInt32  * value );
                    173:     
                    174:     virtual IOReturn setAttributeForConnection( IOIndex connectIndex,
                    175:                     IOSelect attribute, UInt32  info );
                    176: 
                    177:     // Apple sensing
                    178: 
                    179:     virtual IOReturn getAppleSense( IOIndex connectIndex,
                    180:             UInt32 * senseType,
                    181:             UInt32 * primary,
                    182:             UInt32 * extended,
                    183:             UInt32 * displayType );
                    184: 
                    185:     virtual IOReturn connectFlags( IOIndex connectIndex,
                    186:                     IODisplayModeID displayMode, IOOptionBits * flags );
                    187: 
                    188:     //// IOHighLevelDDCSense
                    189: 
                    190:     virtual bool hasDDCConnect( IOIndex connectIndex );
                    191:     virtual IOReturn getDDCBlock( IOIndex connectIndex, UInt32 blockNumber,
                    192:                     IOSelect blockType, IOOptionBits options,
                    193:                     UInt8 * data, IOByteCount * length );
                    194: 
                    195:     //// Interrupts
                    196: 
                    197:     virtual IOReturn registerForInterruptType( IOSelect interruptType,
                    198:                        IOFBInterruptProc proc, OSObject * target, void * ref,
                    199:                        void ** interruptRef );
                    200:     virtual IOReturn unregisterInterrupt( void * interruptRef );
                    201:     virtual IOReturn setInterruptState( void * interruptRef, UInt32 state );
                    202: 
                    203:     //// HW Cursors
                    204: 
                    205:     virtual IOReturn setCursorImage( void * cursorImage );
                    206:     virtual IOReturn setCursorState( SInt32 x, SInt32 y, bool visible );
                    207: 
                    208:     //// VSL calls
                    209: 
                    210:     static OSStatus VSLNewInterruptService(
                    211:                             void * entryID,
                    212:                             UInt32 serviceType,
                    213:                             _VSLService ** serviceID );
                    214:     static OSStatus VSLDisposeInterruptService( _VSLService * serviceID );
                    215:     static OSStatus VSLDoInterruptService( _VSLService * serviceID );
                    216:     static Boolean  VSLPrepareCursorForHardwareCursor(
                    217:                             void * cursorRef,
                    218:                             IOHardwareCursorDescriptor * hwDesc,
                    219:                             IOHardwareCursorInfo * hwCursorInfo );
                    220: };
                    221: 
                    222: #endif /* ! _IOKIT_IONDRVFRAMEBUFFER_H */
                    223: 
                    224: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.