Mehlan, Markus | 28 Jul 10:54

Mini2440: w35i unexactly handling

Hi,
 
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.
 
Best 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
Juergen Beisert | 28 Jul 19:43
Picon
Gravatar

Re: Mini2440: w35i unexactly handling

Hi Markus,

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".

Regards,
Juergen

--

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Mehlan, Markus | 29 Jul 12:15

Re: Mini2440: w35i unexactly handling

Hi Juergen,

Juergen Beisert wrote:
> Hi Markus,
>
> 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. 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.
This behaviour is not recognizable with the old kernel.

But I have some other problems with the old kernel:
- ttySAC* were not created automatically
- no support for WLAN-Device ath9k_htc
The available kernel source is not identically with the kernel image.

>
> Regards,
> Juergen

Best 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
Juergen Beisert | 29 Jul 22:36
Picon
Gravatar

Re: Mini2440: w35i unexactly handling

Hi Markus,

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?

> 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.

> 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"?

> - 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.

Regards,
Juergen

--

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Mehlan, Markus | 1 Aug 11:04

Re: Mini2440: w35i unexactly handling

Hi, Juergen,

Juergen Beisert wrote:
> Hi Markus,
>
> 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.

>> 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.

>> - 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.

> 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
Juergen Beisert | 1 Aug 11:27
Picon
Gravatar

Re: Mini2440: w35i unexactly handling

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.

Regards,
Juergen

--

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Mehlan, Markus | 1 Aug 13:48

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
Attachment (qt4): application/octet-stream, 829 bytes
Attachment (ts.conf): application/octet-stream, 103 bytes
Mehlan, Markus | 4 Aug 09:09

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.
>
> Regards,
> Juergen

I can send you the kernel-sources (80MB), if you want it.
The original DVD iso is found at http://www.arm9.net/download.asp (mini2440-20110421.iso),
but very very slow internet connection: 10KB/sec.

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
Juergen Beisert | 4 Aug 09:25
Picon
Gravatar

Re: Mini2440: w35i unexactly handling

Mehlan, Markus wrote:
> 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.
> >
> > Regards,
> > Juergen
>
> I can send you the kernel-sources (80MB), if you want it.

An easier way would be:

untar both version (vanilla kernel and friendlyArm kernel) side by side and
create a diff with:

diff -wBbNru <vanilla-kernel-directory> <friendlyArm-kernel-directory> > thats_the_difference.diff

And send me the result.

Regards
Juergen

--

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Mehlan, Markus | 4 Aug 09:41

Re: Mini2440: w35i unexactly handling

Hi Juergen,

Juergen Beisert wrote:
>> I can send you the kernel-sources (80MB), if you want it.
>
> An easier way would be:
>
> untar both version (vanilla kernel and friendlyArm kernel) side by
> side and create a diff with:
>
> diff -wBbNru <vanilla-kernel-directory>
> <friendlyArm-kernel-directory> > thats_the_difference.diff
>
> And send me the result.
>
> Regards
> Juergen

I made two patches:
linux-2.6.32 -> linux-2.6.32.2-FriendlyArm
linux-2.6.32.2 -> linux-2.6.32.2-FriendlyArm

Friendly 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
Attachment (friendlyarm_diff.tar.gz): application/x-gzip, 531 KiB
Markus Mehlan | 5 Aug 15:16

Re: Mini2440: w35i unexactly handling

Juergen Beisert <jbe@...> writes:

> > >>>> 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.

Now I have found a big fault in my QT start script:

MINI2440_TOUCHEVENT=/dev/input/event1
export QWS_MOUSE_PROTO="Tslib:${MINI2440_TOUCHEVENT} MouseMan:/dev/input/mice"

I changed "mice" to "mouse1" and the effect of moving around the point
of contact has disappeared. I also set the value of ".oversampling_shift"
to 4. After this the handling of the touch screen is much better, but not
perfect. But the handling of the mini2440 with x35 display is still better
than with w35i.

How can I difference in the userspace, which display is connected?
I have to use different values for QWS_SIZE, QWS_DISPLAY.

Should I read /proc/cmdline and parse the parameter mini2440?

I have another question, but I don't know if this is the right forum.

The usb-mouse (/dev/input/mouse1 ) is only recognized by the QT 
application, when the mouse is connected before the app has started. 
If I disconnect the mouse during the app runs, and after that connect 
the mouse again, it will not be recognized by the app. The keyboard is 
not a problem (/dev/tty1).

> 
> Regards
> Juergen
> 

Regards,
Markus

Juergen Beisert | 5 Aug 15:49
Picon
Gravatar

Re: Mini2440: w35i unexactly handling

Hi Markus,

Markus Mehlan wrote:
> Juergen Beisert <jbe@...> writes:
> > > >>>> 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.
>
> Now I have found a big fault in my QT start script:
>
> MINI2440_TOUCHEVENT=/dev/input/event1
> export QWS_MOUSE_PROTO="Tslib:${MINI2440_TOUCHEVENT}
> MouseMan:/dev/input/mice"
>
> I changed "mice" to "mouse1" and the effect of moving around the point
> of contact has disappeared.

Hmm, so Qt gets every event twice: One from the "/dev/input/event1" and one 
from the "/dev/input/mice" which emulates the touchscreen events to a mouse 
movement event.

> I also set the value of ".oversampling_shift" 
> to 4. After this the handling of the touch screen is much better, but not
> perfect. But the handling of the mini2440 with x35 display is still better
> than with w35i.

BTW: What LCD displays are used on these display units? Is the "ACX502BMU" 
from Sony the correct one for the X35? And what LCD display comes with the 
W35i display unit? Are there any markers on the display units to help future 
users to identify them?

> How can I difference in the userspace, which display is connected?
> I have to use different values for QWS_SIZE, QWS_DISPLAY.
>
> Should I read /proc/cmdline and parse the parameter mini2440?

I thinks this would be the easiest way.

> [...]

Regards
Juergen

--

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Mehlan, Markus | 8 Aug 09:27

Re: Mini2440: w35i unexactly handling

Hi Juergen,

Juergen Beisert wrote:
> Hi Markus,
>
> Markus Mehlan wrote:
>> Juergen Beisert <jbe@...> writes:
>>>>>>>> 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.
>>
>> Now I have found a big fault in my QT start script:
>>
>> MINI2440_TOUCHEVENT=/dev/input/event1
>> export QWS_MOUSE_PROTO="Tslib:${MINI2440_TOUCHEVENT}
>> MouseMan:/dev/input/mice"
>>
>> I changed "mice" to "mouse1" and the effect of moving around the
>> point of contact has disappeared.
>
> Hmm, so Qt gets every event twice: One from the "/dev/input/event1"
> and one from the "/dev/input/mice" which emulates the touchscreen
> events to a mouse movement event.
>
>> I also set the value of ".oversampling_shift"
>> to 4. After this the handling of the touch screen is much better, but
>> not perfect. But the handling of the mini2440 with x35 display is
>> still better than with w35i.
>
> BTW: What LCD displays are used on these display units? Is the
> "ACX502BMU"
> from Sony the correct one for the X35? And what LCD display comes
> with the W35i display unit? Are there any markers on the display
> units to help future users to identify them?
>
I have got three different 3.5in displays:
w35i    LQ035Q1DG06
x35     ACX502BMU
t35     TD035STED4

>> How can I difference in the userspace, which display is connected?
>> I have to use different values for QWS_SIZE, QWS_DISPLAY.
>>
>> Should I read /proc/cmdline and parse the parameter mini2440?
>
> I thinks this would be the easiest way.
>
>> [...]
>
> 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
Icarus Alive | 8 Aug 11:58
Picon

Re: Mini2440: w35i unexactly handling

Has this kernel patch come to your notice, and/or is already included ?

http://comments.gmane.org/gmane.linux.kernel/1154467

On Mon, Aug 8, 2011 at 12:57 PM, Mehlan, Markus
<markus.mehlan@...> wrote:
> Hi Juergen,
>
> Juergen Beisert wrote:
>> Hi Markus,
>>
>> Markus Mehlan wrote:
>>> Juergen Beisert <jbe@...> writes:
>>>>>>>>> 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.
>>>
>>> Now I have found a big fault in my QT start script:
>>>
>>> MINI2440_TOUCHEVENT=/dev/input/event1
>>> export QWS_MOUSE_PROTO="Tslib:${MINI2440_TOUCHEVENT}
>>> MouseMan:/dev/input/mice"
>>>
>>> I changed "mice" to "mouse1" and the effect of moving around the
>>> point of contact has disappeared.
>>
>> Hmm, so Qt gets every event twice: One from the "/dev/input/event1"
>> and one from the "/dev/input/mice" which emulates the touchscreen
>> events to a mouse movement event.
>>
>>> I also set the value of ".oversampling_shift"
>>> to 4. After this the handling of the touch screen is much better, but
>>> not perfect. But the handling of the mini2440 with x35 display is
>>> still better than with w35i.
>>
>> BTW: What LCD displays are used on these display units? Is the
>> "ACX502BMU"
>> from Sony the correct one for the X35? And what LCD display comes
>> with the W35i display unit? Are there any markers on the display
>> units to help future users to identify them?
>>
> I have got three different 3.5in displays:
> w35i    LQ035Q1DG06
> x35     ACX502BMU
> t35     TD035STED4
>
>>> How can I difference in the userspace, which display is connected?
>>> I have to use different values for QWS_SIZE, QWS_DISPLAY.
>>>
>>> Should I read /proc/cmdline and parse the parameter mini2440?
>>
>> I thinks this would be the easiest way.
>>
>>> [...]
>>

Juergen Beisert | 8 Aug 12:09
Picon
Gravatar

Re: Mini2440: w35i unexactly handling

Icarus Alive wrote:
> Has this kernel patch come to your notice, and/or is already included ?
>
> http://comments.gmane.org/gmane.linux.kernel/1154467

It' already included.

Regards,
Juergen

--

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

Michael Olbrich | 9 Aug 15:11
Picon

Re: Mini2440: w35i unexactly handling

On Fri, Aug 05, 2011 at 01:16:53PM +0000, Markus Mehlan wrote:
> I have another question, but I don't know if this is the right forum.
> 
> The usb-mouse (/dev/input/mouse1 ) is only recognized by the QT 
> application, when the mouse is connected before the app has started. 
> If I disconnect the mouse during the app runs, and after that connect 
> the mouse again, it will not be recognized by the app. The keyboard is 
> not a problem (/dev/tty1).

Qt Embedded does not support input hotplugging. If you could stop the
touchscreen from sending mouse events to /dev/input/mice, then you could
use that. But I have no idea if or how that can be done.

Michael

--

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


Gmane