Hello community, here is the log from the commit of package xorg-x11-server for openSUSE:Factory checked in at 2018-04-22 14:31:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/xorg-x11-server (Old) and /work/SRC/openSUSE:Factory/.xorg-x11-server.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xorg-x11-server" Sun Apr 22 14:31:58 2018 rev:358 rq:597729 version:1.19.6 Changes: -------- --- /work/SRC/openSUSE:Factory/xorg-x11-server/xorg-x11-server.changes 2018-03-30 11:59:23.703150670 +0200 +++ /work/SRC/openSUSE:Factory/.xorg-x11-server.new/xorg-x11-server.changes 2018-04-22 14:32:05.109370922 +0200 @@ -1,0 +2,24 @@ +Tue Apr 17 10:30:46 UTC 2018 - m...@suse.com + +- U_glx-Do-not-call-into-Composite-if-it-is-disabled.patch + * Fixes crash when GLX is enabled and Composite disabled. + (bnc#1079607) + +------------------------------------------------------------------- +Mon Apr 16 08:10:50 UTC 2018 - m...@suse.com + +- n_add-dummy-xf86DisableRandR.patch + * Add dummy xf86DisableRandR to fix linking with drivers that + still call it. See explanation inside the patch. (bnc#1089601) + +------------------------------------------------------------------- +Thu Apr 12 07:34:06 UTC 2018 - m...@suse.com + +- U_xfree86-Remove-broken-RANDR-disabling-logic-v4.patch + * Fix crash on initialization when fbdev and modesetting are used + together. (bnc#1068961) +- u_randr-Do-not-crash-if-slave-screen-does-not-have-pro.patch + * Fix crash when using randr when fbdev and modesetting are used + together. (bnc#1068961) + +------------------------------------------------------------------- New: ---- U_glx-Do-not-call-into-Composite-if-it-is-disabled.patch U_xfree86-Remove-broken-RANDR-disabling-logic-v4.patch n_add-dummy-xf86DisableRandR.patch u_randr-Do-not-crash-if-slave-screen-does-not-have-pro.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-server.spec ++++++ --- /var/tmp/diff_new_pack.w7uzxT/_old 2018-04-22 14:32:06.385324742 +0200 +++ /var/tmp/diff_new_pack.w7uzxT/_new 2018-04-22 14:32:06.389324598 +0200 @@ -232,6 +232,12 @@ Patch1304: U_0004-animcur-Fix-transitions-between-animated-cursors.patch Patch1305: u_xorg-x11-server-reproducible.patch +Patch1400: U_xfree86-Remove-broken-RANDR-disabling-logic-v4.patch +Patch1401: u_randr-Do-not-crash-if-slave-screen-does-not-have-pro.patch +Patch1402: n_add-dummy-xf86DisableRandR.patch + +Patch1500: U_glx-Do-not-call-into-Composite-if-it-is-disabled.patch + %description This package contains the X.Org Server. @@ -381,6 +387,12 @@ %patch1304 -p1 %patch1305 -p1 +%patch1400 -p1 +%patch1401 -p1 +%patch1402 -p1 + +%patch1500 -p1 + %build test -e source-file-list || \ find -L . -type f \! -name '*.orig' \! -path ./source-file-list > \ ++++++ U_glx-Do-not-call-into-Composite-if-it-is-disabled.patch ++++++ Git-commit: 1326ee0bc5eb858c3c00847b3ba65134e4ca2e2d Patch-mainline: Upstream Author: Michal Srb <m...@suse.com> Subject: glx: Do not call into Composite if it is disabled. References: bnc#1079607 fdo#104993 Otherwise X server crashes if GLX is enabled and Composite disabled. For example the compIsAlternateVisual function will try to lookup CompScreenPtr using the CompScreenPrivateKey, but that was never initialized if Composite is disabled. Fixes: f84e59a4f4. ("glx: Duplicate relevant fbconfigs for compositing visuals") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104993 Signed-off-by: Michal Srb <m...@suse.com> --- glx/glxdricommon.c | 63 +++++++++++++++++++++++++++++------------------------- glx/glxscreens.c | 33 +++++++++++++++++----------- 2 files changed, 55 insertions(+), 41 deletions(-) Index: xorg-server-1.19.6/glx/glxdricommon.c =================================================================== --- xorg-server-1.19.6.orig/glx/glxdricommon.c +++ xorg-server-1.19.6/glx/glxdricommon.c @@ -35,6 +35,7 @@ #include <GL/glxtokens.h> #include <GL/internal/dri_interface.h> #include <os.h> +#include "extinit.h" #include "glxserver.h" #include "glxext.h" #include "glxcontext.h" @@ -206,25 +207,27 @@ createModeFromConfig(const __DRIcoreExte config->config.yInverted = GL_TRUE; #ifdef COMPOSITE - /* - * Here we decide what fbconfigs will be duplicated for compositing. - * fgbconfigs marked with duplicatedForConf will be reserved for - * compositing visuals. - * It might look strange to do this decision this late when translation - * from a __DRIConfig is already done, but using the __DRIConfig - * accessor function becomes worse both with respect to code complexity - * and CPU usage. - */ - if (duplicateForComp && - (render_type_is_pbuffer_only(renderType) || - config->config.rgbBits != 32 || - config->config.visualRating != GLX_NONE || - config->config.sampleBuffers != 0)) { - free(config); - return NULL; - } + if (!noCompositeExtension) { + /* + * Here we decide what fbconfigs will be duplicated for compositing. + * fgbconfigs marked with duplicatedForConf will be reserved for + * compositing visuals. + * It might look strange to do this decision this late when translation + * from a __DRIConfig is already done, but using the __DRIConfig + * accessor function becomes worse both with respect to code complexity + * and CPU usage. + */ + if (duplicateForComp && + (render_type_is_pbuffer_only(renderType) || + config->config.rgbBits != 32 || + config->config.visualRating != GLX_NONE || + config->config.sampleBuffers != 0)) { + free(config); + return NULL; + } - config->config.duplicatedForComp = duplicateForComp; + config->config.duplicatedForComp = duplicateForComp; + } #endif return &config->config; @@ -258,14 +261,16 @@ glxConvertConfigs(const __DRIcoreExtensi } #ifdef COMPOSITE - /* Duplicate fbconfigs for use with compositing visuals */ - for (i = 0; configs[i]; i++) { - tail->next = createModeFromConfig(core, configs[i], GLX_TRUE_COLOR, - GL_TRUE); - if (tail->next == NULL) - continue; + if (!noCompositeExtension) { + /* Duplicate fbconfigs for use with compositing visuals */ + for (i = 0; configs[i]; i++) { + tail->next = createModeFromConfig(core, configs[i], GLX_TRUE_COLOR, + GL_TRUE); + if (tail->next == NULL) + continue; - tail = tail->next; + tail = tail->next; + } } #endif Index: xorg-server-1.19.6/glx/glxscreens.c =================================================================== --- xorg-server-1.19.6.orig/glx/glxscreens.c +++ xorg-server-1.19.6/glx/glxscreens.c @@ -38,6 +38,7 @@ #include <os.h> #include <colormapst.h> +#include "extinit.h" #include "privates.h" #include "glxserver.h" #include "glxutil.h" @@ -279,10 +280,12 @@ pickFBConfig(__GLXscreen * pGlxScreen, V if (config->visualID != 0) continue; #ifdef COMPOSITE - /* Use only duplicated configs for compIsAlternateVisuals */ - if (!!compIsAlternateVisual(pGlxScreen->pScreen, visual->vid) != - !!config->duplicatedForComp) - continue; + if (!noCompositeExtension) { + /* Use only duplicated configs for compIsAlternateVisuals */ + if (!!compIsAlternateVisual(pGlxScreen->pScreen, visual->vid) != + !!config->duplicatedForComp) + continue; + } #endif /* * If possible, use the same swapmethod for all built-in visual @@ -352,8 +355,10 @@ __glXScreenInit(__GLXscreen * pGlxScreen pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; config->visualID = visual->vid; #ifdef COMPOSITE - if (compIsAlternateVisual(pScreen, visual->vid)) - config->visualSelectGroup++; + if (!noCompositeExtension) { + if (compIsAlternateVisual(pScreen, visual->vid)) + config->visualSelectGroup++; + } #endif } } @@ -375,10 +380,12 @@ __glXScreenInit(__GLXscreen * pGlxScreen */ depth = config->redBits + config->greenBits + config->blueBits; #ifdef COMPOSITE - if (config->duplicatedForComp) { - depth += config->alphaBits; - config->visualSelectGroup++; - } + if (!noCompositeExtension) { + if (config->duplicatedForComp) { + depth += config->alphaBits; + config->visualSelectGroup++; + } + } #endif /* Make sure that our FBconfig's depth can actually be displayed * (corresponds to an existing visual). @@ -403,8 +410,10 @@ __glXScreenInit(__GLXscreen * pGlxScreen continue; #ifdef COMPOSITE - if (config->duplicatedForComp) - (void) CompositeRegisterAlternateVisuals(pScreen, &visual->vid, 1); + if (!noCompositeExtension) { + if (config->duplicatedForComp) + (void) CompositeRegisterAlternateVisuals(pScreen, &visual->vid, 1); + } #endif pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; initGlxVisual(visual, config); ++++++ U_xfree86-Remove-broken-RANDR-disabling-logic-v4.patch ++++++ Git-commit: dd00e5466a0e4ea313d1860824da4123692827ed Author: Adam Jackson <a...@redhat.com> Subject: xfree86: Remove broken RANDR disabling logic (v4) Patch-mainline: Upstream References: bnc#1068961 Signed-off-by: Michal Srb <m...@suse.com> The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) v4: Check whether the RANDR private key is initialized before trying to use it to look up the screen private. Signed-off-by: Adam Jackson <a...@redhat.com> Reviewed-by: Keith Packard <kei...@keithp.com> --- hw/xfree86/common/xf86.h | 2 -- hw/xfree86/common/xf86Config.c | 12 ------------ hw/xfree86/common/xf86Globals.c | 2 -- hw/xfree86/common/xf86Helper.c | 7 ------- hw/xfree86/common/xf86Init.c | 23 +++++++++++++++++------ hw/xfree86/common/xf86Mode.c | 6 +----- hw/xfree86/common/xf86Privstr.h | 2 -- hw/xfree86/modes/xf86Crtc.c | 3 --- 8 files changed, 18 insertions(+), 39 deletions(-) Index: xorg-server-1.19.6/hw/xfree86/common/xf86.h =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86.h +++ xorg-server-1.19.6/hw/xfree86/common/xf86.h @@ -319,8 +319,6 @@ extern _X_EXPORT Bool xf86GetModInDevEnabled(void); extern _X_EXPORT Bool xf86GetAllowMouseOpenFail(void); -extern _X_EXPORT void -xf86DisableRandR(void); extern _X_EXPORT CARD32 xorgGetVersion(void); extern _X_EXPORT CARD32 Index: xorg-server-1.19.6/hw/xfree86/common/xf86Config.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Config.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Config.c @@ -710,7 +710,6 @@ typedef enum { FLAG_XINERAMA, FLAG_LOG, FLAG_RENDER_COLORMAP_MODE, - FLAG_RANDR, FLAG_IGNORE_ABI, FLAG_ALLOW_EMPTY_INPUT, FLAG_USE_DEFAULT_FONT_PATH, @@ -763,8 +762,6 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE}, {FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING, {0}, FALSE}, - {FLAG_RANDR, "RandR", OPTV_BOOLEAN, - {0}, FALSE}, {FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN, @@ -909,15 +906,6 @@ configServerFlags(XF86ConfFlagsPtr flags } } -#ifdef RANDR - xf86Info.disableRandR = FALSE; - xf86Info.randRFrom = X_DEFAULT; - if (xf86GetOptValBool(FlagOptions, FLAG_RANDR, &value)) { - xf86Info.disableRandR = !value; - xf86Info.randRFrom = X_CONFIG; - } -#endif - #ifdef GLXEXT xf86Info.glxVisuals = XF86_GlxVisualsTypical; xf86Info.glxVisualsFrom = X_DEFAULT; Index: xorg-server-1.19.6/hw/xfree86/common/xf86Globals.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Globals.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Globals.c @@ -121,8 +121,6 @@ xf86InfoRec xf86Info = { .pixmap24 = Pix24DontCare, .pix24From = X_DEFAULT, .pmFlag = TRUE, - .disableRandR = FALSE, - .randRFrom = X_DEFAULT, #if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) .forceInputDevices = FALSE, .autoAddDevices = TRUE, Index: xorg-server-1.19.6/hw/xfree86/common/xf86Helper.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Helper.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Helper.c @@ -1572,13 +1572,6 @@ xf86GetAllowMouseOpenFail(void) return xf86Info.allowMouseOpenFail; } -void -xf86DisableRandR(void) -{ - xf86Info.disableRandR = TRUE; - xf86Info.randRFrom = X_PROBED; -} - CARD32 xf86GetModuleVersion(void *module) { Index: xorg-server-1.19.6/hw/xfree86/common/xf86Init.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Init.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Init.c @@ -77,6 +77,7 @@ #include "xf86Xinput.h" #include "xf86InPriv.h" #include "picturestr.h" +#include "randrstr.h" #include "xf86Bus.h" #ifdef XSERVER_LIBPCIACCESS @@ -380,6 +381,16 @@ xf86ScreenInit(ScreenPtr pScreen, int ar return pScrn->ScreenInit (pScreen, argc, argv); } +static void +xf86EnsureRANDR(ScreenPtr pScreen) +{ +#ifdef RANDR + if (!dixPrivateKeyRegistered(rrPrivKey) || + !rrGetScrPriv(pScreen)) + xf86RandRInit(pScreen); +#endif +} + /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. @@ -871,12 +882,12 @@ InitOutput(ScreenInfo * pScreenInfo, int SubPixelHorizontalRGB : SubPixelNone) : SubPixelUnknown); } -#ifdef RANDR - if (!xf86Info.disableRandR) - xf86RandRInit(screenInfo.screens[scr_index]); - xf86Msg(xf86Info.randRFrom, "RandR %s\n", - xf86Info.disableRandR ? "disabled" : "enabled"); -#endif + + /* + * If the driver hasn't set up its own RANDR support, install the + * fallback support. + */ + xf86EnsureRANDR(xf86Screens[i]->pScreen); } for (i = 0; i < xf86NumGPUScreens; i++) Index: xorg-server-1.19.6/hw/xfree86/common/xf86Mode.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Mode.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Mode.c @@ -1664,12 +1664,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, Disp } /* Lookup each mode */ -#ifdef RANDR - if (!xf86Info.disableRandR #ifdef PANORAMIX - && noPanoramiXExtension -#endif - ) + if (noPanoramiXExtension) validateAllDefaultModes = TRUE; #endif Index: xorg-server-1.19.6/hw/xfree86/common/xf86Privstr.h =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Privstr.h +++ xorg-server-1.19.6/hw/xfree86/common/xf86Privstr.h @@ -85,8 +85,6 @@ typedef struct { Pix24Flags pixmap24; MessageType pix24From; Bool pmFlag; - Bool disableRandR; - MessageType randRFrom; MessageType iglxFrom; XF86_GlxVisuals glxVisuals; MessageType glxVisualsFrom; Index: xorg-server-1.19.6/hw/xfree86/modes/xf86Crtc.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/modes/xf86Crtc.c +++ xorg-server-1.19.6/hw/xfree86/modes/xf86Crtc.c @@ -773,9 +773,6 @@ xf86CrtcScreenInit(ScreenPtr screen) int c; /* Rotation */ - xf86DrvMsg(scrn->scrnIndex, X_INFO, - "RandR 1.2 enabled, ignore the following RandR disabled message.\n"); - xf86DisableRandR(); /* Disable old RandR extension support */ xf86RandR12Init(screen); /* support all rotations if every crtc has the shadow alloc funcs */ ++++++ n_add-dummy-xf86DisableRandR.patch ++++++ Subject: Add dummy xf86DisableRandR. Patch-mainline: Never Author: Michal Srb <m...@suse.com> References: bnc#1089601 This is temporary fix for breakage after backporting upstream patch dd00e5466a0e4ea313d1860824da4123692827ed (xorg-server-1.19.0-566-gdd00e5466). The patch removed function xf86DisableRandR. This patch re-adds it as a dummy function that does nothing to fix linking with drivers that expect it. Drivers should no longer call it, so putting it back empty has the same effect. Index: xorg-server-1.19.6/hw/xfree86/common/xf86.h =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86.h +++ xorg-server-1.19.6/hw/xfree86/common/xf86.h @@ -319,6 +319,10 @@ extern _X_EXPORT Bool xf86GetModInDevEnabled(void); extern _X_EXPORT Bool xf86GetAllowMouseOpenFail(void); +// Warning: This function does nothing now. +// See: https://bugzilla.opensuse.org/show_bug.cgi?id=1089601 +extern _X_EXPORT void +xf86DisableRandR(void); extern _X_EXPORT CARD32 xorgGetVersion(void); extern _X_EXPORT CARD32 Index: xorg-server-1.19.6/hw/xfree86/common/xf86Helper.c =================================================================== --- xorg-server-1.19.6.orig/hw/xfree86/common/xf86Helper.c +++ xorg-server-1.19.6/hw/xfree86/common/xf86Helper.c @@ -1572,6 +1572,21 @@ xf86GetAllowMouseOpenFail(void) return xf86Info.allowMouseOpenFail; } +void +xf86DisableRandR(void) +{ + // Do nothing! + + // This function was re-added to fix linking problems with drivers that expect it. + // For example nvidia. See: https://bugzilla.opensuse.org/show_bug.cgi?id=1089601 + + // This function was used to disable RANDR 1.1 if the driver intended to initialize + // RANDR 1.2+ itself. Since patch dd00e5466a0e4ea313d1860824da4123692827ed ("xfree86: + // Remove broken RANDR disabling logic") this is no longer necessary. X server will + // only initialize RANDR 1.1 if no driver initialized any other RANDR. So the result + // is the same even with this function doing nothing. +} + CARD32 xf86GetModuleVersion(void *module) { ++++++ u_randr-Do-not-crash-if-slave-screen-does-not-have-pro.patch ++++++ Patch-mainline: To be upstreamed Author: Michal Srb <m...@suse.com> Subject: randr: Do not crash if slave screen does not have provider. References: bnc#1068961 All GPU screens are attached as unbound GPUs to master, even if they have no capabilities or the provider field is null. Handle that case in RRTellChanged. --- This prevents crash in setups with for example two qxl devices, or fbdev and qxl device. I am not sure if it is a proper fix and not just papering over a bug somewhere else, but there are more places that test whether the provider is set, so maybe it is correct way. I would think that if a slave screen does not have provider, there is no reason for it to become an unbound GPU in master's slave_list. Similarly if master has no provider, then having anything in slave_list is useless. But it seems the AttachUnboundGPU and the rest of the code handling screen to GPU screen attachments does not know about randr's privates, so it can not check whether provider is there. randr/randr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/randr/randr.c b/randr/randr.c index feb54bcc8..661f66da2 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -643,7 +643,9 @@ RRTellChanged(ScreenPtr pScreen) xorg_list_for_each_entry(iter, &master->slave_list, slave_head) { pSlaveScrPriv = rrGetScrPriv(iter); - pSlaveScrPriv->provider->changed = FALSE; + if (pSlaveScrPriv->provider) { + pSlaveScrPriv->provider->changed = FALSE; + } if (iter->is_output_slave) { for (i = 0; i < pSlaveScrPriv->numOutputs; i++) pSlaveScrPriv->outputs[i]->changed = FALSE; -- 2.13.6