Annotation of XNU/iokit/IOKit/graphics/IODisplay.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 Apple Computer, Inc.
                     24:  *
                     25:  *
                     26:  * HISTORY
                     27:  *
                     28:  * sdouglas  22 Oct 97 - first checked in.
                     29:  * sdouglas  23 Jul 98 - start IOKit
                     30:  */
                     31: 
                     32: #ifndef _IOKIT_IODISPLAY_H
                     33: #define _IOKIT_IODISPLAY_H
                     34: 
                     35: #include <IOKit/IOService.h>
                     36: #include <IOKit/graphics/IOFramebuffer.h>
                     37: 
                     38: enum {
                     39:     kIODisplayMaxPowerStates = 4
                     40: };
                     41: 
                     42: struct DisplayPMVars // these are the private instance variables for power management
                     43: {
                     44:     IOIndex    connectIndex;
                     45:     // control bytes we send to the framebuffer to control syncs
                     46:     UInt32     syncControls[kIODisplayMaxPowerStates];
                     47:     // mask bits that go with the control byte
                     48:     UInt32     syncMask;
                     49:     // current state of sync signals
                     50:     UInt32     currentSyncs;
                     51:     // highest state number normally, lowest usable state in emergency
                     52:     unsigned long max_display_state;
                     53:     bool displayIdle;          // true if the display has had power lowered due to user inactivity
                     54:     bool powerControllable;    // false if no sync control available on video display
                     55: };
                     56: 
                     57: class IODisplayConnect : public IOService
                     58: {
                     59:     OSDeclareDefaultStructors(IODisplayConnect)
                     60: 
                     61: private:
                     62:     IOIndex    connection;
                     63: 
                     64: public:
                     65:     virtual bool initWithConnection( IOIndex connection );
                     66:     virtual IOFramebuffer * getFramebuffer( void );
                     67:     virtual IOIndex getConnection( void );
                     68:     virtual IOReturn getAttributeForConnection( IOIndex,  IOSelect, UInt32  * );
                     69:     virtual IOReturn setAttributeForConnection( IOIndex, IOSelect, UInt32 );
                     70:     virtual void joinPMtree ( IOService * driver );
                     71: };
                     72: 
                     73: class IODisplay : public IOService
                     74: {
                     75:     OSDeclareAbstractStructors(IODisplay)
                     76: 
                     77: private:
                     78: 
                     79:     // used to query the framebuffer controller
                     80:     IODisplayConnect * connection;
                     81: 
                     82:     /* Reserved for future expansion. */
                     83:     int                _IODisplay_reserved[2];
                     84: 
                     85:     virtual void initForPM ( IOService * );
                     86: 
                     87:     virtual  IOReturn setAggressiveness ( unsigned long, unsigned long newLevel );
                     88:     virtual IOReturn setPowerState ( unsigned long, IOService* );
                     89:     virtual  unsigned long maxCapabilityForDomainState  ( IOPMPowerFlags );
                     90:     virtual unsigned long initialPowerStateForDomainState ( IOPMPowerFlags );
                     91:     virtual  unsigned long  powerStateForDomainState ( IOPMPowerFlags );
                     92: 
                     93:     protected:
                     94: // pointer to protected instance variables for power management
                     95: struct DisplayPMVars * displayPMVars;
                     96: 
                     97: public:
                     98:     virtual IOService * probe( IOService *     provider,
                     99:                                SInt32 *        score );
                    100: 
                    101:     virtual bool start( IOService * provider );
                    102:     
                    103:     virtual IODisplayConnect * getConnection( void );
                    104: 
                    105:     virtual IOReturn getConnectFlagsForDisplayMode(
                    106:                IODisplayModeID mode, UInt32 * flags ) = 0;
                    107: 
                    108:     virtual IOReturn getGammaTableByIndex(
                    109:        UInt32 * channelCount, UInt32 * dataCount,
                    110:        UInt32 * dataWidth, void ** data );
                    111: 
                    112:    virtual void dropOneLevel ( void );
                    113:    virtual void makeDisplayUsable ( void );
                    114:    IOReturn registerControllingDriver ( IOService*, IOPMPowerState*, unsigned long );
                    115: };
                    116: 
                    117: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
                    118: 
                    119: class AppleSenseDisplay : public IODisplay
                    120: {
                    121:     OSDeclareDefaultStructors(AppleSenseDisplay)
                    122: 
                    123: public:
                    124:     virtual IOService * probe( IOService *     provider,
                    125:                                 SInt32 *       score );
                    126: 
                    127:     virtual IOReturn getConnectFlagsForDisplayMode(
                    128:                 IODisplayModeID mode, UInt32 * flags );
                    129: };
                    130: 
                    131: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
                    132: 
                    133: class AppleNoSenseDisplay : public IODisplay
                    134: {
                    135:     OSDeclareDefaultStructors(AppleNoSenseDisplay)
                    136: 
                    137: public:
                    138:     virtual IOReturn getConnectFlagsForDisplayMode(
                    139:                 IODisplayModeID mode, UInt32 * flags );
                    140: };
                    141: 
                    142: /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
                    143: 
                    144: #endif /* ! _IOKIT_IODISPLAY_H */
                    145: 

unix.superglobalmegacorp.com

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