[PATCH] xwayland: Activate and enable device on first capability reporting
Commit 2172714c changed behavior of capability handling, but it only solved part of the problem. If Xwayland is launched without a capability (e.g. no pointer device is connected when Xwayland was spinned up), and later that capability comes, the device added will not be automatically initialized. This patch initializes the device when the capability is reported for the first time, thus avoiding the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81819 Signed-off-by: Boyan Ding stu_...@126.com --- hw/xwayland/xwayland-input.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index cc5f7df..12c1bbc 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -496,13 +496,13 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, wl_pointer_add_listener(xwl_seat-wl_pointer, pointer_listener, xwl_seat); -if (xwl_seat-pointer) -EnableDevice(xwl_seat-pointer, TRUE); -else { +if (xwl_seat-pointer == NULL) { xwl_seat_set_cursor(xwl_seat); xwl_seat-pointer = add_device(xwl_seat, xwayland-pointer, xwl_pointer_proc); +ActivateDevice(xwl_seat-pointer, TRUE); } +EnableDevice(xwl_seat-pointer, TRUE); } else if (!(caps WL_SEAT_CAPABILITY_POINTER) xwl_seat-wl_pointer) { wl_pointer_release(xwl_seat-wl_pointer); xwl_seat-wl_pointer = NULL; @@ -516,12 +516,12 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, wl_keyboard_add_listener(xwl_seat-wl_keyboard, keyboard_listener, xwl_seat); -if (xwl_seat-keyboard) -EnableDevice(xwl_seat-keyboard, TRUE); -else { +if (xwl_seat-keyboard == NULL) { xwl_seat-keyboard = add_device(xwl_seat, xwayland-keyboard, xwl_keyboard_proc); +ActivateDevice(xwl_seat-keyboard, TRUE); } +EnableDevice(xwl_seat-keyboard, TRUE); } else if (!(caps WL_SEAT_CAPABILITY_KEYBOARD) xwl_seat-wl_keyboard) { wl_keyboard_release(xwl_seat-wl_keyboard); xwl_seat-wl_keyboard = NULL; -- 2.0.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] Update manpage with the proper location of system.twmrc file
Signed-off-by: Laurent Carlier lordhea...@gmail.com --- man/Makefile.am | 2 ++ man/twm.man | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man/Makefile.am b/man/Makefile.am index 7d45968..f59d5b5 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -33,6 +33,8 @@ CLEANFILES = $(appman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .man +MAN_SUBSTS += -e 's|__datadir__|$(datadir)|g' + # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) $ $@ diff --git a/man/twm.man b/man/twm.man index cc8bc5f..d1dbaa0 100644 --- a/man/twm.man +++ b/man/twm.man @@ -132,7 +132,7 @@ differing visual types. .B $HOME/.twmrc This is the usual name for an individual user's startup file. .TP 8 -.B __projectroot__/lib/X11/twm/system.twmrc +.B __datadir__/X11/twm/system.twmrc If neither of the preceding files are found, \fItwm\fP will look in this file for a default configuration. This is often tailored by the site administrator to -- 2.0.4 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Update manpage with the proper location of system.twmrc file
Am 04.08.2014 16:39, schrieb Laurent Carlier: Signed-off-by: Laurent Carlier lordhea...@gmail.com --- man/Makefile.am | 2 ++ man/twm.man | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man/Makefile.am b/man/Makefile.am index 7d45968..f59d5b5 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -33,6 +33,8 @@ CLEANFILES = $(appman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .man +MAN_SUBSTS +=-e 's|__datadir__|$(datadir)|g' + I never noticed that one can use | as replacement for / in sed. Since the documentation of sed describes /, why | in this case ? re, wh # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) $ $@ diff --git a/man/twm.man b/man/twm.man index cc8bc5f..d1dbaa0 100644 --- a/man/twm.man +++ b/man/twm.man @@ -132,7 +132,7 @@ differing visual types. .B $HOME/.twmrc This is the usual name for an individual user's startup file. .TP 8 -.B __projectroot__/lib/X11/twm/system.twmrc +.B __datadir__/X11/twm/system.twmrc If neither of the preceding files are found, \fItwm\fP will look in this file for a default configuration. This is often tailored by the site administrator to ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Update manpage with the proper location of system.twmrc file
On Mon, Aug 04, 2014 at 04:48:58PM +0200, walter harms wrote: Am 04.08.2014 16:39, schrieb Laurent Carlier: Signed-off-by: Laurent Carlier lordhea...@gmail.com --- man/Makefile.am | 2 ++ man/twm.man | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man/Makefile.am b/man/Makefile.am index 7d45968..f59d5b5 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -33,6 +33,8 @@ CLEANFILES = $(appman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .man +MAN_SUBSTS += -e 's|__datadir__|$(datadir)|g' + I never noticed that one can use | as replacement for / in sed. Since the documentation of sed describes /, why | in this case ? You can use any letter instead of '/'. '|' is often used when replacing paths, since it's not very common in them :) Thomas ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] Update manpage with the proper location of system.twmrc file
On 08/ 4/14 08:36 AM, Thomas Klausner wrote: On Mon, Aug 04, 2014 at 04:48:58PM +0200, walter harms wrote: Am 04.08.2014 16:39, schrieb Laurent Carlier: Signed-off-by: Laurent Carlier lordhea...@gmail.com --- man/Makefile.am | 2 ++ man/twm.man | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/man/Makefile.am b/man/Makefile.am index 7d45968..f59d5b5 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -33,6 +33,8 @@ CLEANFILES = $(appman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .man +MAN_SUBSTS += -e 's|__datadir__|$(datadir)|g' + I never noticed that one can use | as replacement for / in sed. Since the documentation of sed describes /, why | in this case ? You can use any letter instead of '/'. '|' is often used when replacing paths, since it's not very common in them :) Right - since this case is going to expand to a path containing / characters, using | avoids having to find some way to escape the / in $(datadir) when make substitutes it. '|' is used all over the X makefiles for pathname substitutions with sed for this reason, so this fits our style. -- -Alan Coopersmith- alan.coopersm...@oracle.com Oracle Solaris Engineering - http://blogs.oracle.com/alanc ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 03/12] Don't use GetScratchPixmapHeader for shadow pixmaps
Keith Packard kei...@keithp.com writes: Eric Anholt e...@anholt.net writes: This change appears to be unrelated, and possibly harmful (if X has dropped the last ref to the BO, but it's still the scanout buffer, a new allocation would now reuse the BO and scribble on scanout until the next modeset happens). Yeah, it's unrelated. intel_allocate_framebuffer calls disable_reuse, so there's no need to call it from these two other places. I'll split that change out into a separate patch with separate comment. Unrelated whitespace. There are a bunch of whitespace fixups; should I pull those into a separate patch or just leave them scattered in the first patch to change a file? One patch at the front is fine with me. pgpqjvDTUOs5x.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 01/12] Stop trying to out-guess mesa for BO allocation
Keith Packard kei...@keithp.com writes: Eric Anholt e...@anholt.net writes: Keith Packard kei...@keithp.com writes: I don't see anything indicating that this code path is only used by glamor. True. It's a fix for DRI3 for either UXA or none. Mesa allocates a single page for a 1x1 texture, but this code thinks that should take two pages causing a texture-to-pixmap operation to fail. OK, but isn't the problem with the code you're #if 0ing (which, really? #if 0 in a patch being submitted for review?) that it's aligning to 2*height instead of height? pgp8Ngnh1wzPp.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] BellProc: Send bell event on core protocol bell when requested
XKB allows to override the BellProc() ringing the 'keyboard bell': instead an event is sent to an X client which can perform an appropriate action. In most cases this effectively prevents the core protocol bell from ringing: if no BellProc() is set for the device, no attempt is made to ring a bell. This patch ensures that an XKB bell event is sent also when the core protocol bell is rung end thus an appropriate action can be taken by a client. Signed-off-by: Egbert Eich e...@freedesktop.org --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 7f079ff..5d26fae 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2257,7 +2257,7 @@ ProcBell(ClientPtr client) for (dev = inputInfo.devices; dev; dev = dev-next) { if ((dev == keybd || (!IsMaster(dev) GetMaster(dev, MASTER_KEYBOARD) == keybd)) -dev-kbdfeed dev-kbdfeed-BellProc) { +((dev-kbdfeed dev-kbdfeed-BellProc) || dev-xkb_interest)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); if (rc != Success) -- 1.8.4.5 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] xkbcomp: Improved -w option parsing
This patch improves -w option parsing even further, for cases like xkbcomp -w6 4.xkb out.xkb (which were not handled by the fix of #66344). Moreover, though this form can be regarded as ambiguous, the warning level is still optional (set to 0 if not present), and errors like xkbcomp -wfoo in out are detected and reported. Signed-off-by: Vincent Lefevre vinc...@vinc17.net --- xkbcomp.c | 29 +++-- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/xkbcomp.c b/xkbcomp.c index 956e79c..1bb8ab2 100644 --- a/xkbcomp.c +++ b/xkbcomp.c @@ -576,17 +576,33 @@ parseArgs(int argc, char *argv[]) } else if (strncmp(argv[i], -w, 2) == 0) { -if ((i = (argc - 1)) || (!isdigit(argv[i + 1][0]))) +unsigned long utmp; +char *tmp2; +/* If text is just after -w in the same word, then it must + * be a number and it is the warning level. Otherwise, if the + * next argument is a number, then it is the warning level, + * else the warning level is assumed to be 0. + */ +if (argv[i][2] == '\0') { warningLevel = 0; -if (isdigit(argv[i][2])) -if (sscanf(argv[i][2], %i, itmp) == 1) -warningLevel = itmp; +if (i argc - 1) +{ +utmp = strtoul(argv[i+1], tmp2, 10); +if (argv[i+1][0] != '\0' *tmp2 == '\0') +{ +warningLevel = utmp 10 ? 10 : utmp; +i++; +} +} } else { -if (sscanf(argv[++i], %i, itmp) == 1) -warningLevel = itmp; +utmp = strtoul(argv[i][2], tmp2, 10); +if (*tmp2 == '\0') +warningLevel = utmp 10 ? 10 : utmp; +else +goto unknown_flag; } } else if ((strcmp(argv[i], -xkb) == 0) (!xkblist)) @@ -619,6 +635,7 @@ parseArgs(int argc, char *argv[]) } else { + unknown_flag: ERROR1(Unknown flag \%s\ on command line\n, argv[i]); Usage(argc, argv); return False; -- 2.0.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] BellProc: Send bell event on core protocol bell when requested
On Mon, Aug 04, 2014 at 07:16:30PM +0200, Egbert Eich wrote: XKB allows to override the BellProc() ringing the 'keyboard bell': instead an event is sent to an X client which can perform an appropriate action. In most cases this effectively prevents the core protocol bell from ringing: if no BellProc() is set for the device, no attempt is made to ring a bell. This patch ensures that an XKB bell event is sent also when the core protocol bell is rung end thus an appropriate action can be taken by a client. Signed-off-by: Egbert Eich e...@freedesktop.org Acked-by: Peter Hutterer peter.hutte...@who-t.net Keith, can you merge this directly please? Thanks Cheers, Peter --- dix/devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/devices.c b/dix/devices.c index 7f079ff..5d26fae 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -2257,7 +2257,7 @@ ProcBell(ClientPtr client) for (dev = inputInfo.devices; dev; dev = dev-next) { if ((dev == keybd || (!IsMaster(dev) GetMaster(dev, MASTER_KEYBOARD) == keybd)) -dev-kbdfeed dev-kbdfeed-BellProc) { +((dev-kbdfeed dev-kbdfeed-BellProc) || dev-xkb_interest)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); if (rc != Success) -- 1.8.4.5 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 01/12] Stop trying to out-guess mesa for BO allocation
Eric Anholt e...@anholt.net writes: OK, but isn't the problem with the code you're #if 0ing (which, really? #if 0 in a patch being submitted for review?) that it's aligning to 2*height instead of height? I went and did a bit of archaeology to figure out why it's using 2*height instead of just height. The initial change to pixmap allocation, which was then copied to the BO validation logic, was here: commit 736b89504a32239a0c7dfb5961c1b8292dd744bd Author: Chris Wilson ch...@chris-wilson.co.uk Date: Sun Dec 30 10:32:18 2012 + uxa: Align surface allocations to even tile rows Align surface sizes to an even number of tile rows to cater for sampler prefetch. If we read beyond the last page we may catch the PTE in a state of flux and trigger a GPU hang. Also detected by enabling invalid PTE access checking. References: https://bugs.freedesktop.org/show_bug.cgi?id=56916 References: https://bugs.freedesktop.org/show_bug.cgi?id=55984 Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk diff --git a/src/intel_uxa.c b/src/intel_uxa.c index f5ac0a6..2f14173 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -209,7 +209,7 @@ intel_uxa_pixmap_compute_size(PixmapPtr pixmap, tile_height = 8; else tile_height = 32; - aligned_h = ALIGN(h, tile_height); + aligned_h = ALIGN(h, 2*tile_height); *stride = intel_get_fence_pitch(intel, ALIGN(pitch, 512), Look at the referenced bugs, what I found was a long list of random GPU hangs on ILK and SNB hardware that appear to have been caused by a kernel change. Daniel and Chris created a number of scatter shot fixes across the kernel, and this patch to the 2D driver. However, this patch doesn't appear to have actually solved anything; Norbert Preining was still crashing with this patch applied: https://bugs.freedesktop.org/show_bug.cgi?id=55984#c129 Furthermore, SNA has some similar code, but it applies it conditionally for hardware which doesn't have 'relaxed fencing', which is only hardware older than i965 when running on a older kernel that doesn't recognize the HAS_RELAXED_FENCING parameter (the current kernel always returns 'true'). So, as near as I can tell, this fix should never be necessary as the reported bug wasn't fixed by it, and SNA does not apply this rule to any hardware on which either bug was reproduced. If this fix is actually useful, wouldn't we want it in Mesa as well? -- keith.pack...@intel.com pgp4Ev3h5OZTD.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] BellProc: Send bell event on core protocol bell when requested
Peter Hutterer peter.hutte...@who-t.net writes: Acked-by: Peter Hutterer peter.hutte...@who-t.net Keith, can you merge this directly please? Thanks Yup. Merged. e8373e4..e6c8c7e master - master -- keith.pack...@intel.com pgpZantoSPsxR.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel