* Tue Aug 04 2009 Dave Airlie <airlied@redhat.com> 1.6.99-25.20090804

- fix VGA arb fatal error
This commit is contained in:
Dave Airlie 2009-08-04 10:14:56 +00:00
parent cdde67c567
commit c165c811da
2 changed files with 26 additions and 10 deletions

View File

@ -19,7 +19,7 @@
Summary: X.Org X11 X server Summary: X.Org X11 X server
Name: xorg-x11-server Name: xorg-x11-server
Version: 1.6.99 Version: 1.6.99
Release: 24.%{gitdate}%{?dist} Release: 25.%{gitdate}%{?dist}
URL: http://www.x.org URL: http://www.x.org
License: MIT License: MIT
Group: User Interface/X Group: User Interface/X
@ -527,6 +527,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Tue Aug 04 2009 Dave Airlie <airlied@redhat.com> 1.6.99-25.20090804
- fix VGA arb fatal error
* Tue Aug 04 2009 Dave Airlie <airlied@redhat.com> 1.6.99-24.20090804 * Tue Aug 04 2009 Dave Airlie <airlied@redhat.com> 1.6.99-24.20090804
- update server snapshot + add VGA arbitration - update server snapshot + add VGA arbitration

View File

@ -1,4 +1,4 @@
From 307264f4bc6c9431aea49be67a6b832ccafc7007 Mon Sep 17 00:00:00 2001 From 3e94ca1eb90ded7910edbfa42a63bd832cfa405c Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com> From: Dave Airlie <airlied@redhat.com>
Date: Mon, 3 Aug 2009 14:09:32 +1000 Date: Mon, 3 Aug 2009 14:09:32 +1000
Subject: [PATCH] X server: VGA arbitration. Subject: [PATCH] X server: VGA arbitration.
@ -14,7 +14,7 @@ test with lots more sigio mouse movement type stuff - RAC used to disable it
hw/xfree86/common/xf86DPMS.c | 4 +- hw/xfree86/common/xf86DPMS.c | 4 +-
hw/xfree86/common/xf86Init.c | 11 +- hw/xfree86/common/xf86Init.c | 11 +-
hw/xfree86/common/xf86PM.c | 6 +- hw/xfree86/common/xf86PM.c | 6 +-
hw/xfree86/common/xf86VGAarbiter.c | 1137 ++++++++++++++++++++++++++++++++ hw/xfree86/common/xf86VGAarbiter.c | 1150 ++++++++++++++++++++++++++++++++
hw/xfree86/common/xf86VGAarbiter.h | 48 ++ hw/xfree86/common/xf86VGAarbiter.h | 48 ++
hw/xfree86/common/xf86VGAarbiterPriv.h | 266 ++++++++ hw/xfree86/common/xf86VGAarbiterPriv.h | 266 ++++++++
hw/xfree86/common/xf86str.h | 4 +- hw/xfree86/common/xf86str.h | 4 +-
@ -23,7 +23,7 @@ test with lots more sigio mouse movement type stuff - RAC used to disable it
hw/xfree86/int10/generic.c | 2 + hw/xfree86/int10/generic.c | 2 +
hw/xfree86/loader/sdksyms.sh | 1 + hw/xfree86/loader/sdksyms.sh | 1 +
include/xorg-config.h.in | 3 + include/xorg-config.h.in | 3 +
15 files changed, 1508 insertions(+), 10 deletions(-) 15 files changed, 1521 insertions(+), 10 deletions(-)
create mode 100644 hw/xfree86/common/xf86VGAarbiter.c create mode 100644 hw/xfree86/common/xf86VGAarbiter.c
create mode 100644 hw/xfree86/common/xf86VGAarbiter.h create mode 100644 hw/xfree86/common/xf86VGAarbiter.h
create mode 100644 hw/xfree86/common/xf86VGAarbiterPriv.h create mode 100644 hw/xfree86/common/xf86VGAarbiterPriv.h
@ -225,10 +225,10 @@ index f6138c3..fa24813 100644
} }
diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c
new file mode 100644 new file mode 100644
index 0000000..33357a1 index 0000000..6a97b7c
--- /dev/null --- /dev/null
+++ b/hw/xfree86/common/xf86VGAarbiter.c +++ b/hw/xfree86/common/xf86VGAarbiter.c
@@ -0,0 +1,1137 @@ @@ -0,0 +1,1150 @@
+/* +/*
+ * This code was stolen from RAC and adapted to control the legacy vga + * This code was stolen from RAC and adapted to control the legacy vga
+ * interface. + * interface.
@ -302,12 +302,14 @@ index 0000000..33357a1
+static int VGAarbiterGCIndex; +static int VGAarbiterGCIndex;
+static DevPrivateKey VGAarbiterGCKey = &VGAarbiterGCIndex; +static DevPrivateKey VGAarbiterGCKey = &VGAarbiterGCIndex;
+ +
+static int vga_no_arb = 0;
+void +void
+xf86VGAarbiterInit(void) +xf86VGAarbiterInit(void)
+{ +{
+ if (pci_device_vgaarb_init() != 0) + if (pci_device_vgaarb_init() != 0) {
+ FatalError("VGA Arbiter: cannot open vga arbiter fd. Exiting\n"); + vga_no_arb = 1;
+ + Error("VGA Arbiter: cannot open vga arbiter fd. Exiting\n");
+ }
+} +}
+ +
+void +void
@ -332,9 +334,12 @@ index 0000000..33357a1
+Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) +Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen)
+{ +{
+ int vga_count; + int vga_count;
+ unsigned int rsrc_decodes; + int rsrc_decodes;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ +
+ if (vga_no_arb)
+ return TRUE;
+
+ pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes); + pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes);
+ if (vga_count > 1) { + if (vga_count > 1) {
+ if (rsrc_decodes) { + if (rsrc_decodes) {
@ -351,6 +356,9 @@ index 0000000..33357a1
+ GDevPtr dev_tmp; + GDevPtr dev_tmp;
+ struct pci_device *dev; + struct pci_device *dev;
+ +
+ if (vga_no_arb)
+ return;
+
+ dev_tmp = xf86GetDevFromEntity(pScrn->entityList[0], + dev_tmp = xf86GetDevFromEntity(pScrn->entityList[0],
+ pScrn->entityInstanceList[0]); + pScrn->entityInstanceList[0]);
+ sscanf(dev_tmp->busID, "PCI:%d:%d:%d", &bus, &devi, &func); + sscanf(dev_tmp->busID, "PCI:%d:%d:%d", &bus, &devi, &func);
@ -363,6 +371,8 @@ index 0000000..33357a1
+void +void
+xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) +xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn)
+{ +{
+ if (vga_no_arb)
+ return;
+ pci_device_vgaarb_decodes(VGA_ARB_RSRC_LEGACY_MEM | VGA_ARB_RSRC_LEGACY_IO); + pci_device_vgaarb_decodes(VGA_ARB_RSRC_LEGACY_MEM | VGA_ARB_RSRC_LEGACY_IO);
+} +}
+ +
@ -376,6 +386,9 @@ index 0000000..33357a1
+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
+#endif +#endif
+ +
+ if (vga_no_arb)
+ return FALSE;
+
+ pScrn = xf86Screens[pScreen->myNum]; + pScrn = xf86Screens[pScreen->myNum];
+ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
+ +