Re: Mini2440: w35i unexactly handling
Hi Juergen,
Juergen Beisert wrote:
> Hi Markus,
>
> Mehlan, Markus wrote:
>> Juergen Beisert wrote:
>>> Mehlan, Markus wrote:
>>>> Juergen Beisert wrote:
>>>>> Mehlan, Markus wrote:
>>>>>> I have got a mini2440 with w35i display.
>>>>>>
>>>>>> BSP-Pengutronix-Mini2440-2011.07.0, linux-2.6.39.3
>>>>>>
>>>>>> The touchscreen handling is very unexact. I point with the stylus
>>>>>> to a button and another button is clicked. The mouse pointer
>>>>>> often jumps on the screen. The touchscreen is calibrated with
>>>>>> ts_calibrate.
>>>>>>
>>>>>> I exchanged the display by a x35-type, changed the bootparameter
>>>>>> "mini2440=5tb" and the display works fine. Then I flashed my
>>>>>> mini2440 with qtopia2.2 and linux-2.6.32 from the original DVD
>>>>>> and the touchscreen works with both types of displays.
>>>>>>
>>>>>> The display driver (drivers/input/touchsreen/s3c2410_ts.c) in the
>>>>>> two kernel versions has got big changes from 2.6.32 to 2.6.39 and
>>>>>> I don't know, where the problem is. The displays n35 and x35 work
>>>>>> perfectly with 2.6.39.
>>>>>
>>>>> In the generic driver was a race I fixed with a patch in the last
>>>>> PBS release. Maybe you should check the touchscreen behaviour
>>>>> again without this patch.
>>>>>
>>>>> The patch is the "fix_ts_race.diff".
>>>>
>>>> I disabled the patch, ptxdist clean kernel && ptxdist go ..., but
>>>> this didn't bring an improvement with the touchscreen handling.
>>>>
>>>> Then I tried the kernel from the distributers DVD (2.6.32.2) and
>>>> the touchscreen handling is fine.
>>>
>>> What exactly means "fine"? Only the position is detected in a
>>> predictable manner? If you move your finger or stylus fast from the
>>> left to the right, does the pointer follows in the same speed?
>>
>> If I use the stylus, then the pointer follows in the same speed.
>> I cannot operate eaxcatly the touch with a finger (except my name is
>> Gimli).
>>
>>>> Now a nother point attracted my attention. I point with the stylus
>>>> on the screen of a x35-Display (2.6.39.3) and the mouse pointer
>>>> moves heavily some pixels around the point of contact.
>>>
>>> I did a look to the ADC values here with my touchscreen. The ADC
>>> values are always jumping around by +/- 1 for the same stylus
>>> position. I guess there is no solution for it. The ADC is using a
>>> 3.3 V reference source and provides a 10 bit resolution. So, we are
>>> talking about 3 mV per ADV value.
>>> All you can do is to improve the filtering: One way is to do more
>>> than one conversion per report. The driver provides this by changing
>>> the ".oversampling_shift" value in the "struct s3c2410_ts_mach_info"
>>> (you can find it in "arch/arm/mach-s3c2440/mach-mini2440.c" in our
>>> kernel). A value of "1" for example will do two successive
>>> conversions and reports the average to the userland. Maybe you could
>>> try with values of 1...4, if it change the behaviour significantly.
>>
>> I changed .oversampling_shift to 4 and the touchscreen handling is
>> slightly better. The mouse pointer don't moves around the point of
>> contact, but often it jumps to a different point on the screen.
>> For example: I'm editing a spin box control by touching the arrow
>> controls and suddenly the pointer jumps to a different control.
>
> Seems we need some kind of pressure measurement. To better sort out
> bad samples.
>
>>>> This behaviour is not recognizable with the old kernel.
>>>
>>> I do not know the old kernel. I have started with 2.6.38 and the
>>> mainline Linux kernel.
>>>
>>>> But I have some other problems with the old kernel:
>>>> - ttySAC* were not created automatically
>>>
>>> You mean "not created in dev/" (=userland) or "not registered by the
>>> kernel"?
>>
>> I have to correct my statement: The devices have been created, but
>> the
>> names have changed from /dev/ttySAC[0..2] to
>> /dev/s3c2410_serial[0..2], why? After creating a link or mknod the
>> console works.
>
> This was a bug up to 2.6.37. Since 2.6.38 it's fixed.
>
>>>> - no support for WLAN-Device ath9k_htc
>>>
>>> If you stick to your old kernel you could backport this driver to
>>> the
>>> 2.6.38 (last resort).
>>>
>>>> The available kernel source is not identically with the kernel
>>>> image.
>>>
>>> That is a really bad news. And it's also the reason why *we* only
>>> provide sources to our users and PTXdist to ensure to build them in
>>> a correct manner.
>>
>> I don't stick on the old kernel and want to use the kernel from
>> ptxdist, but at this time the touchscreen part of the kernel from the
>> FriendlyArm site works better.
>
> Do they work with tslib or do they use a different approach? Maybe
> they are using a different filter setup in tslib.
>
They work with tslib, too (see attachment).
I have just swapped the kernel from 2.6.39 to
"FriendlyArm" 2.6.32 and QWS_MOUSE_PROTO to
"Tslib:/dev/input/event0 MouseMan:/dev/input/mice"
and the touchscreen works fine for me.
I use the rootfs created by ptxdist.
> Regards,
> Juergen
Regards,
Markus
Sitz der Gesellschaft: Oberhausen
Handelsregister Amtsgericht Duisburg HRB-Nr. 17168 UST ID-Nr. DE 814009849
Geschäftsführer: Manfred A. Wagner und Dr. Uwe Baader