xref: /OK3568_Linux_fs/external/xserver/hw/xfree86/common/xf86VGAarbiter.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2009 Tiago Vignatti
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person
5*4882a593Smuzhiyun  * obtaining a copy of this software and associated documentation
6*4882a593Smuzhiyun  * files (the "Software"), to deal in the Software without
7*4882a593Smuzhiyun  * restriction, including without limitation the rights to use,
8*4882a593Smuzhiyun  * copy, modify, merge, publish, distribute, sublicense, and/or sell
9*4882a593Smuzhiyun  * copies of the Software, and to permit persons to whom the
10*4882a593Smuzhiyun  * Software is furnished to do so, subject to the following
11*4882a593Smuzhiyun  * conditions:
12*4882a593Smuzhiyun  *
13*4882a593Smuzhiyun  * The above copyright notice and this permission notice shall be
14*4882a593Smuzhiyun  * included in all copies or substantial portions of the Software.
15*4882a593Smuzhiyun  *
16*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17*4882a593Smuzhiyun  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18*4882a593Smuzhiyun  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19*4882a593Smuzhiyun  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20*4882a593Smuzhiyun  * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21*4882a593Smuzhiyun  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22*4882a593Smuzhiyun  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23*4882a593Smuzhiyun  * OTHER DEALINGS IN THE SOFTWARE.
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #ifndef __XF86VGAARBITER_H
27*4882a593Smuzhiyun #define __XF86VGAARBITER_H
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun #include "screenint.h"
30*4882a593Smuzhiyun #include "misc.h"
31*4882a593Smuzhiyun #include "xf86.h"
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun /* Functions */
34*4882a593Smuzhiyun extern void xf86VGAarbiterInit(void);
35*4882a593Smuzhiyun extern void xf86VGAarbiterFini(void);
36*4882a593Smuzhiyun void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
37*4882a593Smuzhiyun extern Bool xf86VGAarbiterWrapFunctions(void);
38*4882a593Smuzhiyun extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
39*4882a593Smuzhiyun extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
40*4882a593Smuzhiyun 
41*4882a593Smuzhiyun /* allow a driver to remove itself from arbiter - really should be
42*4882a593Smuzhiyun  * done in the kernel though */
43*4882a593Smuzhiyun extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
44*4882a593Smuzhiyun 
45*4882a593Smuzhiyun /* DRI and arbiter are really not possible together,
46*4882a593Smuzhiyun  * you really want to remove the card from arbitration if you can */
47*4882a593Smuzhiyun extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun #endif                          /* __XF86VGAARBITER_H */
50