1
0

Accepting request 591645 from home:michalsrb:branches:bnc1084411:X11:XOrg

- Update and re-enable n_xserver-optimus-autoconfig-hack.patch.
  (bnc#1084411)

OBS-URL: https://build.opensuse.org/request/show/591645
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=696
This commit is contained in:
Stefan Dirsch 2018-03-27 14:46:27 +00:00 committed by Git OBS Bridge
parent 89fefb764a
commit 1d90db58c1
3 changed files with 30 additions and 29 deletions

View File

@ -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 v2: fix if config or slave config is NULL
v3: fix multi useful slaves v3: fix multi useful slaves
v4: do not unbound GPUs before attaching them
compatibility fix for 5c7af02b10
-- Michal Srb <msrb@suse.com>
DO NOT UPSTREAM. DO NOT UPSTREAM.
Signed-off-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
@ -17,11 +22,11 @@ Signed-off-by: Dave Airlie <airlied@gmail.com>
hw/xfree86/modes/xf86Crtc.c | 32 ++++++++++++++++++++++++++++++++ hw/xfree86/modes/xf86Crtc.c | 32 ++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+) 3 files changed, 47 insertions(+)
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c Index: xorg-server-1.19.6/hw/xfree86/common/xf86Init.c
index 1e95061..c58fd2b 100644 ===================================================================
--- a/hw/xfree86/common/xf86Init.c --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Init.c
@@ -361,6 +361,16 @@ xf86CreateRootWindow(WindowPtr pWin) @@ -297,6 +297,16 @@ xf86PrivsElevated(void)
return privsElevated; return privsElevated;
} }
@ -38,7 +43,7 @@ index 1e95061..c58fd2b 100644
static void static void
InstallSignalHandlers(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++) for (i = 0; i < xf86NumGPUScreens; i++)
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
@ -47,11 +52,11 @@ index 1e95061..c58fd2b 100644
xf86VGAarbiterWrapFunctions(); xf86VGAarbiterWrapFunctions();
if (sigio_blocked) if (sigio_blocked)
input_unlock(); input_unlock();
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c Index: xorg-server-1.19.6/hw/xfree86/common/xf86platformBus.c
index 33b2b7d..be3bdd9 100644 ===================================================================
--- a/hw/xfree86/common/xf86platformBus.c --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86platformBus.c
@@ -393,6 +393,8 @@ xf86platformProbeDev(DriverPtr drvp) @@ -489,6 +489,8 @@ xf86platformProbeDev(DriverPtr drvp)
return foundScreen; return foundScreen;
} }
@ -60,7 +65,7 @@ index 33b2b7d..be3bdd9 100644
int int
xf86platformAddDevice(int index) xf86platformAddDevice(int index)
{ {
@@ -465,6 +467,7 @@ xf86platformAddDevice(int index) @@ -560,6 +562,7 @@ xf86platformAddDevice(int index)
} }
/* attach unbound to 0 protocol screen */ /* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen); AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
@ -68,11 +73,11 @@ index 33b2b7d..be3bdd9 100644
RRResourcesChanged(xf86Screens[0]->pScreen); RRResourcesChanged(xf86Screens[0]->pScreen);
RRTellChanged(xf86Screens[0]->pScreen); RRTellChanged(xf86Screens[0]->pScreen);
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c Index: xorg-server-1.19.6/hw/xfree86/modes/xf86Crtc.c
index a441fd1..c1a56a5 100644 ===================================================================
--- a/hw/xfree86/modes/xf86Crtc.c --- xorg-server-1.19.6.orig/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c +++ xorg-server-1.19.6/hw/xfree86/modes/xf86Crtc.c
@@ -3383,3 +3383,35 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn) @@ -3462,3 +3462,29 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn)
crtc->x = crtc->y = 0; crtc->x = crtc->y = 0;
} }
} }
@ -83,7 +88,6 @@ index a441fd1..c1a56a5 100644
+ RRProviderPtr master_provider; + RRProviderPtr master_provider;
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(master); + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(master);
+ xf86CrtcConfigPtr slave_config = XF86_CRTC_CONFIG_PTR(pScrn); + xf86CrtcConfigPtr slave_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ Bool unbound = FALSE;
+ +
+ if (!config || !slave_config) + if (!config || !slave_config)
+ return; + return;
@ -93,21 +97,13 @@ index a441fd1..c1a56a5 100644
+ if ((master->capabilities & RR_Capability_SinkOffload) && + if ((master->capabilities & RR_Capability_SinkOffload) &&
+ pScrn->capabilities & RR_Capability_SourceOffload) { + pScrn->capabilities & RR_Capability_SourceOffload) {
+ /* source offload */ + /* source offload */
+
+ DetachUnboundGPU(pScrn->pScreen);
+ unbound = TRUE;
+ AttachOffloadGPU(master->pScreen, pScrn->pScreen); + AttachOffloadGPU(master->pScreen, pScrn->pScreen);
+ slave_config->randr_provider->offload_sink = master_provider; + slave_config->randr_provider->offload_sink = master_provider;
+ } + }
+ if ((master->capabilities & RR_Capability_SourceOutput) && + if ((master->capabilities & RR_Capability_SourceOutput) &&
+ pScrn->capabilities & RR_Capability_SinkOutput) { + pScrn->capabilities & RR_Capability_SinkOutput) {
+ /* sink offload */ + /* sink offload */
+ if (!unbound)
+ DetachUnboundGPU(pScrn->pScreen);
+ AttachOutputGPU(master->pScreen, pScrn->pScreen); + AttachOutputGPU(master->pScreen, pScrn->pScreen);
+ slave_config->randr_provider->output_source = master_provider; + slave_config->randr_provider->output_source = master_provider;
+ } + }
+} +}
--
1.8.4.5

View File

@ -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 Thu Feb 22 10:54:41 UTC 2018 - fcrozat@suse.com

View File

@ -361,8 +361,7 @@ sh %{SOURCE92} --verify . %{SOURCE91}
%patch216 -p1 %patch216 -p1
%patch217 -p1 %patch217 -p1
### disabled for now %patch1000 -p1
#%patch1000 -p1
### disabled for now ### disabled for now
#%patch1162 -p1 #%patch1162 -p1