xserver 1.14

This commit is contained in:
Peter Hutterer 2013-03-07 09:59:33 +10:00
parent 64241ad160
commit cd9fdcb079
9 changed files with 264 additions and 237 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ xorg-server-1.9.1.tar.bz2
/xorg-server-1.13.1.tar.bz2
/xorg-server-20130109.tar.xz
/xorg-server-20130215.tar.xz
/xorg-server-1.14.0.tar.bz2

View File

@ -1,191 +0,0 @@
From fc08ad50a2ad81f8741939f8e9eacf86b5af6676 Mon Sep 17 00:00:00 2001
From: Fedora X Ninjas <x@fedoraproject.org>
Date: Wed, 12 Dec 2012 15:15:38 +1000
Subject: [PATCH] autoconfig: fixup tell changed so randr clients can tell
This lets the gnome applet update if a usb device appears/disappears
---
hw/xfree86/common/xf86platformBus.c | 6 ++++--
hw/xfree86/modes/xf86Crtc.c | 4 ++++
randr/randr.c | 24 +++++++++++++++++++++++-
randr/randrstr.h | 4 ++++
randr/rrcrtc.c | 2 +-
randr/rrinfo.c | 2 +-
randr/rroutput.c | 2 +-
randr/rrscreen.c | 2 +-
8 files changed, 39 insertions(+), 7 deletions(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 0b735d1..891142d 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -47,6 +47,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
+#include "randrstr.h"
int platformSlotClaimed;
int xf86_num_platform_devices;
@@ -454,7 +455,8 @@ xf86platformAddDevice(int index)
/* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
xf86AutoConfigOutputDevice(xf86GPUScreens[i], xf86Screens[0]);
-
+
+ RRTellChanged(xf86Screens[0]->pScreen);
return 0;
}
@@ -497,7 +499,7 @@ xf86platformRemoveDevice(int index)
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
xf86_remove_platform_device(index);
-
+ RRTellChanged(xf86Screens[0]->pScreen);
out:
return;
}
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 61119b3..a4fdec9 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -743,10 +743,12 @@ xf86CrtcCloseScreen(ScreenPtr screen)
/* detach any providers */
if (config->randr_provider) {
if (config->randr_provider->offload_sink) {
+ RRSetChanged(screen);
DetachOffloadGPU(screen);
config->randr_provider->offload_sink = NULL;
}
else if (config->randr_provider->output_source) {
+ RRSetChanged(screen);
DetachOutputGPU(screen);
config->randr_provider->output_source = NULL;
}
@@ -3341,11 +3343,13 @@ void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master)
DetachUnboundGPU(pScrn->pScreen);
AttachOffloadGPU(master->pScreen, pScrn->pScreen);
slave_config->randr_provider->offload_sink = master_provider;
+ RRSetChanged(master->pScreen);
} else if ((master->capabilities & RR_Capability_SourceOutput) &&
pScrn->capabilities & RR_Capability_SinkOutput) {
/* sink offload */
DetachUnboundGPU(pScrn->pScreen);
AttachOutputGPU(master->pScreen, pScrn->pScreen);
slave_config->randr_provider->output_source = master_provider;
+ RRSetChanged(master->pScreen);
}
}
diff --git a/randr/randr.c b/randr/randr.c
index da48c3f..5b1957b 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -462,6 +462,28 @@ TellChanged(WindowPtr pWin, pointer value)
return WT_WALKCHILDREN;
}
+void
+RRSetChanged(ScreenPtr pScreen)
+{
+ /* set changed bits on the master screen only */
+ ScreenPtr master;
+ rrScrPriv(pScreen);
+ rrScrPrivPtr mastersp;
+
+ if (pScreen->isGPU) {
+ master = pScreen->current_master;
+ if (!master)
+ return;
+ mastersp = rrGetScrPriv(master);
+ }
+ else {
+ master = pScreen;
+ mastersp = pScrPriv;
+ }
+
+ mastersp->changed = TRUE;
+}
+
/*
* Something changed; send events and adjust pointer position
*/
@@ -482,7 +504,7 @@ RRTellChanged(ScreenPtr pScreen)
mastersp = pScrPriv;
}
- if (pScrPriv->changed) {
+ if (mastersp->changed) {
UpdateCurrentTimeIf();
if (mastersp->configChanged) {
mastersp->lastConfigTime = currentTime;
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 212b0a9..d61f20e 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -480,6 +480,10 @@ extern _X_EXPORT void
RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
/* randr.c */
+/* set a screen change on the primary screen */
+extern _X_EXPORT void
+RRSetChanged(ScreenPtr pScreen);
+
/*
* Send all pending events
*/
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index e82d050..d57cc08 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -39,7 +39,7 @@ RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged)
if (pScreen) {
rrScrPriv(pScreen);
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
/*
* Send ConfigureNotify on any layout change
*/
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index 1408d6f..fc57bd4 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -225,7 +225,7 @@ RRScreenSetSizeRange(ScreenPtr pScreen,
pScrPriv->minHeight = minHeight;
pScrPriv->maxWidth = maxWidth;
pScrPriv->maxHeight = maxHeight;
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
pScrPriv->configChanged = TRUE;
}
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 88781ba..922d61f 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -36,7 +36,7 @@ RROutputChanged(RROutputPtr output, Bool configChanged)
output->changed = TRUE;
if (pScreen) {
rrScrPriv(pScreen);
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
if (configChanged)
pScrPriv->configChanged = TRUE;
}
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 39340cc..36179ae 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -143,7 +143,7 @@ RRScreenSizeNotify(ScreenPtr pScreen)
pScrPriv->height = pScreen->height;
pScrPriv->mmWidth = pScreen->mmWidth;
pScrPriv->mmHeight = pScreen->mmHeight;
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
/* pScrPriv->sizeChanged = TRUE; */
RRTellChanged(pScreen);
--
1.8.0.1

View File

@ -0,0 +1,110 @@
From 42ca69172c897713295f7c2b471f0e5d072c920b Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 9 Jan 2013 14:32:47 +1000
Subject: [PATCH] randr: don't directly set changed bits in randr screen
Introduce a wrapper interface so we can fix things up for multi-gpu
situations later.
This just introduces the API for now.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
---
randr/randr.c | 8 ++++++++
randr/randrstr.h | 4 ++++
randr/rrcrtc.c | 2 +-
randr/rrinfo.c | 2 +-
randr/rroutput.c | 2 +-
randr/rrscreen.c | 2 +-
6 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/randr/randr.c b/randr/randr.c
index f0decfc..11f88b2 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -464,6 +464,14 @@ TellChanged(WindowPtr pWin, pointer value)
return WT_WALKCHILDREN;
}
+void
+RRSetChanged(ScreenPtr pScreen)
+{
+ rrScrPriv(pScreen);
+
+ pScrPriv->changed = TRUE;
+}
+
/*
* Something changed; send events and adjust pointer position
*/
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 2517479..2babfed 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -486,6 +486,10 @@ extern _X_EXPORT void
RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
/* randr.c */
+/* set a screen change on the primary screen */
+extern _X_EXPORT void
+RRSetChanged(ScreenPtr pScreen);
+
/*
* Send all pending events
*/
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 6e2eca5..b3fb5bd 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -39,7 +39,7 @@ RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged)
if (pScreen) {
rrScrPriv(pScreen);
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
/*
* Send ConfigureNotify on any layout change
*/
diff --git a/randr/rrinfo.c b/randr/rrinfo.c
index 1408d6f..fc57bd4 100644
--- a/randr/rrinfo.c
+++ b/randr/rrinfo.c
@@ -225,7 +225,7 @@ RRScreenSetSizeRange(ScreenPtr pScreen,
pScrPriv->minHeight = minHeight;
pScrPriv->maxWidth = maxWidth;
pScrPriv->maxHeight = maxHeight;
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
pScrPriv->configChanged = TRUE;
}
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 88781ba..922d61f 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -36,7 +36,7 @@ RROutputChanged(RROutputPtr output, Bool configChanged)
output->changed = TRUE;
if (pScreen) {
rrScrPriv(pScreen);
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
if (configChanged)
pScrPriv->configChanged = TRUE;
}
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 39340cc..36179ae 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -143,7 +143,7 @@ RRScreenSizeNotify(ScreenPtr pScreen)
pScrPriv->height = pScreen->height;
pScrPriv->mmWidth = pScreen->mmWidth;
pScrPriv->mmHeight = pScreen->mmHeight;
- pScrPriv->changed = TRUE;
+ RRSetChanged(pScreen);
/* pScrPriv->sizeChanged = TRUE; */
RRTellChanged(pScreen);
--
1.8.1.4

View File

@ -0,0 +1,47 @@
From 48ea188cac83f2c03913457e1049cc30c27cd395 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 9 Jan 2013 14:32:48 +1000
Subject: [PATCH] randr: make SetChanged modify the main protocol screen not
the gpu screen
When SetChanged is called we now modify the main protocol screen,
not the the gpu screen. Since changed stuff should work at the protocol level.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
---
randr/randr.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/randr/randr.c b/randr/randr.c
index 11f88b2..fb0895d 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -467,9 +467,23 @@ TellChanged(WindowPtr pWin, pointer value)
void
RRSetChanged(ScreenPtr pScreen)
{
+ /* set changed bits on the master screen only */
+ ScreenPtr master;
rrScrPriv(pScreen);
+ rrScrPrivPtr mastersp;
+
+ if (pScreen->isGPU) {
+ master = pScreen->current_master;
+ if (!master)
+ return;
+ mastersp = rrGetScrPriv(master);
+ }
+ else {
+ master = pScreen;
+ mastersp = pScrPriv;
+ }
- pScrPriv->changed = TRUE;
+ mastersp->changed = TRUE;
}
/*
--
1.8.1.4

View File

@ -0,0 +1,31 @@
From 2d05af5ee4844354810cdfcc76eda255a9f6beec Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 9 Jan 2013 14:32:49 +1000
Subject: [PATCH] randr: only respected changed on the protocol screen
We don't want to know about changes on the non-protocol screen,
we will fix up setchanged to make sure non-protocol screens update
the protocol screens when they have a change.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
---
randr/randr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/randr/randr.c b/randr/randr.c
index fb0895d..cb6fce7 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -506,7 +506,7 @@ RRTellChanged(ScreenPtr pScreen)
mastersp = pScrPriv;
}
- if (pScrPriv->changed) {
+ if (mastersp->changed) {
UpdateCurrentTimeIf();
if (mastersp->configChanged) {
mastersp->lastConfigTime = currentTime;
--
1.8.1.4

View File

@ -0,0 +1,61 @@
From 388c8278cf81848635d8b4af75f0ccc189344acf Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 9 Jan 2013 14:32:50 +1000
Subject: [PATCH] randr: report changes when we disconnect a GPU slave
When we disconnect an output/offload slave set the changed bits,
so a later TellChanged can do something.
Then when we remove a GPU slave device, sent change notification
to the protocol screen.
This allows hot unplugged USB devices to disappear in clients.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Fedora X Ninjas <x@fedoraproject.org>
---
hw/xfree86/common/xf86platformBus.c | 3 ++-
hw/xfree86/modes/xf86RandR12.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 2b02e79..4ccb005 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -47,6 +47,7 @@
#include "Pci.h"
#include "xf86platformBus.h"
+#include "randrstr.h"
int platformSlotClaimed;
int xf86_num_platform_devices;
@@ -497,7 +498,7 @@ xf86platformRemoveDevice(int index)
xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
xf86_remove_platform_device(index);
-
+ RRTellChanged(xf86Screens[0]->pScreen);
out:
return;
}
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 01fc9c5..7f570cf 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -1895,10 +1895,12 @@ xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider)
if (config->randr_provider->offload_sink) {
DetachOffloadGPU(screen);
config->randr_provider->offload_sink = NULL;
+ RRSetChanged(screen);
}
else if (config->randr_provider->output_source) {
DetachOutputGPU(screen);
config->randr_provider->output_source = NULL;
+ RRSetChanged(screen);
}
else if (screen->current_master)
DetachUnboundGPU(screen);
--
1.8.1.4

View File

@ -1,38 +0,0 @@
From 18c470b399f9f29797c1604dc8e1f11782b3f89d Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 12 Dec 2012 14:14:39 +1000
Subject: [PATCH] xfree86/hotplug: cleanup properly if the screen fails to
initialise
Due to another bug, the modesetting/udl driver would fail to init properly
on hotplug, when it did the code didn't clean up properly, and on removing
the device the server could crash.
Found in F18 testing.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
hw/xfree86/common/xf86platformBus.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 0525e39..5866333 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -438,7 +438,12 @@ xf86platformAddDevice(int index)
}
scr_index = AddGPUScreen(xf86GPUScreens[i]->ScreenInit, 0, NULL);
-
+ if (scr_index == -1) {
+ xf86DeleteScreen(xf86GPUScreens[i]);
+ xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL);
+ xf86NumGPUScreens = old_screens;
+ return -1;
+ }
dixSetPrivate(&xf86GPUScreens[i]->pScreen->devPrivates,
xf86ScreenKey, xf86GPUScreens[i]);
--
1.8.0.1

View File

@ -1 +1 @@
56777b1f9d3342eaf5c37c61b9adc6ba xorg-server-20130215.tar.xz
86110278b784e279381b7f6f2295c508 xorg-server-1.14.0.tar.bz2

View File

@ -8,8 +8,8 @@
# format, and add a PatchN: line. If you want to push something upstream,
# check out the master branch, pull, cherry-pick, and push.
%global gitdate 20130215
%global stable_abi 0
#global gitdate 20130215
%global stable_abi 1
%if !0%{?gitdate} || %{stable_abi}
# Released ABI versions. Have to keep these manually in sync with the
@ -41,8 +41,8 @@
Summary: X.Org X11 X server
Name: xorg-x11-server
Version: 1.13.99.902
Release: 2%{?gitdate:.%{gitdate}}%{dist}
Version: 1.14.0
Release: 1%{?gitdate:.%{gitdate}}%{dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X
@ -105,13 +105,16 @@ Patch7052: 0001-xf86-return-NULL-for-compat-output-if-no-outputs.patch
Patch7064: 0001-mieq-Bump-default-queue-size-to-512.patch
# some hotplug fixes/workaround
Patch7065: 0001-xfree86-hotplug-cleanup-properly-if-the-screen-fails.patch
Patch7066: 0001-xf86crtc-don-t-use-display-for-vx-vy-for-gpu-screens.patch
# autoconfig: send events
Patch7067: 0001-autoconfig-fixup-tell-changed-so-randr-clients-can-t.patch
Patch7067: 0001-randr-don-t-directly-set-changed-bits-in-randr-scree.patch
Patch7068: 0001-randr-make-SetChanged-modify-the-main-protocol-scree.patch
Patch7069: 0001-randr-only-respected-changed-on-the-protocol-screen.patch
Patch7070: 0001-randr-report-changes-when-we-disconnect-a-GPU-slave.patch
# upstream in -next for 1.15, e21e183059df5975e7086850d1931edb2c1bbd06
Patch7070: 0001-os-use-libunwind-to-generate-backtraces.patch
Patch7071: 0001-os-use-libunwind-to-generate-backtraces.patch
%global moduledir %{_libdir}/xorg/modules
%global drimoduledir %{_libdir}/dri
@ -580,6 +583,9 @@ rm -rf $RPM_BUILD_ROOT
%{xserver_source_dir}
%changelog
* Thu Mar 07 2013 Peter Hutterer <peter.hutterer@redhat.com> 1.14.0-1
- xserver 1.14
* Wed Mar 06 2013 Peter Hutterer <peter.hutterer@redhat.com> 1.13.99.902-2
- Use libunwind for backtraces