All of lore.kernel.org
 help / color / mirror / Atom feed
* tslib in fsl-image-gui
@ 2013-06-25  1:58 Alexey Mednyy
  2013-06-28 12:26 ` Trevor Woerner
  2013-07-12  9:10 ` Petr Kolesnikov
  0 siblings, 2 replies; 6+ messages in thread
From: Alexey Mednyy @ 2013-06-25  1:58 UTC (permalink / raw)
  To: meta-freescale

Hello all,

I figured out that mxc_ts driver works bad with X evtest, always returns
bad values. On ubuntu images I always got touchscreen to work with tslib.

my MACHINE ??= 'imx53qsb'
I'm using my custom 2.6.35-maintain kernel from freescale git.

On Yocto if I run ts_calibrate util I've got:
"tslib: Selected device uses a different version of the event protocol
than tslib was compiled for"

I dive into tslib sources and found this:

if (version < EV_VERSION) {
fprintf(stderr, "tslib: Selected device uses a different version of the
event protocol than tslib was compiled for\n");
return -1;
}

EV_VERSION defined in input.h, so looks like tslib compiled with wrong
kernel headers.

For now I'm not familiar with all Yocto stuff so I just tried to append
this to local.conf:

PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
PREFERRED_VERSION_linux-imx = "2.6.35.3"

but it didn't help.

Any variants how to get tslib to work on fsl-image-gui?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tslib in fsl-image-gui
  2013-06-25  1:58 tslib in fsl-image-gui Alexey Mednyy
@ 2013-06-28 12:26 ` Trevor Woerner
  2013-07-12  9:10 ` Petr Kolesnikov
  1 sibling, 0 replies; 6+ messages in thread
From: Trevor Woerner @ 2013-06-28 12:26 UTC (permalink / raw)
  To: Alexey Mednyy; +Cc: meta-freescale

On 24 June 2013 21:58, Alexey Mednyy <swexru@gmail.com> wrote:
> On Yocto if I run ts_calibrate util I've got:
> "tslib: Selected device uses a different version of the event protocol
> than tslib was compiled for"


I just built fsl-image-gui and ran ts_calibrate and it appears to work
fine[1]. I know this isn't the sort of answer you were hoping for, but
maybe if you tried pulling the latest master and building again it
might work? Are you working off of master? That's what I used. I
assume you're talking about the fsl-image-gui that comes as part of
meta-fsl-demos?




[1] Personally I don't have a touchscreen device (just a regular
monitor) but the application started up and was asking for a touch
just fine.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tslib in fsl-image-gui
  2013-06-25  1:58 tslib in fsl-image-gui Alexey Mednyy
  2013-06-28 12:26 ` Trevor Woerner
@ 2013-07-12  9:10 ` Petr Kolesnikov
  2013-07-12 13:33   ` Otavio Salvador
  1 sibling, 1 reply; 6+ messages in thread
From: Petr Kolesnikov @ 2013-07-12  9:10 UTC (permalink / raw)
  To: meta-freescale

Alexey Mednyy <swexru@...> writes:

> 
> Hello all,
> 
> I figured out that mxc_ts driver works bad with X evtest, always returns
> bad values. On ubuntu images I always got touchscreen to work with tslib.
> 
> my MACHINE ??= 'imx53qsb'
> I'm using my custom 2.6.35-maintain kernel from freescale git.
> 
> On Yocto if I run ts_calibrate util I've got:
> "tslib: Selected device uses a different version of the event protocol
> than tslib was compiled for"
> 
> I dive into tslib sources and found this:
> 
> if (version < EV_VERSION) {
> fprintf(stderr, "tslib: Selected device uses a different version of the
> event protocol than tslib was compiled for\n");
> return -1;
> }
> 
> EV_VERSION defined in input.h, so looks like tslib compiled with wrong
> kernel headers.
> 
> For now I'm not familiar with all Yocto stuff so I just tried to append
> this to local.conf:
> 
> PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
> PREFERRED_VERSION_linux-imx = "2.6.35.3"
> 
> but it didn't help.
> 
> Any variants how to get tslib to work on fsl-image-gui?
> 

Hi Alexey,

I went into same issue a few days ago. The tslib is compiled against yocto 
kernel headers 3.8 while we are using quiet old imx kernel 2.6.35. The 
EV_VERSION has been incremented in kernel 2.6.37.

So there are two approaches. Compile tslib against imx kernel headers, that 
is most likely the right way. The second (dirty) way is to patch tslib to 
accept version 0x010000, that is working fine too.

Regards,
Petr



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tslib in fsl-image-gui
  2013-07-12  9:10 ` Petr Kolesnikov
@ 2013-07-12 13:33   ` Otavio Salvador
  2013-07-12 14:53     ` Eric Bénard
  0 siblings, 1 reply; 6+ messages in thread
From: Otavio Salvador @ 2013-07-12 13:33 UTC (permalink / raw)
  To: Petr Kolesnikov; +Cc: meta-freescale

On Fri, Jul 12, 2013 at 6:10 AM, Petr Kolesnikov <petr@kolesnikov.eu> wrote:
> Alexey Mednyy <swexru@...> writes:
>
>>
>> Hello all,
>>
>> I figured out that mxc_ts driver works bad with X evtest, always returns
>> bad values. On ubuntu images I always got touchscreen to work with tslib.
>>
>> my MACHINE ??= 'imx53qsb'
>> I'm using my custom 2.6.35-maintain kernel from freescale git.
>>
>> On Yocto if I run ts_calibrate util I've got:
>> "tslib: Selected device uses a different version of the event protocol
>> than tslib was compiled for"
>>
>> I dive into tslib sources and found this:
>>
>> if (version < EV_VERSION) {
>> fprintf(stderr, "tslib: Selected device uses a different version of the
>> event protocol than tslib was compiled for\n");
>> return -1;
>> }
>>
>> EV_VERSION defined in input.h, so looks like tslib compiled with wrong
>> kernel headers.
>>
>> For now I'm not familiar with all Yocto stuff so I just tried to append
>> this to local.conf:
>>
>> PREFERRED_PROVIDER_virtual/kernel = "linux-imx"
>> PREFERRED_VERSION_linux-imx = "2.6.35.3"
>>
>> but it didn't help.
>>
>> Any variants how to get tslib to work on fsl-image-gui?
>>
>
> Hi Alexey,
>
> I went into same issue a few days ago. The tslib is compiled against yocto
> kernel headers 3.8 while we are using quiet old imx kernel 2.6.35. The
> EV_VERSION has been incremented in kernel 2.6.37.
>
> So there are two approaches. Compile tslib against imx kernel headers, that
> is most likely the right way. The second (dirty) way is to patch tslib to
> accept version 0x010000, that is working fine too.

An easier one is to make a patch to 2.6.35 which fixes the EV_VERSION there.

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tslib in fsl-image-gui
  2013-07-12 13:33   ` Otavio Salvador
@ 2013-07-12 14:53     ` Eric Bénard
  2013-07-12 15:08       ` Otavio Salvador
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Bénard @ 2013-07-12 14:53 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

Le Fri, 12 Jul 2013 10:33:35 -0300,
Otavio Salvador <otavio@ossystems.com.br> a écrit :

> On Fri, Jul 12, 2013 at 6:10 AM, Petr Kolesnikov <petr@kolesnikov.eu> wrote:
> > I went into same issue a few days ago. The tslib is compiled against yocto
> > kernel headers 3.8 while we are using quiet old imx kernel 2.6.35. The
> > EV_VERSION has been incremented in kernel 2.6.37.
> >
> > So there are two approaches. Compile tslib against imx kernel headers, that
> > is most likely the right way. The second (dirty) way is to patch tslib to
> > accept version 0x010000, that is working fine too.
> 
> An easier one is to make a patch to 2.6.35 which fixes the EV_VERSION there.
> 
no 2.6.35 has the EV_VERSION value corresponding the the ev API of
this kernel version so that's not the right thing to do.

tslib has this commit which triggers the problem by allowing old kernels
to run tslib compiled with newer headers but not the reverse :
https://github.com/kergoth/tslib/commit/412d99d8b92c12545f939972146a38c5074f3dcb
so for i.MX53 tslib may need a patch to relax the check.

Eric


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: tslib in fsl-image-gui
  2013-07-12 14:53     ` Eric Bénard
@ 2013-07-12 15:08       ` Otavio Salvador
  0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2013-07-12 15:08 UTC (permalink / raw)
  To: Eric Bénard; +Cc: meta-freescale

On Fri, Jul 12, 2013 at 11:53 AM, Eric Bénard <eric@eukrea.com> wrote:
> Le Fri, 12 Jul 2013 10:33:35 -0300,
> Otavio Salvador <otavio@ossystems.com.br> a écrit :
>
>> On Fri, Jul 12, 2013 at 6:10 AM, Petr Kolesnikov <petr@kolesnikov.eu> wrote:
>> > I went into same issue a few days ago. The tslib is compiled against yocto
>> > kernel headers 3.8 while we are using quiet old imx kernel 2.6.35. The
>> > EV_VERSION has been incremented in kernel 2.6.37.
>> >
>> > So there are two approaches. Compile tslib against imx kernel headers, that
>> > is most likely the right way. The second (dirty) way is to patch tslib to
>> > accept version 0x010000, that is working fine too.
>>
>> An easier one is to make a patch to 2.6.35 which fixes the EV_VERSION there.
>>
> no 2.6.35 has the EV_VERSION value corresponding the the ev API of
> this kernel version so that's not the right thing to do.
>
> tslib has this commit which triggers the problem by allowing old kernels
> to run tslib compiled with newer headers but not the reverse :
> https://github.com/kergoth/tslib/commit/412d99d8b92c12545f939972146a38c5074f3dcb
> so for i.MX53 tslib may need a patch to relax the check.

Agreed; this seems to be the way to go.

--
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-07-12 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-25  1:58 tslib in fsl-image-gui Alexey Mednyy
2013-06-28 12:26 ` Trevor Woerner
2013-07-12  9:10 ` Petr Kolesnikov
2013-07-12 13:33   ` Otavio Salvador
2013-07-12 14:53     ` Eric Bénard
2013-07-12 15:08       ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.