a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/*
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Copyright (c) 2009 Tiago Vignatti
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Permission is hereby granted, free of charge, to any person
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * obtaining a copy of this software and associated documentation
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * files (the "Software"), to deal in the Software without
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * restriction, including without limitation the rights to use,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * copy, modify, merge, publish, distribute, sublicense, and/or sell
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * copies of the Software, and to permit persons to whom the
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * Software is furnished to do so, subject to the following
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * conditions:
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * The above copyright notice and this permission notice shall be
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * included in all copies or substantial portions of the Software.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync *
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * OTHER DEALINGS IN THE SOFTWARE.
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#ifndef __XF86VGAARBITER_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#define __XF86VGAARBITER_H
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "screenint.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "misc.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#include "xf86.h"
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* Functions */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern void xf86VGAarbiterInit(void);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern void xf86VGAarbiterFini(void);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncvoid xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern Bool xf86VGAarbiterWrapFunctions(void);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* allow a driver to remove itself from arbiter - really should be
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * done in the kernel though */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync/* DRI and arbiter are really not possible together,
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync * you really want to remove the card from arbitration if you can */
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsyncextern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync
a5e7ae69e440f6816420fc99599f044e79e716b6vboxsync#endif /* __XF86VGAARBITER_H */