As part of porting -10 changes to xdrv to xf86-input-wacom, I've ran into a piece of logic that I do not think should be ported as-is. I'm looking for opinions on best fix and/or help fixing the logic.
The logic that should be removed is in linuxwacom xdrv's xf86WcmMatchDevice(). If you look for tablet_id, inside there you'll see some work around logic to fix some values that are mis-set. It duplicates some logic that exists in usbWcmGetRanges(). The reason that work around logic exists is because there are two basic issues with current usbWcmGetRanges()'s and one issue extend to ISDV4 as well (and Serial for xdrv). 1) model->GetRanges() is not called until device is opened which means after return from first xf86WcmInit(). With current code that means we discard any user overrides for values it sets since we process those in xf86WcmInit(). Trace MaxX as an example. Possible fixes: * Somehow call model->GetRanges() inside xf86WcmInit() before we parse config options. * Init these values queried from hardware with special value like -1 and then when opening device make sure to set HW based values for any special value (-1). This is to allow user override. * Don't let user override these values any more. I prefer the second option. 2) Its possible that incorrect DEVICE_TYPE logic will be executed. A specific DEVICE is only opened 1 time. In cases were a DEVICE has multiple TYPES (such as pen+eraser or touch+pad), this means GetRanges() will only be called for 1 of those shared types. The order of opening devices isn't fixed because user can re-order things using xorg.conf and HAL complicates things as well. To see issue, look at wcmUSBGetRanges() and see what happens if pad gets loaded before touch. In this case, the IsTouch() logic will never be executed. Possible fixes: * Change references to "if (IsTouch(priv))" to "if (isTouch(priv) || isPad(priv)", at least in bamboo cases, so it knows this is for Touch path. I do not fully understand this logic and maybe a better way to solve this. Also, I do not know what groups of TYPE can exist for single DEVICE for other wacom products beyond Bamboo P&T's. Looking for help here. Chris ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
