[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-penmount: Changes to 'debian-unstable'



 README           |   20 ++++++
 configure.ac     |    2 
 debian/changelog |    6 +
 man/penmount.man |    2 
 src/xf86PM.c     |  182 +++++++++++++++++++++++++++++++++++++++++++++++++++----
 src/xf86PM.h     |    1 
 6 files changed, 199 insertions(+), 14 deletions(-)

New commits:
commit a20637dcbcf1ac7ede21cc16cd09a3e57a252d70
Author: Timo Aaltonen <tjaalton@cc.hut.fi>
Date:   Thu Feb 26 17:59:51 2009 +0200

    Start a new release.

diff --git a/debian/changelog b/debian/changelog
index cc90b78..d919b88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-input-penmount (1:1.4.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@ubuntu.com>  Thu, 26 Feb 2009 17:59:16 +0200
+
 xserver-xorg-input-penmount (1:1.3.0-1) unstable; urgency=low
 
   * New upstream release.

commit 0536f70861f11192820439d36de951ef106d4e5e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 19 16:32:32 2009 +1000

    penmount 1.4.0

diff --git a/configure.ac b/configure.ac
index b245f5f..e32aeea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-input-penmount],
-        1.3.0,
+        1.4.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-input-penmount)
 

commit ae5faa7a024cf63b766b916ef09adf3e66d1a170
Author: mjs <mjs@core7.eu>
Date:   Tue Feb 17 01:48:43 2009 +0100

    Add DMC9512 support #19885
    
    Add new value for the ControllerModel option because we can not auto-detect it (looks like a DMC8910).
    The only relevant difference between the DMC8910 and DMC9512 is the device initialization.
    
    Signed-off-by: mjs <mjs@core7.eu>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/xf86PM.c b/src/xf86PM.c
index 95adb8b..d07e242 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -4,6 +4,9 @@
  * CoAuthor: Mayk Langer <langer@vsys.de>
  * 
  * History:
+ * 02/01/2009: mjs <mjs@core7.eu>
+ * - Added DMC9512 controller protocol support
+ *   based on old code from http://www.salt.com.tw/Download/Driver/PenMount/DMC9512/
  * 09/16/2005: Jaya Kumar <jayakumar.xorg@gmail.com> 
  * - Added DMC9000 controller protocol support
  * - DMC9000 support work was sponsored by CIS(M) Sdn Bhd
@@ -348,6 +351,119 @@ DMC9000_DeviceControl (DeviceIntPtr dev, int mode)
 
 }
 
+static Bool
+DMC9512_ProcessDeviceOn(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
+{
+	unsigned char	buf[5] = { 'D', 'G', 0x02, 0x80, 0x00 };
+
+	XisbBlockDuration (priv->buffer, 500000);
+
+	if ( PenMountSendPacket(priv, buf, 5) != Success )
+	{
+		return !Success;
+	}
+
+	/* wait for right response */
+	priv->lex_mode = PenMount_Response0;
+
+	if (PenMountGetPacket (priv) != Success )
+	{
+		return !Success;
+	}
+
+	if ( ! (priv->packet[0] == 0xff && priv->packet[1] == 0x70) )
+	{
+		return !Success;
+	}
+
+	xf86Msg(X_NOTICE, "%s: DMC9512: found\n", pInfo->name);
+	priv->chip = DMC9512;
+
+	/* disable DMC9512 */
+	buf[2] = 0x0a;
+	buf[3] = 0x00;
+	buf[4] = 0x00;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* set screen width */
+	buf[2] = 0x02;
+	buf[3] = 0x03; /*(priv->screen_width & 0x0fff) >> 8;*/
+	buf[4] = 0xfc; /*priv->screen_width & 0xff;*/
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* set screen height */
+	buf[2] = 0x02;
+	buf[3] = 0x13; /*(priv->screen_height & 0x0fff) >> 8;*/
+	buf[4] = 0xfc; /*priv->screen_height & 0xff;*/
+	buf[3] |= 0x10;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* Set Calibration Data */
+	/* Set X-coordinate of the Left Top corner */
+	buf[2] = 0x02;
+	buf[3] = 0x40;
+	buf[4] = 0x03;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* Set Y-coordinate of the Left Top corner */
+	buf[2] = 0x02;
+	buf[3] = 0x50;
+	buf[4] = 0x03;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* Set X-coordinate of the Right bottom corner */
+	buf[2] = 0x02;
+	buf[3] = 0x60;
+	buf[4] = 0xfc;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* Set Y-coordinate of the Right bottom corner */
+	buf[2] = 0x02;
+	buf[3] = 0x70;
+	buf[4] = 0xfc;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* Set Screen Width Again */
+	buf[2] = 0x02;
+	buf[3] = 0x03;
+	buf[4] = 0xfc;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* Set Screen Height Again */
+	buf[2] = 0x02;
+	buf[3] = 0x13;
+	buf[4] = 0xfc;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	/* enable DMC9512 */
+	buf[2] = 0x0a;
+	buf[3] = 0x01;
+	buf[4] = 0x00;
+	PenMountSendPacket(priv,buf,5);
+	priv->lex_mode = PenMount_Response0;
+	PenMountGetPacket(priv);
+
+	return Success;
+}
+
 static InputInfoPtr
 PenMountPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 {              
@@ -425,6 +541,8 @@ PenMountPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 		priv->chip = DMC9000;
 		pInfo->device_control = DMC9000_DeviceControl;
 		pInfo->read_input = DMC9000_ReadInput;
+	} else if ((s) && (xf86NameCmp (s, "DMC9512") == 0)) {
+		priv->chip = DMC9512;
 	}
 
 	priv->proximity = FALSE;
@@ -486,6 +604,18 @@ DeviceControl (DeviceIntPtr dev, int mode)
 				return (!Success);
 			}
 /*			if (isatty (pInfo->fd))		check if DMC8910 is found */
+
+			if (priv->chip == DMC9512)
+			{
+				if (DMC9512_ProcessDeviceOn(priv,dev,pInfo) != Success)
+				{
+					xf86Msg(X_WARNING, "%s: DMC9512: could not initialize", pInfo->name);
+					return !Success;
+				}
+				// else continue to the code below which does common stuff
+				// between 8910/9512 again
+			}
+			else
 			{
 /* echo Success Code */
 				unsigned char	buf[5] = { 'D', 'G', 0x02, 0x80, 0x00 };
@@ -573,7 +703,7 @@ ReadInput (InputInfoPtr pInfo)
 	XisbBlockDuration (priv->buffer, -1);
 	while (1)
 	{
-		if ( priv->chip != DMC8910 )
+		if ( priv->chip != DMC8910 && priv->chip != DMC9512 )
 		{
 			if ( PenMountGetPacket (priv) != Success)
 				break;
@@ -898,7 +1028,7 @@ PenMountGetPacket (PenMountPrivatePtr priv)
 		switch (priv->lex_mode)
 		{
 		case PenMount_byte0:
-			if ( priv->chip != DMC8910 )
+			if ( priv->chip != DMC8910 && priv->chip != DMC9512 )
 			{
 				if (!(c & 0x08) )
 					return (!Success);
@@ -920,7 +1050,7 @@ PenMountGetPacket (PenMountPrivatePtr priv)
 		case PenMount_byte2:
 			priv->packet[2] = (unsigned char) c;
 			priv->lex_mode = PenMount_byte0;
-			if ( priv->chip != DMC8910 )
+			if ( priv->chip != DMC8910 && priv->chip != DMC9512 )
 				return (Success);
 			if (( priv->packet[2] == 0xfe ) && ( priv->packet[1] == 0xfe ))
 				return (Success);
diff --git a/src/xf86PM.h b/src/xf86PM.h
index 1b6ed0f..d13cbee 100644
--- a/src/xf86PM.h
+++ b/src/xf86PM.h
@@ -74,6 +74,7 @@ PenMountPrivateRec, *PenMountPrivatePtr;
 #define CHIP_UNKNOWN	0
 #define DMC8910			1
 #define DMC9000			2
+#define DMC9512			3
 
 
 /******************************************************************************

commit ec3379232341ea024b6fb2b612733fdb99537c5e
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 30 20:28:40 2009 -0800

    Add README with pointers to mailing list, bugzilla & git repos

diff --git a/README b/README
new file mode 100644
index 0000000..f857884
--- /dev/null
+++ b/README
@@ -0,0 +1,20 @@
+xf86-input-penmount - PenMount 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-penmount
+
+        http://cgit.freedesktop.org/xorg/driver/xf86-input-penmount
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage

commit 0627c2743471791f57fe8b8e96d7df3db676aca9
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Fri Jan 9 16:22:15 2009 -0800

    Remove xorgconfig & xorgcfg from See Also list in man page

diff --git a/man/penmount.man b/man/penmount.man
index 30676ad..17a2e6f 100644
--- a/man/penmount.man
+++ b/man/penmount.man
@@ -33,6 +33,6 @@ section only covers configuration details specific to this driver.
 .PP
 Config details...
 .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...

commit e94c776512adba9398a01406e630271cf912bf21
Author: Arrigo Marchiori <ardovm@yahoo.it>
Date:   Thu Nov 20 09:57:34 2008 +1000

    Fix y axis inversion for axis ranges with a non-zero minimum.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>

diff --git a/src/xf86PM.c b/src/xf86PM.c
index 71edeee..95adb8b 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -716,7 +716,7 @@ DMC9000_ReadInput (InputInfoPtr pInfo)
 		}
 		if (priv->invert_y)
 		{
-			y = priv->max_y - y;
+			y = priv->max_y - y + priv->min_y;
 		}
 		priv->packet[0] = priv->pen_down ? 0x01 : 0x00;
 

commit d112cca181b9fc9586391e83b8c0ff26ca22ff9e
Author: Steve Bian <s@pictorii.com>
Date:   Tue Sep 23 20:43:23 2008 +0930

    Init axes according to configuration.
    
    When reporting mode is TS_Raw since we do no scaling, it will just be the
    values in xorg.conf. If however reporting mode is TS_Scaled however,
    xf86ScaleAxis will return a value between 0 screen_width/screen_height, so we
    must setup the axis accordingly or there will be strange behaviour
    
    Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>

diff --git a/src/xf86PM.c b/src/xf86PM.c
index 954bdc8..71edeee 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -177,6 +177,7 @@ ProcessDeviceInit(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
 {
 	unsigned char map[] =
 	{0, 1};
+	int min_x, min_y, max_x, max_y;
 	/*
 	 * these have to be here instead of in the SetupProc, because when the
 	 * SetupProc is run at server startup, screenInfo is not setup yet
@@ -208,11 +209,33 @@ ProcessDeviceInit(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
 		}
 	else
 		{
-			InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x,
+			/* max_* min_* refer to the max/min values we will emit to the core.
+			 * When reporting mode is TS_Raw since we do no scaling, it will
+			 * just be the values in xorg.conf. If however reporting mode is
+			 * TS_Scaled however, xf86ScaleAxis will return a value between 0
+			 * screen_width/screen_height, so we must setup the axis accordingly
+			 * or there will be strange behaviour
+			 */
+			if ( priv->reporting_mode == TS_Raw )
+				{
+					max_x = priv->max_x;
+					min_x = priv->min_x;
+					max_y = priv->max_y;
+					min_y = priv->min_y;
+				}
+			else
+				{
+					max_x = priv->screen_width;
+					min_x = 0;
+					max_y = priv->screen_height;
+					min_y = 0;
+				}
+
+			InitValuatorAxisStruct (dev, 0, min_x, max_x,
 						9500,
 						0 /* min_res */ ,
 						9500 /* max_res */ );
-			InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y,
+			InitValuatorAxisStruct (dev, 1, min_y, max_y,
 						10500,
 						0 /* min_res */ ,
 						10500 /* max_res */ );

commit 22fca7467a943539b44a520a7b9d827508f01538
Author: Steve Bian <s@pictorii.com>
Date:   Tue Sep 23 20:42:33 2008 +0930

    InvertY should be disabled by default.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>

diff --git a/src/xf86PM.c b/src/xf86PM.c
index b268393..954bdc8 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -389,7 +389,7 @@ PenMountPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 	priv->screen_num = xf86SetIntOption( pInfo->options, "ScreenNumber", 0 );
 	priv->button_number = xf86SetIntOption( pInfo->options, "ButtonNumber", 1 );
 	priv->swap_xy = xf86SetIntOption( pInfo->options, "SwapXY", 0 );
-	priv->invert_y = xf86SetIntOption( pInfo->options, "InvertY", 1 );
+	priv->invert_y = xf86SetIntOption( pInfo->options, "InvertY", 0 );
 	priv->buffer = NULL;
 	s = xf86FindOptionValue (pInfo->options, "ReportingMode");
 	if ((s) && (xf86NameCmp (s, "raw") == 0))

commit 8a9ff94e3db692736f86d52e569f65f6f363b0e0
Author: Arrigo Marchiori <ardovm@yahoo.it>
Date:   Sun Jun 22 18:00:57 2008 +0930

    Fix scaling behaviour if the axes are swapped. #13535
    
    First swapping, then inverting and scaling. I think it's the most
    intuitive solution to the problem, because it makes minX, maxX & co. act on
    the _actual_ X and Y axes, from the user/developer point of view.
    
    Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
    
    X.Org Bug 13535 <http://bugs.freedesktop.org/show_bug.cgi?id=13535>

diff --git a/src/xf86PM.c b/src/xf86PM.c
index 7c65ee3..b268393 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -685,15 +685,15 @@ DMC9000_ReadInput (InputInfoPtr pInfo)
 		}
 		x = ((((unsigned int) (priv->packet[1]&0x07)) << 7)  | (priv->packet[2]&0x7F));
 		y = ((((unsigned int) (priv->packet[3]&0x07)) << 7)  | (priv->packet[4]&0x7F));
-		if (priv->invert_y) 
-		{
-			y = priv->max_y - y;
-		}
 		if ( priv->swap_xy)
 		{
 			tmp = y;
 			y = x;
-			x = tmp;	
+			x = tmp;
+		}
+		if (priv->invert_y)
+		{
+			y = priv->max_y - y;
 		}
 		priv->packet[0] = priv->pen_down ? 0x01 : 0x00;
 

commit 5e1c22ff2c21cd20b204394731e2ad8ce1980091
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Mon May 26 22:19:12 2008 +0930

    Check for XINPUT ABI 3.

diff --git a/src/xf86PM.c b/src/xf86PM.c
index 612b68b..7c65ee3 100644
--- a/src/xf86PM.c
+++ b/src/xf86PM.c
@@ -105,7 +105,9 @@ static const char *reqSymbols[] = {
 	"xf86CollectInputOptions",
 	"xf86ErrorFVerb",
 	"xf86FindOptionValue",
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
 	"xf86GetMotionEvents",
+#endif
 	"xf86GetVerbosity",
 	"xf86MotionHistoryAllocate",
 	"xf86NameCmp",
@@ -195,7 +197,10 @@ ProcessDeviceInit(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo)
 	 * Device reports motions on 2 axes in absolute coordinates.
 	 * Axes min and max values are reported in raw coordinates.
 	 */
-	if (InitValuatorClassDeviceStruct (dev, 2, xf86GetMotionEvents,
+	if (InitValuatorClassDeviceStruct (dev, 2,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3
+					   xf86GetMotionEvents,
+#endif
 					   pInfo->history_size, Absolute) == FALSE)
 		{
 			ErrorF ("Unable to allocate PenMount ValuatorClassDeviceStruct\n");


Reply to: