[xorg-x11-server] add git fixes + autobind to gpu devices.

Dave Airlie airlied at fedoraproject.org
Fri Aug 17 00:17:39 UTC 2012


commit 97c6429f6746a9d1deccf560dceef04b8650c813
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Aug 17 10:16:37 2012 +1000

    add git fixes + autobind to gpu devices.

 xorg-x11-server.spec           |   10 ++-
 xserver-1.12.99-git.patch      |  173 ++++++++++++++++++++++++++++++++++++++++
 xserver-autobind-hotplug.patch |   64 +++++++++++++++
 3 files changed, 246 insertions(+), 1 deletions(-)
---
diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index e7801c1..f490e65 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -43,7 +43,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.12.99.904
-Release:   2%{?gitdate:.%{gitdate}}%{dist}
+Release:   3%{?gitdate:.%{gitdate}}%{dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X
@@ -100,6 +100,11 @@ Patch7023: 0002-linux-Make-failure-to-iopl-non-fatal.patch
 Patch7024: 0003-xfree86-Change-the-semantics-of-driverFunc-GET_REQUI.patch
 Patch7025: 0001-Always-install-vbe-and-int10-sdk-headers.patch
 
+Patch7026: xserver-1.12.99-git.patch
+
+# do not upstream
+Patch7027: xserver-autobind-hotplug.patch
+
 %define moduledir	%{_libdir}/xorg/modules
 %define drimoduledir	%{_libdir}/dri
 %define sdkdir		%{_includedir}/xorg
@@ -572,6 +577,9 @@ rm -rf $RPM_BUILD_ROOT
 %{xserver_source_dir}
 
 %changelog
+* Fri Aug 17 2012 Dave Airlie <airlied at redhat.com> 1.12.99.904-3
+- add git fixes + autobind to gpu devices.
+
 * Wed Aug 15 2012 Adam Jackson <ajax at redhat.com> 1.12.99.904-2
 - Always install int10 and vbe sdk headers
 
diff --git a/xserver-1.12.99-git.patch b/xserver-1.12.99-git.patch
new file mode 100644
index 0000000..c633d35
--- /dev/null
+++ b/xserver-1.12.99-git.patch
@@ -0,0 +1,173 @@
+From 2a0d4bdf11ef7d0dbc44ec517eb7e225dffcacdb Mon Sep 17 00:00:00 2001
+From: Fedora X Ninjas <x at fedoraproject.org>
+Date: Fri, 17 Aug 2012 09:53:13 +1000
+Subject: [PATCH] xserver: bunch of fixes from git
+
+---
+ dix/main.c                  | 18 +++++++++---------
+ fb/fbseg.c                  | 18 +++++++++---------
+ glx/glxscreens.c            |  3 +++
+ hw/xfree86/modes/xf86Crtc.c | 11 +++++++----
+ hw/xquartz/quartz.c         |  1 +
+ render/filter.c             |  5 ++++-
+ 6 files changed, 33 insertions(+), 23 deletions(-)
+
+diff --git a/dix/main.c b/dix/main.c
+index 42f517d..fb935c9 100644
+--- a/dix/main.c
++++ b/dix/main.c
+@@ -331,6 +331,15 @@ main(int argc, char *argv[], char *envp[])
+ 
+         CloseDownEvents();
+ 
++        for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
++            ScreenPtr pScreen = screenInfo.gpuscreens[i];
++            FreeScratchPixmapsForScreen(pScreen);
++            (*pScreen->CloseScreen) (pScreen);
++            dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
++            free(pScreen);
++            screenInfo.numGPUScreens = i;
++        }
++
+         for (i = screenInfo.numScreens - 1; i >= 0; i--) {
+             FreeScratchPixmapsForScreen(screenInfo.screens[i]);
+             FreeGCperDepth(i);
+@@ -342,15 +351,6 @@ main(int argc, char *argv[], char *envp[])
+             screenInfo.numScreens = i;
+         }
+ 
+-        for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) {
+-            ScreenPtr pScreen = screenInfo.gpuscreens[i];
+-            FreeScratchPixmapsForScreen(pScreen);
+-            (*pScreen->CloseScreen) (pScreen);
+-            dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN);
+-            free(pScreen);
+-            screenInfo.numGPUScreens = i;
+-        }
+-
+         ReleaseClientIds(serverClient);
+         dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
+         serverClient->devPrivates = NULL;
+diff --git a/fb/fbseg.c b/fb/fbseg.c
+index 0e4e0a9..1848387 100644
+--- a/fb/fbseg.c
++++ b/fb/fbseg.c
+@@ -65,6 +65,12 @@ fbBresSolid(DrawablePtr pDrawable,
+     if (axis == X_AXIS) {
+         bits = 0;
+         while (len--) {
++            if (e >= 0) {
++                WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
++                bits = 0;
++                dst += dstStride;
++                e += e3;
++            }
+             bits |= mask;
+             mask = fbBresShiftMask(mask, signdx, dstBpp);
+             if (!mask) {
+@@ -74,21 +80,12 @@ fbBresSolid(DrawablePtr pDrawable,
+                 mask = mask0;
+             }
+             e += e1;
+-            if (e >= 0) {
+-                WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
+-                bits = 0;
+-                dst += dstStride;
+-                e += e3;
+-            }
+         }
+         if (bits)
+             WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
+     }
+     else {
+         while (len--) {
+-            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
+-            dst += dstStride;
+-            e += e1;
+             if (e >= 0) {
+                 e += e3;
+                 mask = fbBresShiftMask(mask, signdx, dstBpp);
+@@ -97,6 +94,9 @@ fbBresSolid(DrawablePtr pDrawable,
+                     mask = mask0;
+                 }
+             }
++            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
++            dst += dstStride;
++            e += e1;
+         }
+     }
+ 
+diff --git a/glx/glxscreens.c b/glx/glxscreens.c
+index 037b037..61d590c 100644
+--- a/glx/glxscreens.c
++++ b/glx/glxscreens.c
+@@ -288,6 +288,9 @@ pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual)
+             continue;
+         if (config->visualRating != GLX_NONE)
+             continue;
++        /* Ignore multisampled configs */
++        if (config->sampleBuffers)
++            continue;
+         if (glxConvertToXVisualType(config->visualType) != visual->class)
+             continue;
+         /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */
+diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
+index c58088d..964465e 100644
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -726,6 +726,12 @@ xf86CrtcCloseScreen(ScreenPtr screen)
+ 
+     xf86RotateCloseScreen(screen);
+ 
++    xf86RandR12CloseScreen(screen);
++
++    free(config->name);
++
++    screen->CloseScreen(screen);
++
+     for (o = 0; o < config->num_output; o++) {
+         xf86OutputPtr output = config->output[o];
+ 
+@@ -749,10 +755,7 @@ xf86CrtcCloseScreen(ScreenPtr screen)
+         else if (screen->current_master)
+             DetachUnboundGPU(screen);
+     }
+-    xf86RandR12CloseScreen(screen);
+-
+-    free(config->name);
+-    return screen->CloseScreen(screen);
++    return TRUE;
+ }
+ 
+ /*
+diff --git a/hw/xquartz/quartz.c b/hw/xquartz/quartz.c
+index d74fc64..31b0e61 100644
+--- a/hw/xquartz/quartz.c
++++ b/hw/xquartz/quartz.c
+@@ -43,6 +43,7 @@
+ #include "darwinEvents.h"
+ #include "pseudoramiX.h"
+ #include "extension.h"
++#include "glx_extinit.h"
+ #define _APPLEWM_SERVER_
+ #include "applewmExt.h"
+ 
+diff --git a/render/filter.c b/render/filter.c
+index 8c401ee..019ea7f 100644
+--- a/render/filter.c
++++ b/render/filter.c
+@@ -273,7 +273,10 @@ PictureResetFilters(ScreenPtr pScreen)
+ 
+     free(ps->filters);
+     free(ps->filterAliases);
+-    PictureFreeFilterIds();
++
++    /* Free the filters when the last screen is closed */
++    if (pScreen->myNum == 0)
++        PictureFreeFilterIds();
+ }
+ 
+ int
+-- 
+1.7.11.2
+
diff --git a/xserver-autobind-hotplug.patch b/xserver-autobind-hotplug.patch
new file mode 100644
index 0000000..7e7566a
--- /dev/null
+++ b/xserver-autobind-hotplug.patch
@@ -0,0 +1,64 @@
+From 1bedef99881a63f5e8215ba259e9b222abeb1fe7 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at redhat.com>
+Date: Fri, 17 Aug 2012 09:49:24 +1000
+Subject: [PATCH] autobind GPUs to the screen,
+
+this is racy and really not what we want for hotplug going forward,
+but until DE support is in GNOME its probably for the best.
+
+DO NOT UPSTREAM.
+---
+ hw/xfree86/common/xf86Init.c        | 12 ++++++++++--
+ hw/xfree86/common/xf86platformBus.c | 13 ++++++++++---
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
+index e4a6b86..f41423d 100644
+--- a/hw/xfree86/common/xf86Init.c
++++ b/hw/xfree86/common/xf86Init.c
+@@ -924,8 +924,16 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
+ #endif
+     }
+ 
+-    for (i = 0; i < xf86NumGPUScreens; i++)
+-        AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++    for (i = 0; i < xf86NumGPUScreens; i++) {
++        if ((xf86Screens[0]->capabilities & RR_Capability_SinkOffload) &&
++             xf86GPUScreens[i]->capabilities & RR_Capability_SourceOffload)
++            AttachOffloadGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++        else if ((xf86Screens[0]->capabilities & RR_Capability_SourceOutput) &&
++                 xf86GPUScreens[i]->capabilities & RR_Capability_SinkOutput)
++            AttachOutputGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++        else
++            AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++    }
+ 
+     xf86VGAarbiterWrapFunctions();
+     if (sigio_blocked)
+diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
+index 24b9473..6e397eb 100644
+--- a/hw/xfree86/common/xf86platformBus.c
++++ b/hw/xfree86/common/xf86platformBus.c
+@@ -440,9 +440,16 @@ xf86platformAddDevice(int index)
+ 
+    CreateScratchPixmapsForScreen(xf86GPUScreens[i]->pScreen);
+ 
+-   /* attach unbound to 0 protocol screen */
+-   AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+-
++   if ((xf86Screens[0]->capabilities & RR_Capability_SinkOffload) &&
++       xf86GPUScreens[i]->capabilities & RR_Capability_SourceOffload)
++       AttachOffloadGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++   else if ((xf86Screens[0]->capabilities & RR_Capability_SourceOutput) &&
++       xf86GPUScreens[i]->capabilities & RR_Capability_SinkOutput)
++       AttachOutputGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++   else
++       /* attach unbound to 0 protocol screen */
++       AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
++
+    return 0;
+ }
+ 
+-- 
+1.7.11.2
+


More information about the scm-commits mailing list