Re: [PATCH xserver] animcur: Fix crash when removing a master device
On Mon, Apr 23, 2018 at 03:21:14PM -0400, Adam Jackson wrote: > Reproducer: > > $ Xvfb -ac -noreset :1 & > $ DISPLAY=:1 xinput create-master touch1 > $ DISPLAY=:1 xinput remove-master "touch1 pointer" > > Bugzilla: https://bugs.freedesktop.org/105761 > Signed-off-by: Adam JacksonReviewed-by: Peter Hutterer Cheers, Peter > --- > render/animcur.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/render/animcur.c b/render/animcur.c > index 65327df655..ef27bda278 100644 > --- a/render/animcur.c > +++ b/render/animcur.c > @@ -155,7 +155,8 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void > *arg) > static void > AnimCurCancelTimer(DeviceIntPtr pDev) > { > -CursorPtr cur = pDev->spriteInfo->sprite->current; > +CursorPtr cur = pDev->spriteInfo->sprite ? > +pDev->spriteInfo->sprite->current : NULL; > > if (IsAnimCur(cur)) > TimerCancel(GetAnimCur(cur)->timer); > -- > 2.17.0 > > ___ > xorg-devel@lists.x.org: X.Org development > Archives: http://lists.x.org/archives/xorg-devel > Info: https://lists.x.org/mailman/listinfo/xorg-devel > ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] vfb: Fix man page in re depth
On 04/23/18 02:21 PM, Adam Jackson wrote: > 32 is not a valid depth, and the default is now 24 not 8. > > Signed-off-by: Adam Jackson> --- > hw/vfb/man/Xvfb.man | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/hw/vfb/man/Xvfb.man b/hw/vfb/man/Xvfb.man > index 5fd58eb66a..adfeb8a217 100644 > --- a/hw/vfb/man/Xvfb.man > +++ b/hw/vfb/man/Xvfb.man > @@ -55,7 +55,7 @@ manual page, \fIXvfb\fP accepts the following command line > switches: > .B "\-screen \fIscreennum\fP \fIWxHxD\fP" > This option creates screen \fIscreennum\fP and sets its width, height, > and depth to W, H, and D respectively. By default, only screen 0 exists > -and has the dimensions 1280x1024x8. > +and has the dimensions 1280x1024x24. > .TP 4 > .B "\-pixdepths \fIlist-of-depths\fP" > This option specifies a list of pixmap depths that the server should > @@ -100,18 +100,18 @@ snapshot can be done with a file copy command, and the > resulting > snapshot will even contain the cursor image. > .SH EXAMPLES > .TP 8 > -Xvfb :1 -screen 0 1600x1200x32 > +Xvfb :1 -screen 0 1600x1200x24 > The server will listen for connections as server number 1, and screen 0 > -will be depth 32 1600x1200. > +will be depth 24 1600x1200. > .TP 8 > Xvfb :1 -screen 1 1600x1200x16 > The server will listen for connections as server number 1, will have the Should that say "screen 0 will have..." > -default screen configuration (one screen, 1280x1024x8), and screen 1 > +default screen configuration (one screen, 1280x1024x24), and screen 1 > will be depth 16 1600x1200. > .TP 8 > Xvfb -pixdepths 3 27 -fbdir /var/tmp > The server will listen for connections as server number 0, will have the > -default screen configuration (one screen, 1280x1024x8), > +default screen configuration (one screen, 1280x1024x24), > will also support pixmap > depths of 3 and 27, > and will use memory mapped files in /var/tmp for the framebuffer. > Other than the above comment, looks good to me. Reviewed-by: Alan Coopersmith -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - https://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] vfb: Fix man page in re depth
32 is not a valid depth, and the default is now 24 not 8. Signed-off-by: Adam Jackson--- hw/vfb/man/Xvfb.man | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/vfb/man/Xvfb.man b/hw/vfb/man/Xvfb.man index 5fd58eb66a..adfeb8a217 100644 --- a/hw/vfb/man/Xvfb.man +++ b/hw/vfb/man/Xvfb.man @@ -55,7 +55,7 @@ manual page, \fIXvfb\fP accepts the following command line switches: .B "\-screen \fIscreennum\fP \fIWxHxD\fP" This option creates screen \fIscreennum\fP and sets its width, height, and depth to W, H, and D respectively. By default, only screen 0 exists -and has the dimensions 1280x1024x8. +and has the dimensions 1280x1024x24. .TP 4 .B "\-pixdepths \fIlist-of-depths\fP" This option specifies a list of pixmap depths that the server should @@ -100,18 +100,18 @@ snapshot can be done with a file copy command, and the resulting snapshot will even contain the cursor image. .SH EXAMPLES .TP 8 -Xvfb :1 -screen 0 1600x1200x32 +Xvfb :1 -screen 0 1600x1200x24 The server will listen for connections as server number 1, and screen 0 -will be depth 32 1600x1200. +will be depth 24 1600x1200. .TP 8 Xvfb :1 -screen 1 1600x1200x16 The server will listen for connections as server number 1, will have the -default screen configuration (one screen, 1280x1024x8), and screen 1 +default screen configuration (one screen, 1280x1024x24), and screen 1 will be depth 16 1600x1200. .TP 8 Xvfb -pixdepths 3 27 -fbdir /var/tmp The server will listen for connections as server number 0, will have the -default screen configuration (one screen, 1280x1024x8), +default screen configuration (one screen, 1280x1024x24), will also support pixmap depths of 3 and 27, and will use memory mapped files in /var/tmp for the framebuffer. -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver 1/3] xwayland: Decouple GBM from glamor
On Fri, 2018-04-20 at 17:23 -0400, Lyude Paul wrote: > lgtm! for the whole series: > > Reviewed-by: Lyude PaulThanks. I've found at least one interaction between this and the present window flip code (which assumes gbm, but merely checks whether ->glamor is set...). I'll merge this and the fixes for that tomorrow unless I get any additional feedback, and call that RC5 and hopefully that'll be the last one. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 3/4] vnd: Disable GLX if no vendors successfully initialized
Signed-off-by: Adam Jackson--- glx/vndcmds.c | 2 ++ glx/vndext.c| 9 + glx/vndserver.h | 4 +--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/glx/vndcmds.c b/glx/vndcmds.c index c3e1332bf0..493e2bfc04 100644 --- a/glx/vndcmds.c +++ b/glx/vndcmds.c @@ -472,6 +472,8 @@ void GlxDispatchReset(void) int GlxDispatchRequest(ClientPtr client) { REQUEST(xReq); +if (GlxExtensionEntry->base == 0) +return BadRequest; if (stuff->data < OPCODE_ARRAY_LEN) { if (dispatchFuncs[stuff->data] == NULL) { // Try to find a dispatch stub. diff --git a/glx/vndext.c b/glx/vndext.c index cef306a400..d7936467be 100644 --- a/glx/vndext.c +++ b/glx/vndext.c @@ -39,6 +39,7 @@ #include #include "vndservervendor.h" +ExtensionEntry *GlxExtensionEntry; int GlxErrorBase = 0; static CallbackListRec vndInitCallbackList; static CallbackListPtr vndInitCallbackListPtr = @@ -202,6 +203,7 @@ void GlxExtensionInit(void) { ExtensionEntry *extEntry; +GlxExtensionEntry = NULL; // Init private keys, per-screen data if (!dixRegisterPrivateKey(, PRIVATE_SCREEN, 0)) @@ -228,8 +230,15 @@ GlxExtensionInit(void) return; } +GlxExtensionEntry = extEntry; GlxErrorBase = extEntry->errorBase; CallCallbacks(, extEntry); + +/* We'd better have found at least one vendor */ +for (int i = 0; i < screenInfo.numScreens; i++) +if (GlxGetVendorForScreen(serverClient, screenInfo.screens[i])) +return; +extEntry->base = 0; } static int diff --git a/glx/vndserver.h b/glx/vndserver.h index 12297349c4..a175656ae7 100644 --- a/glx/vndserver.h +++ b/glx/vndserver.h @@ -62,9 +62,7 @@ typedef struct GlxClientPrivRec { extern int GlxErrorBase; extern RESTYPE idResource; -// Defined in glxext.c. -const ExtensionEntry *GlxGetExtensionEntry(void); - +extern ExtensionEntry *GlxExtensionEntry; Bool GlxDispatchInit(void); void GlxDispatchReset(void); -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 0/4] GLX non-initialization fixes
This series fixes a case of GLX claiming to be available when it oughtn't. The mechanism for disabling an extension that's already called AddExtension is perhaps a bit gross, but it's better than clients dying. - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 4/4] glx: Require depth > 12 for GLX visuals
fb is happy to do TrueColor to 8bpp drawables, but mesa is not. Depth 12 is the biggest pseudocolor anyone ever really did, and 15 is the least truecolor. Without this Xvfb at depth 8 would "have" GLX, but no vendors would actually back any of the screens. libGL will attempt to call GLXQueryServerString to figure out the GLX version, and vnd will throw an error because there's no vendor to dispatch that to, and then clients crash. Signed-off-by: Adam Jackson--- glx/glxext.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glx/glxext.c b/glx/glxext.c index 46ff19236c..99f8661044 100644 --- a/glx/glxext.c +++ b/glx/glxext.c @@ -289,8 +289,9 @@ checkScreenVisuals(void) for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr screen = screenInfo.screens[i]; for (j = 0; j < screen->numVisuals; j++) { -if (screen->visuals[j].class == TrueColor || -screen->visuals[j].class == DirectColor) +if ((screen->visuals[j].class == TrueColor || + screen->visuals[j].class == DirectColor) && +screen->visuals[j].nplanes > 12) return TRUE; } } -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 2/4] dix: Allow an extension to disable itself
GLX registers an extension before we know if there are any screens that can actually do it. It's inconvenient to shrink the extension list, so instead allow the extension to simply zero out its base opcode to indicate that it needed to panic and disable itself. Signed-off-by: Adam Jackson--- dix/extension.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dix/extension.c b/dix/extension.c index 7d432c7224..9c158ba937 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -215,6 +215,8 @@ ExtensionAvailable(ClientPtr client, ExtensionEntry *ext) { if (XaceHook(XACE_EXT_ACCESS, client, ext) != Success) return FALSE; +if (!ext->base) +return FALSE; return TRUE; } -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver 1/4] dix: Factor out extension availability check
Signed-off-by: Adam Jackson--- dix/extension.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dix/extension.c b/dix/extension.c index b4c1c5f16f..7d432c7224 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -210,6 +210,14 @@ CloseDownExtensions(void) lastError = FirstExtensionError; } +static Bool +ExtensionAvailable(ClientPtr client, ExtensionEntry *ext) +{ +if (XaceHook(XACE_EXT_ACCESS, client, ext) != Success) +return FALSE; +return TRUE; +} + int ProcQueryExtension(ClientPtr client) { @@ -231,7 +239,7 @@ ProcQueryExtension(ClientPtr client) reply.present = xFalse; else { i = FindExtension((char *) [1], stuff->nbytes); -if (i < 0 || XaceHook(XACE_EXT_ACCESS, client, extensions[i])) +if (i < 0 || !ExtensionAvailable(client, extensions[i])) reply.present = xFalse; else { reply.present = xTrue; @@ -266,7 +274,7 @@ ProcListExtensions(ClientPtr client) for (i = 0; i < NumExtensions; i++) { /* call callbacks to find out whether to show extension */ -if (XaceHook(XACE_EXT_ACCESS, client, extensions[i]) != Success) +if (!ExtensionAvailable(client, extensions[i])) continue; total_length += strlen(extensions[i]->name) + 1; @@ -279,7 +287,7 @@ ProcListExtensions(ClientPtr client) for (i = 0; i < NumExtensions; i++) { int len; -if (XaceHook(XACE_EXT_ACCESS, client, extensions[i]) != Success) +if (!ExtensionAvailable(client, extensions[i])) continue; *bufptr++ = len = strlen(extensions[i]->name); -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
[PATCH xserver] animcur: Fix crash when removing a master device
Reproducer: $ Xvfb -ac -noreset :1 & $ DISPLAY=:1 xinput create-master touch1 $ DISPLAY=:1 xinput remove-master "touch1 pointer" Bugzilla: https://bugs.freedesktop.org/105761 Signed-off-by: Adam Jackson--- render/animcur.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/render/animcur.c b/render/animcur.c index 65327df655..ef27bda278 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -155,7 +155,8 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) static void AnimCurCancelTimer(DeviceIntPtr pDev) { -CursorPtr cur = pDev->spriteInfo->sprite->current; +CursorPtr cur = pDev->spriteInfo->sprite ? +pDev->spriteInfo->sprite->current : NULL; if (IsAnimCur(cur)) TimerCancel(GetAnimCur(cur)->timer); -- 2.17.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [ANNOUNCE] xorg-server 1.19.99.904
On Sat, 2018-04-21 at 11:42 +0200, Thomas Klausner wrote: > Thanks! > > We already had a patch for such a problem with pid_t in pkgsrc, and > I've extended it to uint32_t, which fixes the problem for me. > > It's attached. > > Let me know if it can go in like this or what else we can do to fix > this. Merged this, thanks: remote: E: failed to find patch for rev 8275903956d7876519fa55fb805669dc301bf243. remote: I: 0 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver e29d78327..827590395 master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH xserver] modesetting: Only use modifiers on kms drivers which do support them.
On Fri, 2018-04-20 at 15:50 -0400, Louis-Francis Ratté-Boulianne wrote: > Hi, > > It seems to do the right thing, so: > > On Fri, 2018-04-20 at 19:59 +0200, Mario Kleiner wrote: > > > > Fixes: 2f807c2324b4 ("modesetting: Add support for multi-plane > > pixmaps when page-flipping") > > Signed-off-by: Mario Kleiner> > Cc: Daniel Stone > > Reviewed-by: Louis-Francis Ratté-Boulianne Merged, thanks: remote: I: patch #218121 updated using rev e29d783278608544a208f211231a6a3ad2f8fa09. remote: I: 1 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver fe4d1876b..e29d78327 master -> master - ajax ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel