On Thu, Dec 13, 2012 at 2:16 PM, Ping Cheng <pingli...@gmail.com> wrote:

> We use true MT protocol for MT devices in kernel now. This code
> was introduced to deal with ABS_TOOL_*TAP events loss issue. It
> is uncessary any more. And its existence makes it hard to support
> generic PAD cleanly.
>
>
I can't think of any negative effects removing these will do with protocol
4 and generic devices with MT events using the latest input-wacom drivers.
There is the theoritical issue the code is solving so if its possible to
solve what ever the bug is without deleting this then that would be my
preference.

Since I don't know exact issue your seeing, I can't really comment on if
its a good idea to delete this.

If you do decide to delete this logic then I'd say we official do not
support the *old* 2 finger drivers and so I'd delete the Protocol 4
DOUBLETAP and TRIPLETAP logic in wcmUSB.c and  wcmValidateDevice.c as part
of this patch as well.  Touchpad's using old drivers but without this code
become close to un-usable with all the cursor jumping that occurs.

Chris


Signed-off-by: Ping Cheng <pi...@wacom.com>
> Acked-by: Jason Gerecke <killert...@gmail.com>
> ---
> v2: only patch 2/4 has code change from Jason's comments. To ease the
> review
> and merge effort, I updated all to v2 with acked-by and reviewed-by tags.
> ---
>  src/wcmUSB.c |   34 ++--------------------------------
>  1 file changed, 2 insertions(+), 32 deletions(-)
>
> diff --git a/src/wcmUSB.c b/src/wcmUSB.c
> index e192489..4b5f53b 100644
> --- a/src/wcmUSB.c
> +++ b/src/wcmUSB.c
> @@ -37,7 +37,6 @@ typedef struct {
>         Bool wcmPenTouch;
>         Bool wcmUseMT;
>         int wcmMTChannel;
> -       int wcmPrevChannel;
>         int wcmEventCnt;
>         struct input_event wcmEvents[MAX_USB_EVENTS];
>         int nbuttons;                /* total number of buttons */
> @@ -1601,11 +1600,8 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
>                 return;
>         }
>
> -       /* Protocol 5 devices have some complications related to DUALINPUT
> -        * support and can not use below logic to recover from input
> -        * event filtering.  Instead, just live with occasional dropped
> -        * event.  Since tools are dynamically assigned a channel #, the
> -        * structure must be initialized to known starting values
> +       /* Protocol 5 tools are dynamically assigned with channel numbers.
> +        * The structure must be initialized to known starting values
>          * when first entering proximity to discard invalid data.
>          */
>         if (common->wcmProtocolLevel == WCM_PROTOCOL_5)
> @@ -1614,32 +1610,6 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
>                         memset(&common->wcmChannel[channel],0,
>                                sizeof(WacomChannel));
>         }
> -       else
> -       {
> -               /* Because of linux input filtering, each switch to a new
> -                * tool is required to have its initial values match values
> -                * of previous tool.
> -                *
> -                * For normal case, all tools are in channel 0 and so
> -                * no issue.  Protocol 4 2FGT devices split between
> -                * two channels though and so need to copy data between
> -                * channels to prevent loss of events; which could
> -                * lead to cursor jumps.
> -                *
> -                * PAD device is special.  It shares no events
> -                * with other channels and is always in proximity.
> -                * So it requires no copying of data from other
> -                * channels.
> -                */
> -               if (private->wcmPrevChannel != channel &&
> -                   channel != PAD_CHANNEL &&
> -                   private->wcmPrevChannel != PAD_CHANNEL)
> -               {
> -                       common->wcmChannel[channel].work =
> -
> common->wcmChannel[private->wcmPrevChannel].work;
> -                       private->wcmPrevChannel = channel;
> -               }
> -       }
>
>         ds = &common->wcmChannel[channel].work;
>         dslast = common->wcmChannel[channel].valid.state;
> --
> 1.7.10.4
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to