.gitignore | 3 ++ Makefile.am | 3 -- README | 20 +++++++++++++++++ configure.ac | 33 +++++++--------------------- man/elographics.man | 2 - src/Makefile.am | 2 + src/xf86Elo.c | 61 +++++++++++++++++++++++++++++----------------------- 7 files changed, 71 insertions(+), 53 deletions(-)
New commits: commit ac5366d6e1f26e6ceef3d062ab7df301d623cf54 Author: Peter Hutterer <[email protected]> Date: Fri Dec 18 08:42:26 2009 +1000 Added support for GeneralTouch serial touchscreens. Signed-off-by: Ivan Afonichev <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index dbe1747..4077b22 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -907,8 +907,7 @@ xf86EloControl(DeviceIntPtr dev, xf86EloPrintIdent(reply, priv); } else { - ErrorF("Unable to ask Elographics touchscreen identification\n"); - goto not_success; + DBG(2, ErrorF("Unable to ask Elographics touchscreen identification... Maybe it's GeneralTouch touchscreen...\n")); } /* @@ -920,8 +919,7 @@ xf86EloControl(DeviceIntPtr dev, req[3] = ELO_TOUCH_MODE | ELO_STREAM_MODE | ELO_UNTOUCH_MODE; req[4] = ELO_TRACKING_MODE; if (xf86EloSendControl(req, local->fd) != Success) { - ErrorF("Unable to change Elographics touchscreen operating mode\n"); - goto not_success; + DBG(2, ErrorF("Unable to change Elographics touchscreen operating mode... Maybe it's GeneralTouch touchscreen...\n")); } /* @@ -932,12 +930,7 @@ xf86EloControl(DeviceIntPtr dev, req[2] = priv->untouch_delay; req[3] = priv->report_delay; if (xf86EloSendControl(req, local->fd) != Success) { - ErrorF("Unable to change Elographics touchscreen reports timings\n"); - -not_success: - SYSCALL(close(local->fd)); - local->fd = -1; - return !Success; + DBG(2, ErrorF("Unable to change Elographics touchscreen reports timings... Maybe it's GeneralTouch touchscreen...\n")); } } xf86AddEnabledDevice(local); commit b9531248d1b5d00b2ba941f576fc160ea5e1444b Author: Michael Smith <[email protected]> Date: Tue Dec 15 15:01:29 2009 -0500 xf86EloReadInput(): fix xserver unresponsiveness during touch The fix for bug #14109 ensures all bytes are emptied from the OS buffer by looping until xf86WaitForInput returns 0. This patch just changes the timeout from 1 millisecond to 0: we don't want the X server to block if there's no more serial data. It also removes the Vmin and Vtime options, which were making the calls to read() block until a complete 10-byte packet buffer could be filled. At 9600 bps, this could pause the X server for up to 9 ms. The code can already handle partial buffers, so all we have to do is get rid of the Vmin. Also, if xf86EloGetPacket() returns !Success, we should continue rather than break so the xf86WaitForInput call can decide whether to exit, in case there's more data in the buffer. Before the fix, glxgears was giving me about 390 FPS normally and down to 140 FPS when dragging an empty area of the touchscreen. Now it's basically unchanged when the touchscreen is in use (390 -> 385 FPS). X.Org Bug 14109 <https://bugs.freedesktop.org/show_bug.cgi?id=14109> Signed-off-by: Michael Smith <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index ad88621..dbe1747 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -421,15 +421,17 @@ xf86EloReadInput(LocalDevicePtr local) #endif DBG(4, ErrorF("Entering ReadInput\n")); + /* - * Try to get a packet. + * Read bytes until there's no data left. We may have more or less than + * one packet worth of data in the OS buffer. */ - while (xf86WaitForInput(local->fd, ELO_MAX_WAIT/100) > 0) { + do { if(xf86EloGetPacket(priv->packet_buf, &priv->packet_buf_p, &priv->checksum, local->fd) != Success) - break; + continue; /* * Process only ELO_TOUCHs here. @@ -488,6 +490,7 @@ xf86EloReadInput(LocalDevicePtr local) (state == ELO_PRESS) ? "Press" : ((state == ELO_RELEASE) ? "Release" : "Stream"))); } } + while (xf86WaitForInput(local->fd, 0) > 0); /* don't wait, just check */ } @@ -1059,8 +1062,6 @@ static const char *default_options[] = { "StopBits", "1", "DataBits", "8", "Parity", "None", - "Vmin", "10", - "Vtime", "1", "FlowControl", "None", NULL }; commit 60927fee86100e803f438036daeb94ba0b8e5db7 Author: Peter Hutterer <[email protected]> Date: Fri Nov 20 09:12:22 2009 +1000 Remove unused bits from configure.ac Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index ee0e0a6..d1b776c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,24 +45,6 @@ XORG_CWARNFLAGS AH_TOP([#include "xorg-server.h"]) -#AC_DEFINE(XFree86LOADER,1,[Stub define for loadable drivers]) -# -#AC_ARG_ENABLE(XINPUT, AS_HELP_STRING([--enable-xinput], -# [Build XInput support (default: yes)]), -# [XINPUT=$enableval],[XINPUT=yes]) -#AM_CONDITIONAL(XINPUT, test "x$XINPUT" = "xyes") -#if test "x$XINPUT" = "xyes" ; then -# AC_DEFINE(XINPUT,1,[Enable XInput support]) -#fi -# -#AC_ARG_ENABLE(XKB, AS_HELP_STRING([--enable-xkb], -# [Build XKB support (default: yes)]), -# [XKB=$enableval],[XKB=yes]) -#AM_CONDITIONAL(XKB, test "x$XKB" = "xyes") -#if test "x$XKB" = "xyes" ; then -# AC_DEFINE(XKB,1,[Enable XKB support]) -#fi - AC_ARG_WITH(xorg-module-dir, AC_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), commit 36d6b8efe232cc20afb74799f013c03cbb79a68b Author: Peter Hutterer <[email protected]> Date: Tue Aug 18 15:36:07 2009 +1000 Reset local->private to NULL to avoid double-frees. (#23239) X.Org Bug 23239 <http://bugs.freedesktop.org/show_bug.cgi?id=23239> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 495a43c..ad88621 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -1050,7 +1050,7 @@ xf86EloUninit(InputDriverPtr drv, xfree(priv->input_dev); xfree(priv); - + local->private = NULL; xf86DeleteInput(local, 0); } commit a18af14b1df5271fbe3100df3fcb3a8811981ddf Author: Peter Hutterer <[email protected]> Date: Fri Jul 17 14:44:55 2009 +1000 Cope with XINPUT ABI 7. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 4ca60f1..495a43c 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -780,6 +780,10 @@ xf86EloControl(DeviceIntPtr dev, unsigned char map[] = { 0, 1 }; unsigned char req[ELO_PACKET_SIZE]; unsigned char reply[ELO_PACKET_SIZE]; +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + Atom btn_label; + Atom axis_labels[2] = { 0, 0 }; +#endif switch(mode) { @@ -797,7 +801,11 @@ xf86EloControl(DeviceIntPtr dev, /* * Device reports button press for up to 1 button. */ - if (InitButtonClassDeviceStruct(dev, 1, map) == FALSE) { + if (InitButtonClassDeviceStruct(dev, 1, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + &btn_label, +#endif + map) == FALSE) { ErrorF("Unable to allocate Elographics touchscreen ButtonClassDeviceStruct\n"); return !Success; } @@ -818,6 +826,9 @@ xf86EloControl(DeviceIntPtr dev, * screen to fit one meter. */ if (InitValuatorClassDeviceStruct(dev, 2, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axis_labels, +#endif #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 xf86GetMotionEvents, #endif @@ -827,11 +838,19 @@ xf86EloControl(DeviceIntPtr dev, } else { /* I will map coordinates myself */ - InitValuatorAxisStruct(dev, 0, -1, -1, + InitValuatorAxisStruct(dev, 0, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axis_labels[0], +#endif + -1, -1, 9500, 0 /* min_res */, 9500 /* max_res */); - InitValuatorAxisStruct(dev, 1, -1, -1, + InitValuatorAxisStruct(dev, 1, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 + axis_labels[1], +#endif + -1, -1, 10500, 0 /* min_res */, 10500 /* max_res */); commit c97c9f470636e6caf4374a6930e5fe380f58b8bb Author: Paulo Cesar Pereira de Andrade <[email protected]> Date: Mon Feb 2 19:06:55 2009 -0200 Janitor: make distcheck, .gitignore. diff --git a/.gitignore b/.gitignore index 2df4a8d..eb2be95 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,6 @@ ltmain.sh missing stamp-h1 *~ +xf86-input-elographics-*.tar.* +ChangeLog +tags diff --git a/Makefile.am b/Makefile.am index 36867bd..183adde 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,8 +28,7 @@ MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || \ - (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog diff --git a/configure.ac b/configure.ac index 4801a9c..ee0e0a6 100644 --- a/configure.ac +++ b/configure.ac @@ -32,15 +32,16 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE -DRIVER_NAME=elographics -AC_SUBST([DRIVER_NAME]) - +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include "xorg-server.h"]) @@ -77,16 +78,18 @@ XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" # Checks for libraries. # Checks for header files. AC_HEADER_STDC +DRIVER_NAME=elographics +AC_SUBST([DRIVER_NAME]) + XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index c1d44bf..cfc8bb2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,8 @@ # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. +AM_CFLAGS = $(XORG_CFLAGS) + @driver_n...@_drv_la_ltlibraries = @driver_n...@_drv.la @driver_n...@_drv_la_ldflags = -module -avoid-version @driver_n...@_drv_ladir = @inputdir@ commit 8230f8bb1f51adc038451fc124394ac72279b5ff Author: Alan Coopersmith <[email protected]> Date: Fri Jan 30 20:18:17 2009 -0800 Add README with pointers to mailing list, bugzilla & git repos diff --git a/README b/README new file mode 100644 index 0000000..279c320 --- /dev/null +++ b/README @@ -0,0 +1,20 @@ +xf86-input-elographics - Elographics input driver for the Xorg X server + +Please submit bugs & patches to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/driver/xf86-input-elographics + + http://cgit.freedesktop.org/xorg/driver/xf86-input-elographics + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage commit e98045e8101b13720690352b757cdcc3bc806b02 Author: Matthieu Herrb <[email protected]> Date: Thu Jan 29 17:19:42 2009 +0100 Fix InputDriverRec allocation and freeing. This caused X server to access free()'d memory on exit path. Thanks to msys.ch for providing a test machine. diff --git a/src/xf86Elo.c b/src/xf86Elo.c index 1620e44..4ca60f1 100644 --- a/src/xf86Elo.c +++ b/src/xf86Elo.c @@ -970,7 +970,7 @@ not_success: *************************************************************************** */ static LocalDevicePtr -xf86EloAllocate(InputDriverPtr drv) +xf86EloAllocate(InputDriverPtr drv, IDevPtr dev) { LocalDevicePtr local; EloPrivatePtr priv; @@ -1002,7 +1002,7 @@ xf86EloAllocate(InputDriverPtr drv) priv->packet_buf_p = 0; priv->swap_axes = 0; - local->name = XI_TOUCHSCREEN; + local->name = xstrdup(dev->identifier); local->flags = 0 /* XI86_NO_OPEN_ON_INIT */; local->device_control = xf86EloControl; local->read_input = xf86EloReadInput; @@ -1029,12 +1029,8 @@ xf86EloUninit(InputDriverPtr drv, { EloPrivatePtr priv = (EloPrivatePtr) local->private; - xf86EloControl(local->dev, DEVICE_OFF); - xfree(priv->input_dev); xfree(priv); - xfree(local->name); - xfree(local); xf86DeleteInput(local, 0); } @@ -1064,7 +1060,7 @@ xf86EloInit(InputDriverPtr drv, Model* model; - local = xf86EloAllocate(drv); + local = xf86EloAllocate(drv, dev); if (!local) { return NULL; } commit 6f3ca866c821b8fa49e2278cc1538352a95bb2a9 Author: Alan Coopersmith <[email protected]> Date: Fri Jan 9 16:12:34 2009 -0800 Remove xorgconfig & xorgcfg from See Also list in man page diff --git a/man/elographics.man b/man/elographics.man index 3a3e84e..7ce590a 100644 --- a/man/elographics.man +++ b/man/elographics.man @@ -75,7 +75,7 @@ Delay between report packets. Default: 1 (10ms). .BI "Option \*qModel\*q \*q" string \*q The touchscreen model. Default: unset. Supported models: "Sunit dSeries". .SH "SEE ALSO" -__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__). +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__). .SH AUTHORS Authors include: Patrick Lecoanet -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

