2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
23 * Copyright (c) 1997 Apple Computer, Inc.
31 #ifndef _IOKIT_IOFRAMEBUFFERUSERCLIENT_H
32 #define _IOKIT_IOFRAMEBUFFERUSERCLIENT_H
34 #include <IOKit/IOUserClient.h>
35 #include <IOKit/graphics/IOFramebuffer.h>
36 #include <IOKit/pci/IOAGPDevice.h>
38 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
40 class IOFramebufferUserClient
: public IOUserClient
42 OSDeclareDefaultStructors(IOFramebufferUserClient
)
46 IONotifier
* powerRootNotifier
;
47 IONotifier
* frameBufferNotifier
;
49 IOExternalMethod externals
[ 18 ];
55 IOFramebuffer
* owner
;
56 mach_port_t WSnotificationPort
; // how we tell window server of power changes
57 void * notificationMsg
; // Msg to be sent to Window Server.
59 bool WSKnowsWeAreOff
; // true after informing WS that framebuffer is off
60 bool ackRoot
; // true if we must ack the root domain
61 bool ackFrameBuffer
; // true if we must ack the framebuffer
62 void * PMrefcon
; // refcon to return to Power Management
64 // IOUserClient methods
65 virtual IOReturn
clientClose( void );
67 virtual IOService
* getService( void );
69 virtual IOReturn
clientMemoryForType( UInt32 type
,
70 IOOptionBits
* options
, IOMemoryDescriptor
** memory
);
72 virtual IOExternalMethod
* getExternalMethodForIndex( UInt32 index
);
74 virtual IOReturn
registerNotificationPort( mach_port_t
, UInt32
, UInt32
);
75 virtual IOReturn
getNotificationSemaphore( UInt32 interruptType
,
76 semaphore_t
* semaphore
);
80 static IOFramebufferUserClient
* withTask( task_t owningTask
);
82 virtual bool start( IOService
* provider
);
83 virtual IOReturn
setProperties( OSObject
* properties
);
85 virtual IOReturn
acknowledgeNotification(void);
89 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
91 class IOGraphicsEngineClient
: public IOUserClient
93 OSDeclareDefaultStructors(IOGraphicsEngineClient
)
97 IOFramebuffer
* owner
;
101 OSArray
* descriptors
;
103 IOExternalMethod externals
[ 4 ];
106 // IOUserClient methods
107 virtual IOReturn
clientClose( void );
110 virtual IOService
* getService( void );
112 virtual IOReturn
clientMemoryForType( UInt32 type
,
113 IOOptionBits
* options
, IOMemoryDescriptor
** memory
);
115 virtual IOExternalMethod
* getExternalMethodForIndex( UInt32 index
);
119 static IOGraphicsEngineClient
* withTask( task_t owningTask
);
120 virtual bool start( IOService
* provider
);
122 virtual IOReturn
addUserRange( vm_address_t start
, vm_size_t length
,
123 UInt32 aperture
, IOPhysicalAddress
* phys
);
125 virtual IOReturn
createAGPSpace( IOOptionBits options
,
126 IOPhysicalLength length
,
127 IOPhysicalAddress
* address
,
128 IOPhysicalLength
* lengthOut
);
130 virtual IOReturn
commitAGPMemory( vm_address_t start
,
131 vm_size_t length
, IOOptionBits options
,
132 void ** ref
, IOByteCount
* offset
);
134 virtual IOReturn
releaseAGPMemory( void * ref
);
138 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
140 class IOFramebufferSharedUserClient
: public IOUserClient
142 OSDeclareDefaultStructors(IOFramebufferSharedUserClient
)
146 IOFramebuffer
* owner
;
148 IOExternalMethod externals
[ 0 ];
152 virtual void release() const;
154 // IOUserClient methods
155 virtual IOReturn
clientClose( void );
157 virtual IOService
* getService( void );
159 virtual IOReturn
clientMemoryForType( UInt32 type
,
160 IOOptionBits
* options
, IOMemoryDescriptor
** memory
);
162 virtual IOReturn
getNotificationSemaphore( UInt32 notification_type
,
163 semaphore_t
* semaphore
);
165 virtual IOExternalMethod
* getExternalMethodForIndex( UInt32 index
);
168 static IOFramebufferSharedUserClient
* withTask( task_t owningTask
);
169 virtual bool start( IOService
* provider
);
173 #endif /* ! _IOKIT_IOFRAMEBUFFERUSERCLIENT_H */