xf86 ddx: add vga arbiter support.

This adds support for using the libpciaccess interface for
vga arbitration support on top of a kernel which supports it.

Currently patches are queued for kernel 2.6.32 in jbarnes
pci tree, and shipping in Fedora kernel.

Co-authors:
Tiago Vignatti <tiago.vignatti@nokia.com>

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2009-08-28 11:39:42 +10:00
commit e454f106dc
14 changed files with 1517 additions and 10 deletions

View file

@ -69,6 +69,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "mipointer.h"
#include "xf86_OSproc.h"
#include "inputstr.h"
#include "xf86VGAarbiter.h"
#define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu)
@ -333,6 +334,12 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
return FALSE;
}
if (!xf86VGAarbiterAllowDRI(pScreen)) {
DRIDrvMsg(pScreen->myNum, X_WARNING,
"Direct rendering is not supported when VGA arb is necessary for the device\n");
return FALSE;
}
/*
* If Xinerama is on, don't allow DRI to initialise. It won't be usable
* anyway.