svn commit: trunk/buildroot/package/tslib
Author: ninevoltz
Date: 2008-03-06 10:27:57 -0800 (Thu, 06 Mar 2008) New Revision: 21235
Log:
patches for tslib
Added:
trunk/buildroot/package/tslib/tslib-1.0-absbit.patch trunk/buildroot/package/tslib/tslib-1.0-remove-return-on-error-from-check-df.patch
Changeset:
Added: trunk/buildroot/package/tslib/tslib-1.0-absbit.patch
===================================================================
buildroot/package/tslib/tslib-1.0-absbit.patch +11 -0
@@ -0,0 +1,11 @@ +--- a/plugins/input-raw.c 2008-02-28 14:25:33.000000000 -0500 ++++ b/plugins/input-raw.c 2008-02-28 14:27:25.000000000 -0500 +@@ -49,7 +49,7 @@ static int check_fd(struct tslib_input * + struct tsdev *ts = i->module.dev; + int version; + u_int32_t bit; +- u_int64_t absbit; ++ u_int32_t absbit; + + if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) && + (version == EV_VERSION) &&
Added: trunk/buildroot/package/tslib/tslib-1.0-remove-return-on-error-from-check-df.patch
===================================================================
buildroot/package/tslib/tslib-1.0-remove-return-on-error-from-check-df.patch +11 -0
@@ -0,0 +1,11 @@ +--- a/plugins/input-raw.c 2008-01-25 14:02:23.000000000 +0100 ++++ b/plugins/input-raw.new.c 2008-01-25 14:02:50.000000000 +0100 +@@ -58,8 +58,6 @@ static int check_fd(struct tslib_input * + (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) && + (absbit & (1 << ABS_X)) && + (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) { +- fprintf(stderr, "selected device is not a touchscreen I understand\n"); +- return -1; + } + + if (bit & (1 << EV_SYN))
Quoted 10 lines · ninevoltz at uclibc.org
Author: ninevoltz
Date: 2008-03-06 10:27:57 -0800 (Thu, 06 Mar 2008) New Revision: 21235Log:
patches for tslibAdded:
trunk/buildroot/package/tslib/tslib-1.0-absbit.patchtrunk/buildroot/package/tslib/tslib-1.0-remove-return-on-error-from-check-df.patch
These two patches are actually wrong, I think the tslib error you (I) see is because of big-endian architecture. I will hopefully give it a go next week. As long as I remember it (-:
<cut patches>
Signature · 2 lines
With kind regards, Hans-Christian Egtvedt, Applications Engineer
Quoted 11 lines
Quoted 7 lines
Log:
patches for tslibAdded:
trunk/buildroot/package/tslib/tslib-1.0-absbit.patchtrunk/buildroot/package/tslib/tslib-1.0-remove-return-on-error-from-check-df.patchThese two patches are actually wrong, I think the tslib error you (I) see is because of big-endian architecture. I will hopefully give it a go next week. As long as I remember it (-:
tslib-1.0-remove-return-on-error-from-check-df.patch is definitely wrong
- with this patch applied I get lots of error messages and inspecting the code the patch removes code that is needed.
Not sure about the tslib-1.0-absbit.patch patch. I think it is correct as you only need 16 bits as ABS_MAX is 0x3f
Regards,
Will
Signature · 5 lines
------------------------------------------------------------------------ Will Wagner will_wagner at carallon.com Senior Project Engineer Office Tel: +44 (0)20 7371 2032 Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA ------------------------------------------------------------------------
Quoted 10 lines · Will Wagner
Quoted 9 lines
Quoted 6 lines
Log:
patches for tslibAdded:
trunk/buildroot/package/tslib/tslib-1.0-absbit.patchtrunk/buildroot/package/tslib/tslib-1.0-remove-return-on-error-from-check-df.patchThese two patches are actually wrong, I think the tslib error you (I) see is because of big-endian architecture. I will hopefully give it a go next week. As long as I remember it (-:
Quoted 7 lines
tslib-1.0-remove-return-on-error-from-check-df.patch is definitely wrong
- with this patch applied I get lots of error messages and inspecting the code the patch removes code that is needed.Not sure about the tslib-1.0-absbit.patch patch. I think it is correct as you only need 16 bits as
ABS_MAXis0x3f
Have looked at this again and the tslib-1.0-absbit.patch patch is definitely wrong. ABS_MAX is 0x3f which means that it needs 63 bits. There is a seperate bug with tslib though. The ioctl calls to get bit and absbit are wrong. They pass in the size as sizeof(bit) * 8 but the size should be in bytes and not bits. This means that it things the variables are very large. If absbit is declared as only 32 bits (as in the patch) then because of the size being passed to ioctl wrong that call zeros bits as it is adjacent on the stack. Although the test for EV_ABS has already passed is does mean that using_syn is never set.
I also think there is a performance optimisation that can be made. Currently ts_input_read() checks is sane_fd == 0 and if so calls check_fd(). I believe once the check has succeeded there is no need to call it again for the device (I don't think input device capabilities can change on the fly). The mechanism is already in place to do this, check_fd() just needs to return >0 on success.
Attached is a patch for those two issues.
Will.
Signature · 9 lines
------------------------------------------------------------------------ Will Wagner will_wagner at carallon.com Senior Project Engineer Office Tel: +44 (0)20 7371 2032 Carallon Ltd, Studio G20, Shepherds Building, Rockley Rd, London W14 0DA ------------------------------------------------------------------------ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: tslib-1.0-checkfd_fixes.patch Url: http://busybox.net/lists/buildroot/attachments/20080611/34cf45c2/attachment-0001.txt