Hi Ping,

Answers are inserted below...

>> src/2.6.27/wacom_sys.c:
>>  * input_set_abs_params for input_dev_bpt now sends
>>    wacom_wac->features->x_max/y_max for both pen and touch interfaces.
>
> x_max/y_max should be sent by ABS_X/ABS_Y instead of ABS_RX/ABS_RY.
> I don't have time to work or test these tablets.  So, I have to rely
> on your result.
>
> Then we should reassign the x_max/y_max to x_phy/y_phy in
> wacom_parse_hid properly instead of twisting them here.

Agree, I'll change it and resubmit a patch.

>
>>  * added spin_lock_init back in to support spin_locks in the wacom_bpt_irq
>>    interrupt handler.
>
> Is there a reason that we need to call these routines?
>
>
>> src/2.6.27/wacom_wac.c
>>  * added a debug printout of the data from the tablet
>>  * added spin_lock/spin_unlock calls around static data access.
>>    (note: without these major crashes happen when you have your hand
>>     resting on the tablet while using the pen, since both packets are being
>>     sent from the tablet simultaneously in that case).
>
> We need to turn the touch off (i.e., ignore touch data) as soon as a
> pen is in prox.  Touch would only be resumed when pen is out of prox
> and a new touch is in (i.e., the finger is out and back in again if it
> was in prox).  Make sure the stylusInProx and touchInProx are assigned
> the same way as in wacom_tpc_irq.  I think you may have an order issue
> there.
>

Yes.  The wacom driver probes the pen and touch interfaces separately
and creates separate urb's for the Bamboo P&T.  Because of this the
irq handler can occur simultaneously (or close enough) and cause a
crash when accessing the shared static variables in the irq handler.
This happens if the pen is in proximity and your hand is resting on
the tablet.  Not sure why the tpc doesn't do the same?  Without the
spinlocks my x86_64 quad core crashes consistently.

I don't see any way to inhibit the urb for the touch interface from
sending data and thus causing an interrupt?  Did I miss that in the
code somewhere?  The problem is that without a way to stop the tablet
from sending touch data and pen data at the same and causing two
interrupts there is no way to guarantee that both packets won't be
close enough together to cause a problem. Thus the spinlocks on the
shared variables.  If I didn't miss something, maybe the tpc code
needs spinlocks also, or does the tpc hardware inhibit touch packets
when the pen is in proximity?  Also the Bamboo P&T sends a "cleanup"
touch packet (touch signature with all zeros) a few seconds after the
last finger leaves the pad.  This caused the problem a few times as
well.  I will double check the ordering with tpc though.

>>  * change all references of pen length from WACOM_PKGLEN_GRAPHIRE
>>    to WACOM_PKGLEN_BBFUN since the pen packet length is 9 for devices
>>    0xd0-0xd4.
>> src/2.6.27/wacom_wac.h
>>  * added extern reference to bpt_lock spinlock_t variable for use in
>> wacom_sys.c
>> src/xdrv/wcmCommon.c
>>  * reordered the one/two finger touch routines in wcmEvent since the
>>    common->wcmGesture variable was being used to determine if single
>>    finger events should be processed.  This never changes once the tablet has
>>    been initialised and one finger touch never worked.  (This was masked by 
>> the
>>    capacity issue below).
>
> Separating the one finger touch from the 2FGT code will make it easier
> for us to maintain the code.  I'd like to see a new block added just
> to process the one finger touch.

Ok.

>
>>  * common->wcmCapacityDefault was used in some places rather than the
>>    configurable common->wcmCapacity.
>
> wcmCapacityDefault check is to see if Capacity is supported for the
> device or not.. It is decided by the driver which end users can not
> change. So, they should stay in those two places.
>
> wcmCapacity is a variable can be changed by end users.  The set
> wcmCapacityDefault to 3 below should be enough.  You need to update
> wcmCapacity in wcmUSB.c based on the value of wcmCapacityDefault and
> user's input.  Something like:
>
>        common->wcmCapacity = xf86SetBoolOption(local->options,
>                                "Capacity", common->wcmCapacityDefault);
>
>
>> src/xdrv/wcmConfig.c
>>  * added capacity check for tablet_id 0xd0 to 0xd3.  it will set the
>>    common->wcmCapacityDefault = 3 (as stated in comments for it in
>>    xf86WcmAllocate).  This keeps the left click from always being pressed
>>    when a single finger touches the tablet.
>> src/xdrv/wcmUSB.c
>>  * changed a check of common->wcmCapacityDefault to check
>>     common->wcmCapacity instead.
>

Ok, I was a bit confused on this one. I was trying to figure out why a
variable would be configurable by the end user but seemed to never be
used and the non configurable variable was always being checked.  I'll
change it back to original and leave the code for the Bamboo P&T's to
set the default to 3.

Jason

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to