reapply dropped patch to fix regression (#981953)
This commit is contained in:
parent
9ed6772743
commit
9dc0b02a88
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
|
||||
|
@ -42,7 +42,7 @@
|
||||
Summary: X.Org X11 X server
|
||||
Name: xorg-x11-server
|
||||
Version: 1.14.2
|
||||
Release: 3%{?gitdate:.%{gitdate}}%{dist}
|
||||
Release: 4%{?gitdate:.%{gitdate}}%{dist}
|
||||
URL: http://www.x.org
|
||||
License: MIT
|
||||
Group: User Interface/X
|
||||
@ -86,6 +86,7 @@ Patch6030: xserver-1.6.99-right-of.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
|
||||
@ -623,6 +624,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{xserver_source_dir}
|
||||
|
||||
%changelog
|
||||
* Fri Jul 12 2013 Dave Airlie <airlied@redhat.com> 1.14.2-4
|
||||
- reapply dropped patch to fix regression (#981953)
|
||||
|
||||
* Tue Jul 09 2013 Peter Hutterer <peter.hutterer@redhat.com> 1.14.2-3
|
||||
- Fix crash on 32-bit with virtual box guest additions (#972095)
|
||||
|
||||
|
@ -18,14 +18,14 @@ Signed-off-by: Dave Airlie <airlied@gmail.com>
|
||||
3 files changed, 47 insertions(+)
|
||||
|
||||
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
|
||||
index 91ec4c8..f95eec5 100644
|
||||
index 91ec4c8..142ce95 100644
|
||||
--- a/hw/xfree86/common/xf86Init.c
|
||||
+++ b/hw/xfree86/common/xf86Init.c
|
||||
@@ -361,6 +361,16 @@ xf86CreateRootWindow(WindowPtr pWin)
|
||||
return ret;
|
||||
}
|
||||
|
||||
+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
|
||||
+extern void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master);
|
||||
+static void
|
||||
+xf86AutoConfigOutputDevices(void)
|
||||
+{
|
||||
@ -48,7 +48,7 @@ index 91ec4c8..f95eec5 100644
|
||||
if (sigio_blocked)
|
||||
OsReleaseSIGIO();
|
||||
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
|
||||
index bcb65ff..0b0f846 100644
|
||||
index e368dee..1581413 100644
|
||||
--- a/hw/xfree86/common/xf86platformBus.c
|
||||
+++ b/hw/xfree86/common/xf86platformBus.c
|
||||
@@ -393,6 +393,8 @@ xf86platformProbeDev(DriverPtr drvp)
|
||||
@ -60,8 +60,8 @@ index bcb65ff..0b0f846 100644
|
||||
int
|
||||
xf86platformAddDevice(int index)
|
||||
{
|
||||
@@ -457,6 +459,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]);
|
||||
@ -69,14 +69,15 @@ index bcb65ff..0b0f846 100644
|
||||
return 0;
|
||||
}
|
||||
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
|
||||
index 1790137..b01da8d 100644
|
||||
index 4a490c6..5453f3a 100644
|
||||
--- a/hw/xfree86/modes/xf86Crtc.c
|
||||
+++ b/hw/xfree86/modes/xf86Crtc.c
|
||||
@@ -3328,3 +3328,34 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn)
|
||||
@@ -3358,3 +3358,35 @@ xf86DetachAllCrtc(ScrnInfoPtr scrn)
|
||||
crtc->x = crtc->y = 0;
|
||||
}
|
||||
}
|
||||
+
|
||||
+
|
||||
+void xf86AutoConfigOutputDevice(ScrnInfoPtr pScrn, ScrnInfoPtr master)
|
||||
+{
|
||||
+ RRProviderPtr master_provider;
|
||||
@ -92,7 +93,7 @@ index 1790137..b01da8d 100644
|
||||
+ if ((master->capabilities & RR_Capability_SinkOffload) &&
|
||||
+ pScrn->capabilities & RR_Capability_SourceOffload) {
|
||||
+ /* source offload */
|
||||
+
|
||||
+
|
||||
+ DetachUnboundGPU(pScrn->pScreen);
|
||||
+ unbound = TRUE;
|
||||
+ AttachOffloadGPU(master->pScreen, pScrn->pScreen);
|
||||
@ -107,3 +108,6 @@ index 1790137..b01da8d 100644
|
||||
+ slave_config->randr_provider->output_source = master_provider;
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.8.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user