forked from pool/xorg-x11-server
Stefan Dirsch
d44dc7401f
- Update to final 1.19.0 - Update to version 1.18.99.901: - Remove upstream pachtes: + U_glamor-Remove-the-FBO-cache.patch + U_kdrive-fix-up-NewInputDeviceRequest-implementation.patch + U_kdrive-set-evdev-driver-for-input-devices-automatica.patch + U_ephyr-don-t-load-ephyr-input-driver-if-seat-option-i.patch + U_kdrive-don-t-let-evdev-driver-overwrite-existing-dev.patch + U_ephyr-ignore-Xorg-multiseat-command-line-options.patch + U_ephyr-enable-option-sw-cursor-by-default-in-multi-se.patch + U_kdrive-introduce-input-hot-plugging-support-for-udev.patch + U_kdrive-add-options-to-set-default-XKB-properties.patch + U_config-udev-distinguish-between-real-keyboards-and-o.patch - Disable u_os-connections-Check-for-stale-FDs.patch (not applicable anymore) - Adapt patches to work with the new release: + n_xserver-optimus-autoconfig-hack.patch (disabled for now as it causes problems) - Remove X.org stack version prefix. We are already atleast at verion 7.7. Plus we are updating individual components anyway. So the stack version is misleading. OBS-URL: https://build.opensuse.org/request/show/441257 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=644
114 lines
3.7 KiB
Diff
114 lines
3.7 KiB
Diff
From 3216e0c618cc330f053ed36a749c8d8cfeb87a2f Mon Sep 17 00:00:00 2001
|
|
From: Dave Airlie <airlied@redhat.com>
|
|
Date: Fri, 17 Aug 2012 09:49:24 +1000
|
|
Subject: [PATCH] autobind GPUs to the screen, (v3)
|
|
|
|
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.
|
|
|
|
v2: fix if config or slave config is NULL
|
|
v3: fix multi useful slaves
|
|
DO NOT UPSTREAM.
|
|
|
|
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
|
---
|
|
hw/xfree86/common/xf86Init.c | 12 ++++++++++++
|
|
hw/xfree86/common/xf86platformBus.c | 3 +++
|
|
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)
|
|
return privsElevated;
|
|
}
|
|
|
|
+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
|
|
+static void
|
|
+xf86AutoConfigOutputDevices(void)
|
|
+{
|
|
+ int i;
|
|
+
|
|
+ for (i = 0; i < xf86NumGPUScreens; i++)
|
|
+ xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
|
|
+}
|
|
+
|
|
static void
|
|
InstallSignalHandlers(void)
|
|
{
|
|
@@ -931,6 +941,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
|
for (i = 0; i < xf86NumGPUScreens; i++)
|
|
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
|
|
|
|
+ xf86AutoConfigOutputDevices();
|
|
+
|
|
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)
|
|
return foundScreen;
|
|
}
|
|
|
|
+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
|
|
+
|
|
int
|
|
xf86platformAddDevice(int index)
|
|
{
|
|
@@ -465,6 +467,7 @@ xf86platformAddDevice(int index)
|
|
}
|
|
/* attach unbound to 0 protocol screen */
|
|
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
|
|
+ xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
|
|
|
|
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)
|
|
crtc->x = crtc->y = 0;
|
|
}
|
|
}
|
|
+
|
|
+
|
|
+void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master)
|
|
+{
|
|
+ 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;
|
|
+
|
|
+ master_provider = config->randr_provider;
|
|
+
|
|
+ if ((master->capabilities & RR_Capability_SinkOffload) &&
|
|
+ pScrn->capabilities & RR_Capability_SourceOffload) {
|
|
+ /* source offload */
|
|
+
|
|
+ DetachUnboundGPU(pScrn->pScreen);
|
|
+ unbound = TRUE;
|
|
+ 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
|
|
|