fix bug with GPU hotplugging while VT switched
- reenable reverse optimus and some missing patch from F18
This commit is contained in:
parent
9620f4c049
commit
b644e663d7
@ -0,0 +1,40 @@
|
||||
From 73fc15d94136a87807c1ce69d56fb8a34c09fe4f Mon Sep 17 00:00:00 2001
|
||||
From: Fedora X Ninjas <x@fedoraproject.org>
|
||||
Date: Tue, 8 Jan 2013 09:41:36 +1000
|
||||
Subject: [PATCH] dix: allow pixmap dirty helper to be used for non-shared
|
||||
pixmaps
|
||||
|
||||
this allows the pixmap dirty helper to be used for reverse optimus
|
||||
---
|
||||
dix/pixmap.c | 2 ++
|
||||
fb/fbpixmap.c | 1 +
|
||||
2 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/dix/pixmap.c b/dix/pixmap.c
|
||||
index 2418812..fe92147 100644
|
||||
--- a/dix/pixmap.c
|
||||
+++ b/dix/pixmap.c
|
||||
@@ -243,6 +243,8 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region)
|
||||
}
|
||||
|
||||
dst = dirty->slave_dst->master_pixmap;
|
||||
+ if (!dst)
|
||||
+ dst = dirty->slave_dst;
|
||||
|
||||
RegionTranslate(dirty_region, -dirty->x, -dirty->y);
|
||||
n = RegionNumRects(dirty_region);
|
||||
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
|
||||
index fbcdca9..0824b64 100644
|
||||
--- a/fb/fbpixmap.c
|
||||
+++ b/fb/fbpixmap.c
|
||||
@@ -67,6 +67,7 @@ fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp,
|
||||
pPixmap->devKind = paddedWidth;
|
||||
pPixmap->refcnt = 1;
|
||||
pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust);
|
||||
+ pPixmap->master_pixmap = NULL;
|
||||
|
||||
#ifdef FB_DEBUG
|
||||
pPixmap->devPrivate.ptr =
|
||||
--
|
||||
1.8.1
|
||||
|
@ -1,17 +1,17 @@
|
||||
From 0c05db308881b3b462dae4101312c0034e6288ba Mon Sep 17 00:00:00 2001
|
||||
From 2bd6a8491ad3dbd42db66be7ae48f4b6e9c698f2 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora X Ninjas <x@fedoraproject.org>
|
||||
Date: Wed, 12 Dec 2012 14:02:54 +1000
|
||||
Subject: [PATCH] xf86crtc: don't use display for vx/vy for gpu screens
|
||||
|
||||
---
|
||||
hw/xfree86/modes/xf86Crtc.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
hw/xfree86/modes/xf86Crtc.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index ba84e6b..61119b3 100644
|
||||
index 6975d2f..2828ee0 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -2420,11 +2420,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
@@ -2425,11 +2425,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
config->debug_modes = xf86ReturnOptValBool(config->options,
|
||||
OPTION_MODEDEBUG, FALSE);
|
||||
|
||||
@ -25,6 +25,41 @@ index ba84e6b..61119b3 100644
|
||||
height = scrn->display->virtualY;
|
||||
else
|
||||
height = config->maxHeight;
|
||||
@@ -2497,8 +2497,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
|
||||
/* XXX override xf86 common frame computation code */
|
||||
|
||||
- scrn->display->frameX0 = 0;
|
||||
- scrn->display->frameY0 = 0;
|
||||
+ if (!scrn->is_gpu) {
|
||||
+ scrn->display->frameX0 = 0;
|
||||
+ scrn->display->frameY0 = 0;
|
||||
+ }
|
||||
|
||||
for (c = 0; c < config->num_crtc; c++) {
|
||||
xf86CrtcPtr crtc = config->crtc[c];
|
||||
@@ -2546,7 +2548,7 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
}
|
||||
}
|
||||
|
||||
- if (scrn->display->virtualX == 0) {
|
||||
+ if (scrn->display->virtualX == 0 || scrn->is_gpu) {
|
||||
/*
|
||||
* Expand virtual size to cover the current config and potential mode
|
||||
* switches, if the driver can't enlarge the screen later.
|
||||
@@ -2561,8 +2563,10 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
}
|
||||
}
|
||||
|
||||
- scrn->display->virtualX = width;
|
||||
- scrn->display->virtualY = height;
|
||||
+ if (!scrn->is_gpu) {
|
||||
+ scrn->display->virtualX = width;
|
||||
+ scrn->display->virtualY = height;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (width > scrn->virtualX)
|
||||
--
|
||||
1.8.0.1
|
||||
1.8.1
|
||||
|
||||
|
46
0001-xserver-call-CSR-for-gpus.patch
Normal file
46
0001-xserver-call-CSR-for-gpus.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 6aa11e40ec75fb31d0c611f9d578427941379c0d Mon Sep 17 00:00:00 2001
|
||||
From: Fedora X Ninjas <x@fedoraproject.org>
|
||||
Date: Tue, 8 Jan 2013 09:42:44 +1000
|
||||
Subject: [PATCH] xserver: call CSR for gpus
|
||||
|
||||
---
|
||||
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
|
||||
--- a/dix/main.c
|
||||
+++ b/dix/main.c
|
||||
@@ -211,6 +211,9 @@ main(int argc, char *argv[], char *envp[])
|
||||
ScreenPtr pScreen = screenInfo.gpuscreens[i];
|
||||
if (!CreateScratchPixmapsForScreen(pScreen))
|
||||
FatalError("failed to create scratch pixmaps");
|
||||
+ if (pScreen->CreateScreenResources &&
|
||||
+ !(*pScreen->CreateScreenResources) (pScreen))
|
||||
+ FatalError("failed to create screen resources");
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -121,6 +121,11 @@ Patch7071: 0001-os-use-libunwind-to-generate-backtraces.patch
|
||||
# upstream submitted
|
||||
Patch7072: xserver-1.14.0-fix-gpu-hotplug-vt-switch.patch
|
||||
|
||||
# on way upstream: fixes for reverse optimus
|
||||
Patch8000: 0001-dix-allow-pixmap-dirty-helper-to-be-used-for-non-sha.patch
|
||||
Patch8001: 0001-xserver-call-CSR-for-gpus.patch
|
||||
|
||||
|
||||
%global moduledir %{_libdir}/xorg/modules
|
||||
%global drimoduledir %{_libdir}/dri
|
||||
%global sdkdir %{_includedir}/xorg
|
||||
@ -595,7 +600,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%changelog
|
||||
* Fri Apr 12 2013 Dave Airlie <airlied@redhat.com> 1.14.0-4
|
||||
- fix bug with GPU hotplugging while VT switched
|
||||
- reenable reverse optimus
|
||||
- reenable reverse optimus and some missing patch from F18
|
||||
|
||||
* Fri Mar 22 2013 Dan Horák <dan@danny.cz> 1.14.0-3
|
||||
- libunwind exists only on selected arches
|
||||
|
Loading…
Reference in New Issue
Block a user