Merge branch 'f19'
Conflicts: xorg-x11-server.spec
This commit is contained in:
commit
56066ed68f
1
.gitignore
vendored
1
.gitignore
vendored
@ -24,3 +24,4 @@ xorg-server-1.9.1.tar.bz2
|
||||
/xorg-server-20130109.tar.xz
|
||||
/xorg-server-20130215.tar.xz
|
||||
/xorg-server-1.14.0.tar.bz2
|
||||
/xorg-server-1.14.1.tar.bz2
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 8b328d4ee3873bc0a7a34f2cb9d301827244b98c Mon Sep 17 00:00:00 2001
|
||||
From: Aaron Plattner <aplattner@nvidia.com>
|
||||
Date: Fri, 21 Dec 2012 07:37:33 -0800
|
||||
Subject: [PATCH 1/2] dix: Make small bitfields that store enums unsigned
|
||||
|
||||
Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field
|
||||
from a signed int to a signed int 2-bit bitfield. The ClientState enum that is
|
||||
expected to be assigned to this field has four values: ClientStateInitial (0),
|
||||
ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3).
|
||||
However, because this bitfield is signed, ClientStateRetained becomes -2 when
|
||||
assigned, and ClientStateGone becomes -1. This causes warnings:
|
||||
|
||||
test.c:54:10: error: case label value exceeds maximum value for type [-Werror]
|
||||
test.c:55:10: error: case label value exceeds maximum value for type [-Werror]
|
||||
|
||||
The code here is a switch statement:
|
||||
|
||||
53 switch (client->clientState) {
|
||||
54 case ClientStateGone:
|
||||
55 case ClientStateRetained:
|
||||
56 [...]
|
||||
57 break;
|
||||
58
|
||||
59 default:
|
||||
60 [...]
|
||||
61 break;
|
||||
62 }
|
||||
|
||||
It also causes bizarre problems like this:
|
||||
|
||||
client->clientState = ClientStateGone;
|
||||
assert(client->clientState == ClientStateGone); // this assert fails
|
||||
|
||||
Also change the signedness of nearby bitfields to match.
|
||||
|
||||
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
|
||||
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
||||
Reviewed-by: Colin Harrison <colin.harrison at virgin.net>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
---
|
||||
include/dixstruct.h | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/dixstruct.h b/include/dixstruct.h
|
||||
index c1236f5..6784819 100644
|
||||
--- a/include/dixstruct.h
|
||||
+++ b/include/dixstruct.h
|
||||
@@ -90,12 +90,12 @@ typedef struct _Client {
|
||||
Mask clientAsMask;
|
||||
short index;
|
||||
unsigned char majorOp, minorOp;
|
||||
- int swapped:1;
|
||||
- int local:1;
|
||||
- int big_requests:1; /* supports large requests */
|
||||
- int clientGone:1;
|
||||
- int closeDownMode:2;
|
||||
- int clientState:2;
|
||||
+ unsigned int swapped:1;
|
||||
+ unsigned int local:1;
|
||||
+ unsigned int big_requests:1; /* supports large requests */
|
||||
+ unsigned int clientGone:1;
|
||||
+ unsigned int closeDownMode:2;
|
||||
+ unsigned int clientState:2;
|
||||
char smart_priority;
|
||||
short noClientException; /* this client died or needs to be killed */
|
||||
int priority;
|
||||
--
|
||||
1.8.0.2
|
||||
|
185
0001-gpu-screen-upstream-fixes.patch
Normal file
185
0001-gpu-screen-upstream-fixes.patch
Normal file
@ -0,0 +1,185 @@
|
||||
From a7bbd0cbf4b7a7331bb441c9c744c148435b5155 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Wed, 9 Jan 2013 12:51:55 +1000
|
||||
Subject: [PATCH] gpu screen: upstream fixes
|
||||
|
||||
dix/gpu: remove asserts for output/offload from same slave
|
||||
xf86crtc: don't use scrn->display for gpu screens
|
||||
dix: allow pixmap dirty helper to be used for non-shared pixmaps
|
||||
gpu: call CreateScreenResources for GPU screens
|
||||
xfree86: don't enable anything in xf86InitialConfiguration for GPU screens
|
||||
|
||||
Signed-off-by: Dave Airlie <airlied@gmail.com>
|
||||
---
|
||||
dix/dispatch.c | 2 --
|
||||
dix/main.c | 3 +++
|
||||
dix/pixmap.c | 2 ++
|
||||
fb/fbpixmap.c | 1 +
|
||||
hw/xfree86/common/xf86platformBus.c | 8 ++++++++
|
||||
hw/xfree86/modes/xf86Crtc.c | 34 ++++++++++++++++++++++++----------
|
||||
6 files changed, 38 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dix/dispatch.c b/dix/dispatch.c
|
||||
index 8d61735..90b6c7c 100644
|
||||
--- a/dix/dispatch.c
|
||||
+++ b/dix/dispatch.c
|
||||
@@ -3942,7 +3942,6 @@ void
|
||||
AttachOutputGPU(ScreenPtr pScreen, ScreenPtr new)
|
||||
{
|
||||
assert(new->isGPU);
|
||||
- assert(!new->current_master);
|
||||
xorg_list_add(&new->output_head, &pScreen->output_slave_list);
|
||||
new->current_master = pScreen;
|
||||
}
|
||||
@@ -3959,7 +3958,6 @@ void
|
||||
AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr new)
|
||||
{
|
||||
assert(new->isGPU);
|
||||
- assert(!new->current_master);
|
||||
xorg_list_add(&new->offload_head, &pScreen->offload_slave_list);
|
||||
new->current_master = pScreen;
|
||||
}
|
||||
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/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 =
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index bcb65ff..e368dee 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -455,6 +455,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);
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 7d55f60..989595f 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -1908,6 +1908,14 @@ xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||
Bool any_enabled = FALSE;
|
||||
int o;
|
||||
|
||||
+ /*
|
||||
+ * Don't bother enabling outputs on GPU screens: a client needs to attach
|
||||
+ * it to a source provider before setting a mode that scans out a shared
|
||||
+ * pixmap.
|
||||
+ */
|
||||
+ if (scrn->is_gpu)
|
||||
+ return FALSE;
|
||||
+
|
||||
for (o = 0; o < config->num_output; o++)
|
||||
any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE);
|
||||
|
||||
@@ -2360,11 +2368,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
config->debug_modes = xf86ReturnOptValBool(config->options,
|
||||
OPTION_MODEDEBUG, FALSE);
|
||||
|
||||
- if (scrn->display->virtualX)
|
||||
+ if (scrn->display->virtualX && !scrn->is_gpu)
|
||||
width = scrn->display->virtualX;
|
||||
else
|
||||
width = config->maxWidth;
|
||||
- if (scrn->display->virtualY)
|
||||
+ if (scrn->display->virtualY && !scrn->is_gpu)
|
||||
height = scrn->display->virtualY;
|
||||
else
|
||||
height = config->maxHeight;
|
||||
@@ -2377,9 +2385,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
|
||||
ret = xf86CollectEnabledOutputs(scrn, config, enabled);
|
||||
if (ret == FALSE && canGrow) {
|
||||
- xf86DrvMsg(i, X_WARNING,
|
||||
- "Unable to find connected outputs - setting %dx%d initial framebuffer\n",
|
||||
- NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
|
||||
+ if (!scrn->is_gpu)
|
||||
+ xf86DrvMsg(i, X_WARNING,
|
||||
+ "Unable to find connected outputs - setting %dx%d "
|
||||
+ "initial framebuffer\n",
|
||||
+ NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT);
|
||||
have_outputs = FALSE;
|
||||
}
|
||||
else {
|
||||
@@ -2428,8 +2438,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];
|
||||
@@ -2477,7 +2489,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.
|
||||
@@ -2492,8 +2504,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.2
|
||||
|
@ -0,0 +1,60 @@
|
||||
From c760fb0154848d47438908ba8b3da2fffc68a460 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Thu, 10 Jan 2013 03:26:33 +0000
|
||||
Subject: [PATCH] hw/xfree86: Only report SetDesiredModes() failed if at least
|
||||
one modeset fails
|
||||
|
||||
commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be
|
||||
Author: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue Jan 8 20:24:32 2013 -0800
|
||||
|
||||
hw/xfree86: Require only one working CRTC to start the server.
|
||||
|
||||
changed the logic to try to set the mode on all connected outputs rather
|
||||
than abort upon the first failure. The return error code was then
|
||||
tweaked such that it reported success if it set a mode on any crtc.
|
||||
However, this confuses the headless case where we never enable any crtcs
|
||||
and also, importantly, never fail to set a crtc.
|
||||
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190
|
||||
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Also-written-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
||||
Reviewed-by: Keith Packard <keithp@keithp.com>
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
(cherry picked from commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b)
|
||||
---
|
||||
hw/xfree86/modes/xf86Crtc.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index f9ae465..7d55f60 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -2598,8 +2598,8 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
|
||||
{
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CrtcPtr crtc = config->crtc[0];
|
||||
+ int enabled = 0, failed = 0;
|
||||
int c;
|
||||
- int enabled = 0;
|
||||
|
||||
/* A driver with this hook will take care of this */
|
||||
if (!crtc->funcs->set_mode_major) {
|
||||
@@ -2659,11 +2659,12 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
|
||||
if (config->output[o]->crtc == crtc)
|
||||
config->output[o]->crtc = NULL;
|
||||
crtc->enabled = FALSE;
|
||||
+ ++failed;
|
||||
}
|
||||
}
|
||||
|
||||
xf86DisableUnusedFunctions(scrn);
|
||||
- return enabled != 0;
|
||||
+ return enabled != 0 || failed == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
1.8.2
|
||||
|
@ -1,110 +0,0 @@
|
||||
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
|
||||
|
@ -1,47 +0,0 @@
|
||||
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
|
||||
|
@ -1,31 +0,0 @@
|
||||
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
|
||||
|
@ -1,61 +0,0 @@
|
||||
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
|
||||
|
167
0001-randr-upstream-set-changed-fixes.patch
Normal file
167
0001-randr-upstream-set-changed-fixes.patch
Normal file
@ -0,0 +1,167 @@
|
||||
From ce3de2dcb1b3bd99a693c828278a416c245acc37 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Airlie <airlied@redhat.com>
|
||||
Date: Wed, 9 Jan 2013 14:23:57 +1000
|
||||
Subject: [PATCH] randr upstream set changed fixes
|
||||
|
||||
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
hw/xfree86/common/xf86platformBus.c | 3 ++-
|
||||
hw/xfree86/modes/xf86RandR12.c | 2 ++
|
||||
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, 35 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index 9034dad..bcb65ff 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;
|
||||
@@ -499,7 +500,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);
|
||||
diff --git a/randr/randr.c b/randr/randr.c
|
||||
index f0decfc..cb6fce7 100644
|
||||
--- a/randr/randr.c
|
||||
+++ b/randr/randr.c
|
||||
@@ -464,6 +464,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
|
||||
*/
|
||||
@@ -484,7 +506,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 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.2
|
||||
|
@ -1,30 +0,0 @@
|
||||
From 0c05db308881b3b462dae4101312c0034e6288ba 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(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index ba84e6b..61119b3 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -2420,11 +2420,11 @@ xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow)
|
||||
config->debug_modes = xf86ReturnOptValBool(config->options,
|
||||
OPTION_MODEDEBUG, FALSE);
|
||||
|
||||
- if (scrn->display->virtualX)
|
||||
+ if (scrn->display->virtualX && !scrn->is_gpu)
|
||||
width = scrn->display->virtualX;
|
||||
else
|
||||
width = config->maxWidth;
|
||||
- if (scrn->display->virtualY)
|
||||
+ if (scrn->display->virtualY && !scrn->is_gpu)
|
||||
height = scrn->display->virtualY;
|
||||
else
|
||||
height = config->maxHeight;
|
||||
--
|
||||
1.8.0.1
|
||||
|
@ -1,56 +0,0 @@
|
||||
From 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Mon Sep 17 00:00:00 2001
|
||||
From: Keith Packard <keithp@keithp.com>
|
||||
Date: Tue, 8 Jan 2013 20:24:32 -0800
|
||||
Subject: [PATCH 2/2] hw/xfree86: Require only one working CRTC to start the
|
||||
server.
|
||||
|
||||
Instead of requiring every mode set to complete successfully, start up
|
||||
as long as at least one CRTC is working. This avoids failures when one
|
||||
or more CRTCs can't start due to mode setting conflicts.
|
||||
|
||||
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
||||
---
|
||||
hw/xfree86/modes/xf86Crtc.c | 15 +++++++++++----
|
||||
1 file changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 13251cf..b3ded5a 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -2605,6 +2605,7 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
xf86CrtcPtr crtc = config->crtc[0];
|
||||
int c;
|
||||
+ int enabled = 0;
|
||||
|
||||
/* A driver with this hook will take care of this */
|
||||
if (!crtc->funcs->set_mode_major) {
|
||||
@@ -2655,14 +2656,20 @@ xf86SetDesiredModes(ScrnInfoPtr scrn)
|
||||
transform = &crtc->desiredTransform;
|
||||
else
|
||||
transform = NULL;
|
||||
- if (!xf86CrtcSetModeTransform
|
||||
+ if (xf86CrtcSetModeTransform
|
||||
(crtc, &crtc->desiredMode, crtc->desiredRotation, transform,
|
||||
- crtc->desiredX, crtc->desiredY))
|
||||
- return FALSE;
|
||||
+ crtc->desiredX, crtc->desiredY)) {
|
||||
+ ++enabled;
|
||||
+ } else {
|
||||
+ for (o = 0; o < config->num_output; o++)
|
||||
+ if (config->output[o]->crtc == crtc)
|
||||
+ config->output[o]->crtc = NULL;
|
||||
+ crtc->enabled = FALSE;
|
||||
+ }
|
||||
}
|
||||
|
||||
xf86DisableUnusedFunctions(scrn);
|
||||
- return TRUE;
|
||||
+ return enabled != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
--
|
||||
1.8.0.2
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
86110278b784e279381b7f6f2295c508 xorg-server-1.14.0.tar.bz2
|
||||
6a0f1a1639ada4b9da7e9582bc79252a xorg-server-1.14.1.tar.bz2
|
||||
|
@ -1,53 +0,0 @@
|
||||
From patchwork Wed Oct 17 10:06:47 2012
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
MIME-Version: 1.0
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Subject: [v2] xf86: Fix non-PCI configuration-less setups
|
||||
Date: Wed, 17 Oct 2012 10:06:47 -0000
|
||||
From: Thierry Reding <thierry.reding@avionic-design.de>
|
||||
X-Patchwork-Id: 12233
|
||||
Message-Id: <1350468407-27681-1-git-send-email-thierry.reding@avionic-design.de>
|
||||
To: xorg-devel@lists.x.org
|
||||
Cc: Dave Airlie <airlied@gmail.com>
|
||||
|
||||
For non-PCI video devices, such as those found on many ARM embedded
|
||||
systems, the X server currently requires the BusID option to specify the
|
||||
full path to the DRM device's sysfs node in order to properly match it
|
||||
against the probed platform devices.
|
||||
|
||||
In order to allow X to start up properly if either the BusID option was
|
||||
omitted or no configuration is present at all, the first video device is
|
||||
used by default.
|
||||
|
||||
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
|
||||
|
||||
---
|
||||
Changes in v2:
|
||||
- Add additional checks for safety (I don't think numDevs will ever be 0
|
||||
since a default will be generated if no configuration is present, but
|
||||
it doesn't hurt to check anyway). Without these checks there is a
|
||||
possibility of the X server crashing if no platform devices have been
|
||||
found.
|
||||
|
||||
hw/xfree86/common/xf86platformBus.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index 0525e39..599d84a 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -377,6 +377,14 @@ xf86platformProbeDev(DriverPtr drvp)
|
||||
continue;
|
||||
}
|
||||
|
||||
+ /*
|
||||
+ * If all of the above fails, which can happen if X was started without
|
||||
+ * configuration or if BusID wasn't set for non-PCI devices, use the first
|
||||
+ * device by default.
|
||||
+ */
|
||||
+ if (!foundScreen && xf86_num_platform_devices > 0 && numDevs > 0)
|
||||
+ foundScreen = probeSingleDevice(&xf86_platform_devices[0], drvp, devList[0], 0);
|
||||
+
|
||||
/* if autoaddgpu devices is enabled then go find a few more and add them as GPU screens */
|
||||
if (xf86Info.autoAddGPU && numDevs) {
|
||||
for (j = 0; j < xf86_num_platform_devices; j++) {
|
@ -41,8 +41,8 @@
|
||||
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.14.0
|
||||
Release: 4%{?gitdate:.%{gitdate}}%{dist}
|
||||
Version: 1.14.1
|
||||
Release: 1%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -84,6 +84,14 @@ Patch6011: xserver-1.6.0-less-acpi-brokenness.patch
|
||||
Patch6030: xserver-1.6.99-right-of.patch
|
||||
#Patch6044: xserver-1.6.99-hush-prerelease-warning.patch
|
||||
|
||||
# upstream backports - sent to stable
|
||||
Patch6050: xserver-1.14.0-fix-gpu-hotplug-vt-switch.patch
|
||||
Patch6051: 0001-hw-xfree86-Only-report-SetDesiredModes-failed-if-at-.patch
|
||||
|
||||
# upstream submitted
|
||||
Patch6052: 0001-randr-upstream-set-changed-fixes.patch
|
||||
Patch6053: 0001-gpu-screen-upstream-fixes.patch
|
||||
|
||||
# Fix libselinux-triggered build error
|
||||
# RedHat/Fedora-specific patch
|
||||
Patch7013: xserver-1.12-Xext-fix-selinux-build-failure.patch
|
||||
@ -98,21 +106,9 @@ Patch7027: xserver-autobind-hotplug.patch
|
||||
|
||||
Patch7052: 0001-xf86-return-NULL-for-compat-output-if-no-outputs.patch
|
||||
|
||||
# Fix non-PCI configuration-less setups - broken
|
||||
#Patch7061: v2-xf86-Fix-non-PCI-configuration-less-setups.patch
|
||||
|
||||
# mustard: make the default queue length bigger to calm abrt down
|
||||
Patch7064: 0001-mieq-Bump-default-queue-size-to-512.patch
|
||||
|
||||
# some hotplug fixes/workaround
|
||||
Patch7066: 0001-xf86crtc-don-t-use-display-for-vx-vy-for-gpu-screens.patch
|
||||
# autoconfig: send events
|
||||
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
|
||||
%if !0%{?rhel}
|
||||
Patch7071: 0001-os-use-libunwind-to-generate-backtraces.patch
|
||||
@ -595,10 +591,21 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{xserver_source_dir}
|
||||
|
||||
%changelog
|
||||
* Wed Apr 17 2013 Peter Hutterer <peter.hutterer@redhat.com> 1.14.0-4
|
||||
* Mon May 06 2013 Dave Airlie <airlied@redhat.com> 1.14.1-1
|
||||
- upstream rebase
|
||||
- reorganise the randr/gpu screen patches + backports
|
||||
|
||||
* Wed Apr 17 2013 Peter Hutterer <peter.hutterer@redhat.com> 1.14.0-6
|
||||
- CVE-2013-1940: Fix xf86FlushInput() to drain evdev events
|
||||
(#950438, #952949)
|
||||
|
||||
* Fri Apr 12 2013 Dave Airlie <airlied@redhat.com> 1.14.0-5
|
||||
- reenable reverse optimus and some missing patch from F18
|
||||
|
||||
* Fri Apr 12 2013 Dave Airlie <airlied@redhat.com> 1.14.0-4
|
||||
- fix bug with GPU hotplugging while VT switched
|
||||
- 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
|
||||
|
||||
|
293
xserver-1.14.0-fix-gpu-hotplug-vt-switch.patch
Normal file
293
xserver-1.14.0-fix-gpu-hotplug-vt-switch.patch
Normal file
@ -0,0 +1,293 @@
|
||||
From 5e9e979fae229480d1a4af4f247c0251cb2852f9 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora X Ninjas <x@fedoraproject.org>
|
||||
Date: Fri, 12 Apr 2013 10:16:21 +1000
|
||||
Subject: [PATCH] fix GPU hotplugging while VT switched.
|
||||
|
||||
Backports 3 patches from upstream into one.
|
||||
---
|
||||
hw/xfree86/common/xf86.h | 1 +
|
||||
hw/xfree86/common/xf86Events.c | 15 +++++++++-
|
||||
hw/xfree86/common/xf86Init.c | 2 +-
|
||||
hw/xfree86/common/xf86Xinput.c | 2 +-
|
||||
hw/xfree86/common/xf86platformBus.c | 19 +++++++++++++
|
||||
hw/xfree86/common/xf86platformBus.h | 4 +++
|
||||
hw/xfree86/os-support/linux/lnx_platform.c | 45 ++++++++++++++++++++++++++----
|
||||
hw/xfree86/os-support/solaris/sun_init.c | 2 +-
|
||||
hw/xfree86/os-support/xf86_OSproc.h | 3 ++
|
||||
include/hotplug.h | 1 +
|
||||
10 files changed, 85 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
|
||||
index 1514c26..828d958 100644
|
||||
--- a/hw/xfree86/common/xf86.h
|
||||
+++ b/hw/xfree86/common/xf86.h
|
||||
@@ -243,6 +243,7 @@ extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void));
|
||||
extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new);
|
||||
extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg);
|
||||
extern _X_EXPORT void xf86PrintBacktrace(void);
|
||||
+extern _X_EXPORT Bool xf86VTOwner(void);
|
||||
|
||||
/* xf86Helper.c */
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
|
||||
index d92174e..7a35250 100644
|
||||
--- a/hw/xfree86/common/xf86Events.c
|
||||
+++ b/hw/xfree86/common/xf86Events.c
|
||||
@@ -84,6 +84,7 @@
|
||||
#include "dpmsproc.h"
|
||||
#endif
|
||||
|
||||
+#include "xf86platformBus.h"
|
||||
/*
|
||||
* This is a toggling variable:
|
||||
* FALSE = No VT switching keys have been pressed last time around
|
||||
@@ -428,7 +429,7 @@ xf86VTSwitch(void)
|
||||
* Since all screens are currently all in the same state it is sufficient
|
||||
* check the first. This might change in future.
|
||||
*/
|
||||
- if (xf86Screens[0]->vtSema) {
|
||||
+ if (xf86VTOwner()) {
|
||||
|
||||
DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n",
|
||||
BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE));
|
||||
@@ -561,6 +562,9 @@ xf86VTSwitch(void)
|
||||
for (ih = InputHandlers; ih; ih = ih->next)
|
||||
xf86EnableInputHandler(ih);
|
||||
|
||||
+ /* check for any new output devices */
|
||||
+ xf86platformVTProbe();
|
||||
+
|
||||
OsReleaseSIGIO();
|
||||
}
|
||||
}
|
||||
@@ -769,3 +773,12 @@ DDXRingBell(int volume, int pitch, int duration)
|
||||
{
|
||||
xf86OSRingBell(volume, pitch, duration);
|
||||
}
|
||||
+
|
||||
+Bool
|
||||
+xf86VTOwner(void)
|
||||
+{
|
||||
+ /* at system startup xf86Screens[0] won't be set - but we will own the VT */
|
||||
+ if (xf86NumScreens == 0)
|
||||
+ return TRUE;
|
||||
+ return xf86Screens[0]->vtSema;
|
||||
+}
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index a34d7c1..142ce95 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -829,7 +829,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||
if (serverGeneration != 1) {
|
||||
xf86Resetting = TRUE;
|
||||
/* All screens are in the same state, so just check the first */
|
||||
- if (!xf86Screens[0]->vtSema) {
|
||||
+ if (!xf86VTOwner()) {
|
||||
#ifdef HAS_USL_VTS
|
||||
ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ);
|
||||
#endif
|
||||
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
|
||||
index bee407b..26c03c6 100644
|
||||
--- a/hw/xfree86/common/xf86Xinput.c
|
||||
+++ b/hw/xfree86/common/xf86Xinput.c
|
||||
@@ -870,7 +870,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
|
||||
}
|
||||
|
||||
/* Enable it if it's properly initialised and we're currently in the VT */
|
||||
- if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) {
|
||||
+ if (enable && dev->inited && dev->startup && xf86VTOwner()) {
|
||||
OsBlockSignals();
|
||||
EnableDevice(dev, TRUE);
|
||||
if (!dev->enabled) {
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index 4ccb005..0b0f846 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -114,6 +114,11 @@ xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+Bool
|
||||
+xf86_get_platform_device_unowned(int index)
|
||||
+{
|
||||
+ return xf86_platform_devices[index].attribs->unowned;
|
||||
+}
|
||||
|
||||
/*
|
||||
* xf86IsPrimaryPlatform() -- return TRUE if primary device
|
||||
@@ -502,4 +507,18 @@ xf86platformRemoveDevice(int index)
|
||||
out:
|
||||
return;
|
||||
}
|
||||
+
|
||||
+/* called on return from VT switch to find any new devices */
|
||||
+void xf86platformVTProbe(void)
|
||||
+{
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < xf86_num_platform_devices; i++) {
|
||||
+ if (xf86_platform_devices[i].attribs->unowned == FALSE)
|
||||
+ continue;
|
||||
+
|
||||
+ xf86_platform_devices[i].attribs->unowned = FALSE;
|
||||
+ xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs);
|
||||
+ }
|
||||
+}
|
||||
#endif
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.h b/hw/xfree86/common/xf86platformBus.h
|
||||
index 49afc24..4e17578 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.h
|
||||
+++ b/hw/xfree86/common/xf86platformBus.h
|
||||
@@ -46,6 +46,8 @@ extern int
|
||||
xf86_remove_platform_device(int dev_index);
|
||||
extern Bool
|
||||
xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_str);
|
||||
+extern Bool
|
||||
+xf86_get_platform_device_unowned(int index);
|
||||
|
||||
extern int
|
||||
xf86platformAddDevice(int index);
|
||||
@@ -59,6 +61,8 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
|
||||
|
||||
extern _X_EXPORT int
|
||||
xf86PlatformMatchDriver(char *matches[], int nmatches);
|
||||
+
|
||||
+extern void xf86platformVTProbe(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
|
||||
index 76f5583..21768ee 100644
|
||||
--- a/hw/xfree86/os-support/linux/lnx_platform.c
|
||||
+++ b/hw/xfree86/os-support/linux/lnx_platform.c
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "hotplug.h"
|
||||
|
||||
static Bool
|
||||
-get_drm_info(struct OdevAttributes *attribs, char *path)
|
||||
+get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
|
||||
{
|
||||
drmSetVersion sv;
|
||||
char *buf;
|
||||
@@ -37,10 +37,14 @@ get_drm_info(struct OdevAttributes *attribs, char *path)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
- xf86_add_platform_device(attribs);
|
||||
+ /* for a delayed probe we've already added the device */
|
||||
+ if (delayed_index == -1) {
|
||||
+ xf86_add_platform_device(attribs);
|
||||
+ delayed_index = xf86_num_platform_devices - 1;
|
||||
+ }
|
||||
|
||||
buf = drmGetBusid(fd);
|
||||
- xf86_add_platform_device_attrib(xf86_num_platform_devices - 1,
|
||||
+ xf86_add_platform_device_attrib(delayed_index,
|
||||
ODEV_ATTRIB_BUSID, buf);
|
||||
drmFreeBusid(buf);
|
||||
close(fd);
|
||||
@@ -89,6 +93,23 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu
|
||||
}
|
||||
|
||||
void
|
||||
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs)
|
||||
+{
|
||||
+ Bool ret;
|
||||
+ char *dpath;
|
||||
+ dpath = xf86_get_platform_attrib(index, ODEV_ATTRIB_PATH);
|
||||
+
|
||||
+ ret = get_drm_info(attribs, dpath, index);
|
||||
+ if (ret == FALSE) {
|
||||
+ xf86_remove_platform_device(index);
|
||||
+ return;
|
||||
+ }
|
||||
+ ret = xf86platformAddDevice(index);
|
||||
+ if (ret == -1)
|
||||
+ xf86_remove_platform_device(index);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
|
||||
{
|
||||
struct OdevAttribute *attrib;
|
||||
@@ -119,7 +140,15 @@ xf86PlatformDeviceProbe(struct OdevAttributes *attribs)
|
||||
LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n",
|
||||
path);
|
||||
|
||||
- ret = get_drm_info(attribs, path);
|
||||
+ if (!xf86VTOwner()) {
|
||||
+ /* if we don't currently own the VT then don't probe the device,
|
||||
+ just mark it as unowned for later use */
|
||||
+ attribs->unowned = TRUE;
|
||||
+ xf86_add_platform_device(attribs);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ ret = get_drm_info(attribs, path, -1);
|
||||
if (ret == FALSE)
|
||||
goto out_free;
|
||||
|
||||
@@ -138,6 +167,9 @@ void NewGPUDeviceRequest(struct OdevAttributes *attribs)
|
||||
if (old_num == xf86_num_platform_devices)
|
||||
return;
|
||||
|
||||
+ if (xf86_get_platform_device_unowned(xf86_num_platform_devices - 1) == TRUE)
|
||||
+ return;
|
||||
+
|
||||
ret = xf86platformAddDevice(xf86_num_platform_devices-1);
|
||||
if (ret == -1)
|
||||
xf86_remove_platform_device(xf86_num_platform_devices-1);
|
||||
@@ -171,7 +203,10 @@ void DeleteGPUDeviceRequest(struct OdevAttributes *attribs)
|
||||
|
||||
ErrorF("xf86: remove device %d %s\n", index, syspath);
|
||||
|
||||
- xf86platformRemoveDevice(index);
|
||||
+ if (xf86_get_platform_device_unowned(index) == TRUE)
|
||||
+ xf86_remove_platform_device(index);
|
||||
+ else
|
||||
+ xf86platformRemoveDevice(index);
|
||||
out:
|
||||
config_odev_free_attribute_list(attribs);
|
||||
}
|
||||
diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c
|
||||
index 4b75a98..68527a5 100644
|
||||
--- a/hw/xfree86/os-support/solaris/sun_init.c
|
||||
+++ b/hw/xfree86/os-support/solaris/sun_init.c
|
||||
@@ -274,7 +274,7 @@ xf86OpenConsole(void)
|
||||
* this is to make sure we don't continue until the activate
|
||||
* signal is received.
|
||||
*/
|
||||
- if (!xf86Screens[0]->vtSema)
|
||||
+ if (!xf86VTOwner())
|
||||
sleep(5);
|
||||
}
|
||||
#endif /* HAS_USL_VTS */
|
||||
diff --git a/hw/xfree86/os-support/xf86_OSproc.h b/hw/xfree86/os-support/xf86_OSproc.h
|
||||
index ea2b16e..6be5946 100644
|
||||
--- a/hw/xfree86/os-support/xf86_OSproc.h
|
||||
+++ b/hw/xfree86/os-support/xf86_OSproc.h
|
||||
@@ -223,6 +223,9 @@ extern _X_EXPORT void xf86InitVidMem(void);
|
||||
#include "hotplug.h"
|
||||
void
|
||||
xf86PlatformDeviceProbe(struct OdevAttributes *attribs);
|
||||
+
|
||||
+void
|
||||
+xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs);
|
||||
#endif
|
||||
|
||||
_XFUNCPROTOEND
|
||||
diff --git a/include/hotplug.h b/include/hotplug.h
|
||||
index 2a95b45..29a22c4 100644
|
||||
--- a/include/hotplug.h
|
||||
+++ b/include/hotplug.h
|
||||
@@ -40,6 +40,7 @@ struct OdevAttribute {
|
||||
|
||||
struct OdevAttributes {
|
||||
struct xorg_list list;
|
||||
+ Bool unowned;
|
||||
};
|
||||
|
||||
struct OdevAttributes *
|
||||
--
|
||||
1.8.2
|
||||
|
@ -1,21 +1,24 @@
|
||||
From 536626891b60039c0f3f9b4cd96156e9fe810f39 Mon Sep 17 00:00:00 2001
|
||||
From 05a3edae62a02bbbc3102beb5edd73d78c266ef7 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, (v2)
|
||||
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 | 28 ++++++++++++++++++++++++++++
|
||||
3 files changed, 43 insertions(+)
|
||||
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 d231ced..89629c1 100644
|
||||
index 91ec4c8..142ce95 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -361,6 +361,16 @@ xf86CreateRootWindow(WindowPtr pWin)
|
||||
@ -35,7 +38,7 @@ index d231ced..89629c1 100644
|
||||
static void
|
||||
InstallSignalHandlers(void)
|
||||
{
|
||||
@@ -926,6 +936,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||
@@ -930,6 +940,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||
for (i = 0; i < xf86NumGPUScreens; i++)
|
||||
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
|
||||
|
||||
@ -45,10 +48,10 @@ index d231ced..89629c1 100644
|
||||
if (sigio_blocked)
|
||||
OsReleaseSIGIO();
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index a73aea2..3810076 100644
|
||||
index e368dee..1581413 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -387,6 +387,8 @@ xf86platformProbeDev(DriverPtr drvp)
|
||||
@@ -393,6 +393,8 @@ xf86platformProbeDev(DriverPtr drvp)
|
||||
return foundScreen;
|
||||
}
|
||||
|
||||
@ -57,8 +60,8 @@ index a73aea2..3810076 100644
|
||||
int
|
||||
xf86platformAddDevice(int index)
|
||||
{
|
||||
@@ -446,6 +448,7 @@ 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]);
|
||||
@ -66,10 +69,10 @@ index a73aea2..3810076 100644
|
||||
return 0;
|
||||
}
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 8f05c53..ba84e6b 100644
|
||||
index 4a490c6..5453f3a 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -3321,3 +3321,31 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn)
|
||||
@@ -3358,3 +3358,35 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn)
|
||||
crtc->x = crtc->y = 0;
|
||||
}
|
||||
}
|
||||
@ -80,6 +83,7 @@ index 8f05c53..ba84e6b 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;
|
||||
@ -91,16 +95,19 @@ index 8f05c53..ba84e6b 100644
|
||||
+ /* source offload */
|
||||
+
|
||||
+ DetachUnboundGPU(pScrn->pScreen);
|
||||
+ unbound = TRUE;
|
||||
+ AttachOffloadGPU(master->pScreen, pScrn->pScreen);
|
||||
+ slave_config->randr_provider->offload_sink = master_provider;
|
||||
+ } else if ((master->capabilities & RR_Capability_SourceOutput) &&
|
||||
+ }
|
||||
+ if ((master->capabilities & RR_Capability_SourceOutput) &&
|
||||
+ pScrn->capabilities & RR_Capability_SinkOutput) {
|
||||
+ /* sink offload */
|
||||
+ DetachUnboundGPU(pScrn->pScreen);
|
||||
+ if (!unbound)
|
||||
+ DetachUnboundGPU(pScrn->pScreen);
|
||||
+ AttachOutputGPU(master->pScreen, pScrn->pScreen);
|
||||
+ slave_config->randr_provider->output_source = master_provider;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.7.10.2
|
||||
1.8.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user