[Bug 90299] New: Xorg crashes when running xscreensaver-demo (during preview of certain screensavers)
https://bugs.freedesktop.org/show_bug.cgi?id=90299 Bug ID: 90299 Summary: Xorg crashes when running xscreensaver-demo (during preview of certain screensavers) Product: xorg Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/Radeon Assignee: xorg-driver-ati@lists.x.org Reporter: for...@gmail.com QA Contact: xorg-t...@lists.x.org Created attachment 115530 -- https://bugs.freedesktop.org/attachment.cgi?id=115530action=edit Actual log of a crash Overview: Bug occur if to try to preview some of screensavers provided by xscreensaver (by simply clicking to it). I can't really understand where the difference between 'failing' and 'normal' savers. But they are the same every time. Two that produces crash is 'Halo' and 'Polyominoes'. Steps to reproduce: 1. Open xscreensaver-demo 2. Click to 'Halo' or 'Polyominoes' screensaver. 3. Observe a result Actual Results: Xorg crashes. Log is following: [ 51564.136] (EE) [ 51564.136] (EE) Backtrace: [ 51564.137] (EE) 0: /usr/lib/xorg-server/Xorg (OsLookupColor+0x119) [0x594a29] [ 51564.137] (EE) 1: /usr/lib/libc.so.6 (__restore_rt+0x0) [0x7fbe78f1b53f] [ 51564.138] (EE) 2: /usr/lib/xorg/modules/libfb.so (fbBltOne+0x508) [0x7fbe6df62968] [ 51564.138] (EE) 3: /usr/lib/xorg/modules/libfb.so (fbPutXYImage+0x23f) [0x7fbe6df6683f] [ 51564.138] (EE) 4: /usr/lib/xorg/modules/libfb.so (fbPutImage+0xf2) [0x7fbe6df66b52] [ 51564.139] (EE) 5: /usr/lib/xorg/modules/libglamoregl.so (glamor_glyphs_nf+0x6fd) [0x7fbe7370a35d] [ 51564.139] (EE) 6: /usr/lib/xorg-server/Xorg (DamageRegionAppend+0x34c3) [0x51f863] [ 51564.139] (EE) 7: /usr/lib/xorg-server/Xorg (SendGraphicsExpose+0xead) [0x43636d] [ 51564.139] (EE) 8: /usr/lib/xorg-server/Xorg (SendErrorToClient+0x2f7) [0x438a97] [ 51564.139] (EE) 9: /usr/lib/xorg-server/Xorg (remove_fs_handlers+0x41b) [0x43cbcb] [ 51564.140] (EE) 10: /usr/lib/libc.so.6 (__libc_start_main+0xf0) [0x7fbe78f08800] [ 51564.140] (EE) 11: /usr/lib/xorg-server/Xorg (_start+0x29) [0x427039] [ 51564.141] (EE) 12: ? (?+0x29) [0x29] [ 51564.141] (EE) [ 51564.141] (EE) Segmentation fault at address 0x1ab55c [ 51564.141] (EE) Fatal server error: [ 51564.141] (EE) Caught signal 11 (Segmentation fault). Server aborting [ 51564.141] (EE) [ 51564.141] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. [ 51564.141] (EE) Please also check the log file at /var/log/Xorg.0.log for additional information. [ 51564.141] (EE) [ 51564.141] (II) AIGLX: Suspending AIGLX clients for VT switch [ 51564.182] (EE) Server terminated with error (1). Closing log file. -- You are receiving this mail because: You are the assignee for the bug. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http://lists.x.org/mailman/listinfo/xorg-driver-ati
[Bug 90299] Xorg crashes when running xscreensaver-demo (during preview of certain screensavers)
https://bugs.freedesktop.org/show_bug.cgi?id=90299 Max for...@gmail.com changed: What|Removed |Added CC||for...@gmail.com --- Comment #1 from Max for...@gmail.com --- Created attachment 115531 -- https://bugs.freedesktop.org/attachment.cgi?id=115531action=edit lspci -vv -- You are receiving this mail because: You are the assignee for the bug. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http://lists.x.org/mailman/listinfo/xorg-driver-ati
[Bug 90299] Xorg crashes when running xscreensaver-demo (during preview of certain screensavers)
https://bugs.freedesktop.org/show_bug.cgi?id=90299 --- Comment #2 from Max for...@gmail.com --- I'm running ArchLinux: $ uname -a Linux Shakuras 4.0.1-1-ARCH #1 SMP PREEMPT Wed Apr 29 12:00:26 CEST 2015 x86_64 GNU/Linux $ pacman -Qi xorg-server | grep Version Version: 1.17.1-5 And using radeon opensource drivers and Awesome WM. List of installed xorg drivers: $ pacman -Qs xorg-drivers local/xf86-input-evdev 2.9.2-1 (xorg-drivers xorg) X.org evdev input driver local/xf86-input-keyboard 1.8.1-1 (xorg-drivers xorg) X.Org keyboard input driver local/xf86-input-mouse 1.9.1-1 (xorg-drivers xorg) X.org mouse input driver local/xf86-input-synaptics 1.8.2-2 (xorg-drivers xorg) Synaptics driver for notebook touchpads local/xf86-video-ati 1:7.5.0-2 (xorg-drivers xorg) X.org ati video driver local/xf86-video-dummy 0.3.7-4 (xorg-drivers xorg) X.org dummy video driver local/xf86-video-vesa 2.3.2-6 (xorg-drivers xorg) X.org vesa video driver -- You are receiving this mail because: You are the assignee for the bug. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http://lists.x.org/mailman/listinfo/xorg-driver-ati
[Bug 90299] Xorg crashes when running xscreensaver-demo (during preview of certain screensavers)
https://bugs.freedesktop.org/show_bug.cgi?id=90299 --- Comment #4 from Max for...@gmail.com --- Xorg configuration files: $ ls /etc/X11/xorg.conf.d/ 10-evdev.conf 10-quirks.conf 20-radeon.conf 50-synaptics.conf -- You are receiving this mail because: You are the assignee for the bug. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http://lists.x.org/mailman/listinfo/xorg-driver-ati
[Bug 90299] Xorg crashes when running xscreensaver-demo (during preview of certain screensavers)
https://bugs.freedesktop.org/show_bug.cgi?id=90299 --- Comment #5 from Max for...@gmail.com --- Created attachment 115534 -- https://bugs.freedesktop.org/attachment.cgi?id=115534action=edit Radeon xorg confguration -- You are receiving this mail because: You are the assignee for the bug. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http://lists.x.org/mailman/listinfo/xorg-driver-ati
[Bug 90299] Xorg crashes when running xscreensaver-demo (during preview of certain screensavers)
https://bugs.freedesktop.org/show_bug.cgi?id=90299 Max for...@gmail.com changed: What|Removed |Added Keywords||have-backtrace -- You are receiving this mail because: You are the assignee for the bug. ___ xorg-driver-ati mailing list xorg-driver-ati@lists.x.org http://lists.x.org/mailman/listinfo/xorg-driver-ati
Re: [PATCH 5/5] modesetting: Implement page flipping support for Present.
On 04/28/2015 06:31 AM, Kenneth Graunke wrote: On Tuesday, April 21, 2015 05:58:44 PM Kenneth Graunke wrote: Based on code by Keith Packard, Eric Anholt, and Jason Ekstrand. v2: - Fix double free and flip_count underrun (caught by Mario Kleiner). - Don't leak flip_vblank_event on the error_out path (Mario). - Use the updated ms_flush_drm_events API (Mario, Ken). v3: Hack around DPMS shenanigans. If all monitors are DPMS off, then there is no active framebuffer; attempting to pageflip will hit the error_undo paths, causing us to drmModeRmFB with no framebuffer, which confuses the kernel into doing full modesets and generally breaks things. To avoid this, make ms_present_check_flip check that some CRTCs are enabled and DPMS on. This is an ugly hack that would get better with atomic modesetting, or some core Present work. v4: - Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand). - Make pageflipping optional (Option PageFlip in xorg.conf.d), but enabled by default. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Upon further testing, there are still nasty DPMS bugs affecting this patch. We no longer crash the X server, but clients appear to occasionally get stuck. I guess we just need to bite the bullet and unflip on DPMS off. Or switch to atomic modesetting... I retested v4 + the attached patch with some small improvements applied. The patch adds async page flip cap support, fixes that missing zero init which Michel also reported and fixes some small inconsistency in the ms_present_unflip routine. Everything worked nicely, except for the not quite resolved DPMS off bug. No more crashes, but page-flipped clients reliably hang after DPMS off - on. KDE with composition on and page flipping on (Setting Tearing prevention set to Full scene repaints) hangs after each off-on cycle, my own fullscreen app hangs reliably as well if page-flipped swaps are used. Looking at stack traces it seems to me as if somehow after a dpms off/on, a present_event_notify() somehow doesn't get delivered to the server / gets lost somewhere, so clients like mine which wait for swap completion or vblank events hang, and KDE hangs in Mesa when Mesa tries to get a new backbuffer for rendering, runs out of buffers and then waits infinitely for a present notify event from the server in order to reuse one of its busy buffers. -mario From 3d1e2383d7bcd35cf0838f32f26b82b8118a17d5 Mon Sep 17 00:00:00 2001 From: Mario Kleiner mario.kleiner...@gmail.com Date: Fri, 1 May 2015 09:01:41 +0200 Subject: [PATCH 8/8] modesetting: Add async flip support, fix small bugs. Detect if kms driver is async flip capable. Add missing zero init for number of crtc's on counting. Fix small inconsistency. Signed-off-by: Mario Kleiner mario.kleiner...@gmail.com --- hw/xfree86/drivers/modesetting/present.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c index 0ec0f40..693d4f3 100644 --- a/hw/xfree86/drivers/modesetting/present.c +++ b/hw/xfree86/drivers/modesetting/present.c @@ -504,7 +504,7 @@ ms_present_check_flip(RRCrtcPtr crtc, ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); -int num_crtcs_on; +int num_crtcs_on = 0; int i; if (!ms-drmmode.pageflip) @@ -579,7 +579,7 @@ ms_present_unflip(ScreenPtr screen, uint64_t event_id) PixmapPtr pixmap = screen-GetScreenPixmap(screen); Bool ret; -if (!ms_present_check_flip(NULL, screen-root, pixmap, FALSE)) +if (!ms_present_check_flip(NULL, screen-root, pixmap, TRUE)) return; ret = ms_do_pageflip(screen, pixmap, -1, FALSE, event_id); @@ -609,5 +609,14 @@ static present_screen_info_rec ms_present_screen_info = { Bool ms_present_screen_init(ScreenPtr screen) { +ScrnInfoPtr scrn = xf86ScreenToScrn(screen); +modesettingPtr ms = modesettingPTR(scrn); +uint64_t value; +int ret; + +ret = drmGetCap(ms-fd, DRM_CAP_ASYNC_PAGE_FLIP, value); +if (ret == 0 value == 1) +ms_present_screen_info.capabilities |= PresentCapabilityAsync; + return present_screen_init(screen, ms_present_screen_info); } -- 1.9.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] modesetting: Fix software cursor fallback
On Fri, May 1, 2015 at 11:43 AM, Adel Gadllah adel.gadl...@gmail.com wrote: The code in drmmode_set_cursor does not properly handle the case where drmModeSetCursor2 returns any other error than EINVAL and silently fails to set a cursor. So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable the cursor2 usage on EINVAL. Might not hurt to add something to the commit msg about falling through to drmModeSetCursor() path (which does properly handle -ENXIO and other non-EINVAL errors properly) since you can't easily see that from the diffstat.. either way, Reviewed-by: Rob Clark robdcl...@gmail.com References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725 Signed-off-by: Adel Gadllah adel.gadl...@gmail.com --- hw/xfree86/drivers/modesetting/drmmode_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 824500b..912abda 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -396,10 +396,10 @@ drmmode_set_cursor(xf86CrtcPtr crtc) drmModeSetCursor2(drmmode-fd, drmmode_crtc-mode_crtc-crtc_id, handle, ms-cursor_width, ms-cursor_height, cursor-bits-xhot, cursor-bits-yhot); +if (!ret) +return; if (ret == -EINVAL) use_set_cursor2 = FALSE; -else -return; } ret = drmModeSetCursor(drmmode-fd, drmmode_crtc-mode_crtc-crtc_id, handle, -- 2.1.0 ___ 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 ___ 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 RESEND libpciaccess] linux_sysfs.c: Include limits.h for PATH_MAX
On 05/ 1/15 10:54 PM, Felix Janda wrote: Alan Coopersmith wrote: On 05/ 1/15 07:36 AM, Felix Janda wrote: Fixes compilation with musl libc. Tested-by: Bernd Kuhls bernd.ku...@t-online.de Signed-off-by: Felix Janda felix.ja...@posteo.de --- src/linux_sysfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c index 8fca65e..1c8d3e3 100644 --- a/src/linux_sysfs.c +++ b/src/linux_sysfs.c @@ -41,6 +41,7 @@ #include sys/types.h #include sys/stat.h #include fcntl.h +#include limits.h #include sys/mman.h #include dirent.h #include errno.h Reviewed-by: Alan Coopersmith alan.coopersm...@oracle.com Thanks! Did you need this pushed to git master for you or do you have someone with commit access to do that? No, I don't have someone with commit access and would be grateful if it could be push for me. Done: To ssh://git.freedesktop.org/git/xorg/lib/libpciaccess 765e0a3..6bd2f7f master - master -- -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
[PATCH 1/2] dix: Add unaccelerated valuators to the ValuatorMask
Allows a mask to carry both accelerated and unaccelerated motion at the same time. This is required for xf86-input-libinput where the pointer acceleration happens in libinput already, but parts of the server, specifically raw events and DGA rely on device-specific unaccelerated data. To ease integration add this as a second set to the ValuatorMask rather than extending all APIs to carry a second, possibly NULL set of valuators. Note that a valuator mask should only be used in either accel/unaccel or standard mode at any time. Switching requires either a valuator_mask_zero() call or unsetting all valuators one-by-one. Trying to mix the two will produce a warning. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- dix/inpututils.c | 75 +++--- hw/xfree86/common/xf86Module.h | 2 +- include/input.h| 14 include/inpututils.h | 2 ++ 4 files changed, 87 insertions(+), 6 deletions(-) diff --git a/dix/inpututils.c b/dix/inpututils.c index 5c2a32d..c5869ab 100644 --- a/dix/inpututils.c +++ b/dix/inpututils.c @@ -505,11 +505,8 @@ valuator_mask_isset(const ValuatorMask *mask, int valuator) return mask-last_bit = valuator BitIsOn(mask-mask, valuator); } -/** - * Set the valuator to the given floating-point data. - */ -void -valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) +static inline void +_valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) { mask-last_bit = max(valuator, mask-last_bit); SetBit(mask-mask, valuator); @@ -517,6 +514,17 @@ valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) } /** + * Set the valuator to the given floating-point data. + */ +void +valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) +{ +BUG_WARN_MSG(mask-has_unacel, + Do not mix valuator types, zero mask first\n); +_valuator_mask_set_double(mask, valuator, data); +} + +/** * Set the valuator to the given integer data. */ void @@ -594,11 +602,15 @@ valuator_mask_unset(ValuatorMask *mask, int valuator) ClearBit(mask-mask, valuator); mask-valuators[valuator] = 0.0; +mask-unaccelerated[valuator] = 0.0; for (i = 0; i = mask-last_bit; i++) if (valuator_mask_isset(mask, i)) lastbit = max(lastbit, i); mask-last_bit = lastbit; + +if (mask-last_bit == -1) +mask-has_unacel = FALSE; } } @@ -611,6 +623,59 @@ valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src) valuator_mask_zero(dest); } +Bool +valuator_mask_has_accelerated(const ValuatorMask *mask) +{ +return mask-has_unacel; +} + +/** + * Set both accelerated and unaccelerated value for this mask. + */ +void +valuator_mask_set_accelerated(ValuatorMask *mask, + int valuator, + double accel, + double unaccel) +{ +BUG_WARN_MSG(mask-last_bit != -1 !mask-has_unacel, + Do not mix valuator types, zero mask first\n); +_valuator_mask_set_double(mask, valuator, accel); +mask-has_unacel = TRUE; +mask-unaccelerated[valuator] = unaccel; +} + +double +valuator_mask_get_accelerated(const ValuatorMask *mask, + int valuator) +{ +return valuator_mask_get_double(mask, valuator); +} + +double +valuator_mask_get_unaccelerated(const ValuatorMask *mask, +int valuator) +{ +return mask-unaccelerated[valuator]; +} + +Bool +valuator_mask_fetch_accelerated(const ValuatorMask *mask, +int valuator, +double *accel, +double *unaccel) +{ +if (valuator_mask_isset(mask, valuator)) { +if (accel) +*accel = valuator_mask_get_accelerated(mask, valuator); +if (unaccel) +*unaccel = valuator_mask_get_unaccelerated(mask, valuator); +return TRUE; +} +else +return FALSE; +} + int CountBits(const uint8_t * mask, int len) { diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 25a8869..66c2bb5 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -81,7 +81,7 @@ typedef enum { */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(19, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(22, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(22, 1) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(9, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) diff --git a/include/input.h b/include/input.h index 00a9cbd..480cbd0 100644 --- a/include/input.h +++ b/include/input.h @@ -673,6 +673,20 @@ extern _X_EXPORT Bool valuator_mask_fetch(const ValuatorMask *mask, extern _X_EXPORT Bool valuator_mask_fetch_double(const
[PATCH 2/2] dix: hook up the unaccelerated valuator masks
If present, access the unaccelerated valuator mask values for DGA and XI2 raw events. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- dix/getevents.c| 25 ++--- hw/xfree86/common/xf86Xinput.c | 4 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index d0a87f7..9a94b8f 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -208,14 +208,25 @@ init_raw(DeviceIntPtr dev, RawDeviceEvent *event, Time ms, int type, int detail) } static void -set_raw_valuators(RawDeviceEvent *event, ValuatorMask *mask, double *data) +set_raw_valuators(RawDeviceEvent *event, ValuatorMask *mask, + BOOL use_unaccel, double *data) { int i; +use_unaccel = use_unaccel valuator_mask_has_accelerated(mask); + for (i = 0; i valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) { +double v; + SetBit(event-valuators.mask, i); -data[i] = valuator_mask_get_double(mask, i); + +if (use_unaccel) +v = valuator_mask_get_unaccelerated(mask, i); +else +v = valuator_mask_get_double(mask, i); + +data[i] = v; } } } @@ -1388,7 +1399,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, num_events++; init_raw(pDev, raw, ms, type, buttons); -set_raw_valuators(raw, mask, raw-valuators.data_raw); +set_raw_valuators(raw, mask, TRUE, raw-valuators.data_raw); } /* valuators are in driver-native format (rel or abs) */ @@ -1403,7 +1414,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, transformAbsolute(pDev, mask); clipAbsolute(pDev, mask); if ((flags POINTER_NORAW) == 0 raw) -set_raw_valuators(raw, mask, raw-valuators.data); +set_raw_valuators(raw, mask, FALSE, raw-valuators.data); } else { transformRelative(pDev, mask); @@ -1411,7 +1422,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, if (flags POINTER_ACCELERATE) accelPointer(pDev, mask, ms); if ((flags POINTER_NORAW) == 0 raw) -set_raw_valuators(raw, mask, raw-valuators.data); +set_raw_valuators(raw, mask, FALSE, raw-valuators.data); moveRelative(pDev, flags, mask); } @@ -1916,7 +1927,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid, events++; num_events++; init_raw(dev, raw, ms, type, client_id); -set_raw_valuators(raw, mask, raw-valuators.data_raw); +set_raw_valuators(raw, mask, TRUE, raw-valuators.data_raw); } event = events-device_event; @@ -1978,7 +1989,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid, screeny = dev-spriteInfo-sprite-hotPhys.y; } if (need_rawevent) -set_raw_valuators(raw, mask, raw-valuators.data); +set_raw_valuators(raw, mask, FALSE, raw-valuators.data); /* Indirect device touch coordinates are not used for cursor positioning. * They are merely informational, and are provided in device coordinates. diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 9fa3dc4..2fe85dd 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -1137,12 +1137,16 @@ xf86CheckMotionEvent4DGA(DeviceIntPtr device, int is_absolute, dx = valuator_mask_get(mask, 0); if (is_absolute) dx -= device-last.valuators[0]; +else if (valuator_mask_has_accelerated(mask)) +dx = valuator_mask_get_unaccelerated(mask, 0); } if (valuator_mask_isset(mask, 1)) { dy = valuator_mask_get(mask, 1); if (is_absolute) dy -= device-last.valuators[1]; +else if (valuator_mask_has_accelerated(mask)) +dy = valuator_mask_get_unaccelerated(mask, 1); } if (DGAStealMotionEvent(device, idx, dx, dy)) -- 2.3.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 xf86-input-libinput] Use the new unaccelerated valuator ValuatorMask features
SDL Games like openarena rely on relative input that's handled by the DGA code in the server. That code casts the driver's input data to int and sends it to the client. libinput does pointer acceleration for us, so sending any deltas of less than 1 (likely for slow movements) ends up being 0. Use the new ValuatorMask accelerated/unaccelerated values to pass the unaccelerated values along, the server can then decide what to do with it. Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- src/libinput.c | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/libinput.c b/src/libinput.c index c7ab18c..110af78 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -47,6 +47,12 @@ #define XI86_SERVER_FD 0x20 #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) * 1000 + GET_ABI_MINOR(ABI_XINPUT_VERSION) 22000 +#define HAVE_VMASK_UNACCEL 1 +#else +#undef HAVE_VMASK_UNACCEL +#endif + #define TOUCHPAD_NUM_AXES 4 /* x, y, hscroll, vscroll */ #define TOUCH_MAX_SLOTS 15 #define XORG_KEYCODE_OFFSET 8 @@ -84,6 +90,7 @@ struct xf86libinput { } scale; ValuatorMask *valuators; + ValuatorMask *valuators_unaccelerated; struct options { BOOL tapping; @@ -693,9 +700,21 @@ xf86libinput_handle_motion(InputInfoPtr pInfo, struct libinput_event_pointer *ev y = libinput_event_pointer_get_dy(event); valuator_mask_zero(mask); + +#if HAVE_VMASK_UNACCEL + { + double ux, uy; + + ux = libinput_event_pointer_get_dx_unaccelerated(event); + uy = libinput_event_pointer_get_dy_unaccelerated(event); + + valuator_mask_set_accelerated(mask, 0, x, ux); + valuator_mask_set_accelerated(mask, 1, y, uy); + } +#else valuator_mask_set_double(mask, 0, x); valuator_mask_set_double(mask, 1, y); - +#endif xf86PostMotionEventM(dev, Relative, mask); } @@ -1349,6 +1368,10 @@ xf86libinput_pre_init(InputDriverPtr drv, if (!driver_data-valuators) goto fail; + driver_data-valuators_unaccelerated = valuator_mask_new(2); + if (!driver_data-valuators_unaccelerated) + goto fail; + driver_data-scroll_vdist = 15; driver_data-scroll_hdist = 15; @@ -1420,6 +1443,8 @@ fail: fd_pop(driver_context, pInfo-fd); if (driver_data-valuators) valuator_mask_free(driver_data-valuators); + if (driver_data-valuators_unaccelerated) + valuator_mask_free(driver_data-valuators_unaccelerated); free(path); free(driver_data); return BadValue; -- 2.3.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
[ANNOUNCE] xf86-video-mach64 6.9.5
Adam Jackson (3): preinit: Don't bother explicitly loading int10, vbe will do it for us Bump minimum xserver to 1.4 mach64 6.9.5 Alan Coopersmith (2): Remove unused atidecoder.c atidecoder.h Remove unused atiaudio.c ATIAudioNames declaration Connor Behan (1): Drop dependence on xf86PciInfo.h Dave Airlie (1): mach64: fix build probably not required with pci access anyways Matthieu Herrb (1): Deal with pPict-pDrawable == NULL for source-only pictures. git tag: xf86-video-mach64-6.9.5 http://xorg.freedesktop.org/archive/individual/driver/xf86-video-mach64-6.9.5.tar.bz2 MD5: 1013ccc86052d0e82c4d504e0c4e896e xf86-video-mach64-6.9.5.tar.bz2 SHA1: 0ba2d51752a62808286937cf3c6a95794fa5cb29 xf86-video-mach64-6.9.5.tar.bz2 SHA256: 3e98985b6e044189efd42342862208f472881c25debf22230a1d54a96d71b41f xf86-video-mach64-6.9.5.tar.bz2 http://xorg.freedesktop.org/archive/individual/driver/xf86-video-mach64-6.9.5.tar.gz MD5: 4864011b2ec48849aaea78c05536eedb xf86-video-mach64-6.9.5.tar.gz SHA1: 5fe451f4f26aecc765f4237cca5e578dd0e9387d xf86-video-mach64-6.9.5.tar.gz SHA256: 38672f863f4a08c20f30c248555e12dca38fc25793af5214b9e229e6c4fa460d xf86-video-mach64-6.9.5.tar.gz - ajax ___ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s
[PATCH] config: remove 10-evdev.conf, let the evdev driver install that file
Now that we have two likely drivers that fight for control over the input devices (evdev and libinput) let's move the respective driver assignment to each package. So you get what you install. https://bugs.freedesktop.org/show_bug.cgi?id=89023 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- config/10-evdev.conf | 40 config/Makefile.am | 4 ++-- 2 files changed, 2 insertions(+), 42 deletions(-) delete mode 100644 config/10-evdev.conf diff --git a/config/10-evdev.conf b/config/10-evdev.conf deleted file mode 100644 index cc83ab2..000 --- a/config/10-evdev.conf +++ /dev/null @@ -1,40 +0,0 @@ -# -# Catch-all evdev loader for udev-based systems -# We don't simply match on any device since that also adds accelerometers -# and other devices that we don't really want to use. The list below -# matches everything but joysticks. - -Section InputClass -Identifier evdev pointer catchall -MatchIsPointer on -MatchDevicePath /dev/input/event* -Driver evdev -EndSection - -Section InputClass -Identifier evdev keyboard catchall -MatchIsKeyboard on -MatchDevicePath /dev/input/event* -Driver evdev -EndSection - -Section InputClass -Identifier evdev touchpad catchall -MatchIsTouchpad on -MatchDevicePath /dev/input/event* -Driver evdev -EndSection - -Section InputClass -Identifier evdev tablet catchall -MatchIsTablet on -MatchDevicePath /dev/input/event* -Driver evdev -EndSection - -Section InputClass -Identifier evdev touchscreen catchall -MatchIsTouchscreen on -MatchDevicePath /dev/input/event* -Driver evdev -EndSection diff --git a/config/Makefile.am b/config/Makefile.am index 0e20e8b..51aae47 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -18,7 +18,7 @@ libconfig_la_LIBADD += $(UDEV_LIBS) if XORG xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) -xorgconfd_DATA = 10-evdev.conf 10-quirks.conf +xorgconfd_DATA = 10-quirks.conf endif else @@ -38,4 +38,4 @@ endif # !CONFIG_HAL endif # !CONFIG_UDEV -EXTRA_DIST = x11-input.fdi 10-evdev.conf fdi2iclass.py 10-quirks.conf +EXTRA_DIST = x11-input.fdi fdi2iclass.py 10-quirks.conf -- 2.3.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 evdev] Add the default evdev config
This used to be part of the server but now that we have two drivers doing the same thing (libinput, evdev) shift the configuration defaults to the driver. This way you get what you install. https://bugs.freedesktop.org/show_bug.cgi?id=89023 Signed-off-by: Peter Hutterer peter.hutte...@who-t.net --- 10-evdev.conf | 40 Makefile.am | 1 + configure.ac | 7 +++ 3 files changed, 48 insertions(+) create mode 100644 10-evdev.conf diff --git a/10-evdev.conf b/10-evdev.conf new file mode 100644 index 000..cc83ab2 --- /dev/null +++ b/10-evdev.conf @@ -0,0 +1,40 @@ +# +# Catch-all evdev loader for udev-based systems +# We don't simply match on any device since that also adds accelerometers +# and other devices that we don't really want to use. The list below +# matches everything but joysticks. + +Section InputClass +Identifier evdev pointer catchall +MatchIsPointer on +MatchDevicePath /dev/input/event* +Driver evdev +EndSection + +Section InputClass +Identifier evdev keyboard catchall +MatchIsKeyboard on +MatchDevicePath /dev/input/event* +Driver evdev +EndSection + +Section InputClass +Identifier evdev touchpad catchall +MatchIsTouchpad on +MatchDevicePath /dev/input/event* +Driver evdev +EndSection + +Section InputClass +Identifier evdev tablet catchall +MatchIsTablet on +MatchDevicePath /dev/input/event* +Driver evdev +EndSection + +Section InputClass +Identifier evdev touchscreen catchall +MatchIsTouchscreen on +MatchDevicePath /dev/input/event* +Driver evdev +EndSection diff --git a/Makefile.am b/Makefile.am index 00c7940..1cc3ea6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,6 +28,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-evdev.pc +dist_xorgconf_DATA = 10-evdev.conf .PHONY: ChangeLog INSTALL diff --git a/configure.ac b/configure.ac index e0d480a..f6fd2e4 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,13 @@ AC_ARG_WITH(xorg-module-dir, inputdir=${moduledir}/input AC_SUBST(inputdir) +AC_ARG_WITH(xorg-conf-dir, +AC_HELP_STRING([--with-xorg-conf-dir=DIR], + [Default xorg.conf.d directory [[default=$prefix/share/X11/xorg.conf.d/]]]), +[xorgconfdir=$withval], +[xorgconfdir=$prefix/share/X11/xorg.conf.d]) +AC_SUBST(xorgconfdir) + # X Server SDK location is required to install evdev header files # This location is also relayed in the xorg-evdev.pc file sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` -- 2.3.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