1706f2543Smrg/*
2706f2543Smrg * Copyright (c) 2009 Tiago Vignatti
3706f2543Smrg *
4706f2543Smrg * Permission is hereby granted, free of charge, to any person
5706f2543Smrg * obtaining a copy of this software and associated documentation
6706f2543Smrg * files (the "Software"), to deal in the Software without
7706f2543Smrg * restriction, including without limitation the rights to use,
8706f2543Smrg * copy, modify, merge, publish, distribute, sublicense, and/or sell
9706f2543Smrg * copies of the Software, and to permit persons to whom the
10706f2543Smrg * Software is furnished to do so, subject to the following
11706f2543Smrg * conditions:
12706f2543Smrg *
13706f2543Smrg * The above copyright notice and this permission notice shall be
14706f2543Smrg * included in all copies or substantial portions of the Software.
15706f2543Smrg *
16706f2543Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17706f2543Smrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18706f2543Smrg * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19706f2543Smrg * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20706f2543Smrg * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21706f2543Smrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22706f2543Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23706f2543Smrg * OTHER DEALINGS IN THE SOFTWARE.
24706f2543Smrg */
25706f2543Smrg
26706f2543Smrg#ifndef __XF86VGAARBITER_H
27706f2543Smrg#define __XF86VGAARBITER_H
28706f2543Smrg
29706f2543Smrg#include "screenint.h"
30706f2543Smrg#include "misc.h"
31706f2543Smrg#include "xf86.h"
32706f2543Smrg
33706f2543Smrg/* Functions */
34706f2543Smrgextern void xf86VGAarbiterInit(void);
35706f2543Smrgextern void xf86VGAarbiterFini(void);
36706f2543Smrgvoid xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
37706f2543Smrgextern Bool xf86VGAarbiterWrapFunctions(void);
38706f2543Smrgextern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
39706f2543Smrgextern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
40706f2543Smrg
41706f2543Smrg/* allow a driver to remove itself from arbiter - really should be
42706f2543Smrg * done in the kernel though */
43706f2543Smrgextern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
44706f2543Smrg/* DRI and arbiter are really not possible together,
45706f2543Smrg * you really want to remove the card from arbitration if you can */
46706f2543Smrgextern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
47706f2543Smrg
48706f2543Smrg#endif /* __XF86VGAARBITER_H */
49