diff --git a/n_xserver-optimus-autoconfig-hack.patch b/n_xserver-optimus-autoconfig-hack.patch index 4e82129..986893d 100644 --- a/n_xserver-optimus-autoconfig-hack.patch +++ b/n_xserver-optimus-autoconfig-hack.patch @@ -8,6 +8,11 @@ but until DE support is in GNOME its probably for the best. v2: fix if config or slave config is NULL v3: fix multi useful slaves + +v4: do not unbound GPUs before attaching them + compatibility fix for 5c7af02b10 + -- Michal Srb + DO NOT UPSTREAM. Signed-off-by: Dave Airlie @@ -17,11 +22,11 @@ Signed-off-by: Dave Airlie hw/xfree86/modes/xf86Crtc.c | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) -diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c -index 1e95061..c58fd2b 100644 ---- a/hw/xfree86/common/xf86Init.c -+++ b/hw/xfree86/common/xf86Init.c -@@ -361,6 +361,16 @@ xf86CreateRootWindow(WindowPtr pWin) +Index: xorg-server-1.19.6/hw/xfree86/common/xf86Init.c +=================================================================== +--- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Init.c ++++ xorg-server-1.19.6/hw/xfree86/common/xf86Init.c +@@ -297,6 +297,16 @@ xf86PrivsElevated(void) return privsElevated; } @@ -38,7 +43,7 @@ index 1e95061..c58fd2b 100644 static void InstallSignalHandlers(void) { -@@ -931,6 +941,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) +@@ -872,6 +882,8 @@ InitOutput(ScreenInfo * pScreenInfo, int for (i = 0; i < xf86NumGPUScreens; i++) AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); @@ -47,11 +52,11 @@ index 1e95061..c58fd2b 100644 xf86VGAarbiterWrapFunctions(); if (sigio_blocked) input_unlock(); -diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c -index 33b2b7d..be3bdd9 100644 ---- a/hw/xfree86/common/xf86platformBus.c -+++ b/hw/xfree86/common/xf86platformBus.c -@@ -393,6 +393,8 @@ xf86platformProbeDev(DriverPtr drvp) +Index: xorg-server-1.19.6/hw/xfree86/common/xf86platformBus.c +=================================================================== +--- xorg-server-1.19.6.orig/hw/xfree86/common/xf86platformBus.c ++++ xorg-server-1.19.6/hw/xfree86/common/xf86platformBus.c +@@ -489,6 +489,8 @@ xf86platformProbeDev(DriverPtr drvp) return foundScreen; } @@ -60,7 +65,7 @@ index 33b2b7d..be3bdd9 100644 int xf86platformAddDevice(int index) { -@@ -465,6 +467,7 @@ xf86platformAddDevice(int index) +@@ -560,6 +562,7 @@ xf86platformAddDevice(int index) } /* attach unbound to 0 protocol screen */ AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); @@ -68,11 +73,11 @@ index 33b2b7d..be3bdd9 100644 RRResourcesChanged(xf86Screens[0]->pScreen); RRTellChanged(xf86Screens[0]->pScreen); -diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c -index a441fd1..c1a56a5 100644 ---- a/hw/xfree86/modes/xf86Crtc.c -+++ b/hw/xfree86/modes/xf86Crtc.c -@@ -3383,3 +3383,35 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn) +Index: xorg-server-1.19.6/hw/xfree86/modes/xf86Crtc.c +=================================================================== +--- xorg-server-1.19.6.orig/hw/xfree86/modes/xf86Crtc.c ++++ xorg-server-1.19.6/hw/xfree86/modes/xf86Crtc.c +@@ -3462,3 +3462,29 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn) crtc->x = crtc->y = 0; } } @@ -83,7 +88,6 @@ index a441fd1..c1a56a5 100644 + RRProviderPtr master_provider; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(master); + xf86CrtcConfigPtr slave_config = XF86_CRTC_CONFIG_PTR(pScrn); -+ Bool unbound = FALSE; + + if (!config || !slave_config) + return; @@ -92,22 +96,14 @@ index a441fd1..c1a56a5 100644 + + if ((master->capabilities & RR_Capability_SinkOffload) && + pScrn->capabilities & RR_Capability_SourceOffload) { -+ /* source offload */ -+ -+ DetachUnboundGPU(pScrn->pScreen); -+ unbound = TRUE; ++ /* source offload */ + AttachOffloadGPU(master->pScreen, pScrn->pScreen); + slave_config->randr_provider->offload_sink = master_provider; + } + if ((master->capabilities & RR_Capability_SourceOutput) && + pScrn->capabilities & RR_Capability_SinkOutput) { + /* sink offload */ -+ if (!unbound) -+ DetachUnboundGPU(pScrn->pScreen); + AttachOutputGPU(master->pScreen, pScrn->pScreen); + slave_config->randr_provider->output_source = master_provider; + } +} --- -1.8.4.5 - diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index 4663d6c..7ec290f 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 27 14:42:18 UTC 2018 - msrb@suse.com + +- Update and re-enable n_xserver-optimus-autoconfig-hack.patch. + (bnc#1084411) + ------------------------------------------------------------------- Thu Feb 22 10:54:41 UTC 2018 - fcrozat@suse.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index ec3cc37..a393c6a 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -361,8 +361,7 @@ sh %{SOURCE92} --verify . %{SOURCE91} %patch216 -p1 %patch217 -p1 -### disabled for now -#%patch1000 -p1 +%patch1000 -p1 ### disabled for now #%patch1162 -p1