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