[xorg-x11-server/f18] fix csr call for hotplug gpus

Dave Airlie airlied at fedoraproject.org
Tue Jan 8 01:24:11 UTC 2013


commit 6f76b1d5fabb8e039d568ef849a718552d8d8865
Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jan 8 11:21:03 2013 +1000

    fix csr call for hotplug gpus

 0001-xserver-call-CSR-for-gpus.patch |   26 +++++++++++++++++++++++---
 1 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/0001-xserver-call-CSR-for-gpus.patch b/0001-xserver-call-CSR-for-gpus.patch
index 297d056..8c6fbda 100644
--- a/0001-xserver-call-CSR-for-gpus.patch
+++ b/0001-xserver-call-CSR-for-gpus.patch
@@ -1,11 +1,12 @@
-From de313f7537071d72626ffbf64ab0cb5fff5dd5a0 Mon Sep 17 00:00:00 2001
+From 6aa11e40ec75fb31d0c611f9d578427941379c0d Mon Sep 17 00:00:00 2001
 From: Fedora X Ninjas <x at fedoraproject.org>
 Date: Tue, 8 Jan 2013 09:42:44 +1000
 Subject: [PATCH] xserver: call CSR for gpus
 
 ---
- dix/main.c | 3 +++
- 1 file changed, 3 insertions(+)
+ dix/main.c                          | 3 +++
+ hw/xfree86/common/xf86platformBus.c | 8 ++++++++
+ 2 files changed, 11 insertions(+)
 
 diff --git a/dix/main.c b/dix/main.c
 index fb935c9..e558d70 100644
@@ -21,6 +22,25 @@ index fb935c9..e558d70 100644
          }
  
          for (i = 0; i < screenInfo.numScreens; i++) {
+diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
+index 67d03eb..8f73c3a 100644
+--- a/hw/xfree86/common/xf86platformBus.c
++++ b/hw/xfree86/common/xf86platformBus.c
+@@ -452,6 +452,14 @@ xf86platformAddDevice(int index)
+ 
+    CreateScratchPixmapsForScreen(xf86GPUScreens[i]->pScreen);
+ 
++   if (xf86GPUScreens[i]->pScreen->CreateScreenResources &&
++       !(*xf86GPUScreens[i]->pScreen->CreateScreenResources) (xf86GPUScreens[i]->pScreen)) {
++       RemoveGPUScreen(xf86GPUScreens[i]->pScreen);
++       xf86DeleteScreen(xf86GPUScreens[i]);
++       xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
++       xf86NumGPUScreens = old_screens;
++       return -1;
++   }
+    /* attach unbound to 0 protocol screen */
+    AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+    xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
 -- 
 1.8.1
 


More information about the scm-commits mailing list