Patchwork [meta-fsl-demos] xserver-xorg: add evdev configuration for the cfa-10057 and cfa-10058 touchscreens

login
register
mail settings
Submitter Alexandre Belloni
Date Sept. 5, 2013, 9:27 p.m.
Message ID <1378416455-17290-1-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/57529/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - Sept. 5, 2013, 9:27 p.m.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 .../xserver-xorg-1.14.0/cfa10057-evdev.conf.patch  | 23 ++++++++++++++++++++++
 .../xserver-xorg-1.14.0/cfa10058-evdev.conf.patch  | 22 +++++++++++++++++++++
 .../xorg-xserver/xserver-xorg_1.14.0.bbappend      |  5 +++++
 3 files changed, 50 insertions(+)
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10057-evdev.conf.patch
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10058-evdev.conf.patch
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xorg_1.14.0.bbappend
Otavio Salvador - Sept. 5, 2013, 9:40 p.m.
On Thu, Sep 5, 2013 at 6:27 PM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

I think this is not for -demos but for the BSP as the calibration is
the same for any image. Why you don't use pointercal-xinput for this?
Alexandre Belloni - Sept. 5, 2013, 10:27 p.m.
On 05/09/2013 23:40, Otavio Salvador wrote:
> On Thu, Sep 5, 2013 at 6:27 PM, Alexandre Belloni
> <alexandre.belloni@free-electrons.com> wrote:
>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> I think this is not for -demos but for the BSP as the calibration is
> the same for any image. Why you don't use pointercal-xinput for this?
>

Hum, I saw pointercal-xinput in -demos so I moved it there. I was under
the impression that for a resistive touchscreen, you need to calibrate
each board but maybe I'm wrong. According to
http://www.lindusembedded.com/blog/2013/02/07/adding-touch-support-in-yocto/,
xinput-calibrator<https://github.com/tias/xinput_calibrator> is only
working when the touchscreen has already been calibrated once. This does
exactly that but without pointercal.xinput being created so we get
xinput-calibrator on first boot.

I didn't exactly test everything myself (my touchscreen is not working)
and I may be wrong. I'm really open on that particular topic as long as
we get the touchscreen working ;)

Regards,
Otavio Salvador - Sept. 6, 2013, 12:15 p.m.
On Thu, Sep 5, 2013 at 7:27 PM, Alexandre Belloni
<alexandre.belloni@free-electrons.com> wrote:
> On 05/09/2013 23:40, Otavio Salvador wrote:
>> On Thu, Sep 5, 2013 at 6:27 PM, Alexandre Belloni
>> <alexandre.belloni@free-electrons.com> wrote:
>>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
>> I think this is not for -demos but for the BSP as the calibration is
>> the same for any image. Why you don't use pointercal-xinput for this?
>>
>
> Hum, I saw pointercal-xinput in -demos so I moved it there. I was under

This was there because pointercal-xinput were in meta-openembedded in
past; will fix it.

> the impression that for a resistive touchscreen, you need to calibrate
> each board but maybe I'm wrong. According to
> http://www.lindusembedded.com/blog/2013/02/07/adding-touch-support-in-yocto/,
> xinput-calibrator<https://github.com/tias/xinput_calibrator> is only
> working when the touchscreen has already been calibrated once. This does
> exactly that but without pointercal.xinput being created so we get
> xinput-calibrator on first boot.

In fact xinput-calibrator spawns the process only if it does not find
a usable calibration; so in case you provide it, it won't start as it
can reuse the provided data.

> I didn't exactly test everything myself (my touchscreen is not working)
> and I may be wrong. I'm really open on that particular topic as long as
> we get the touchscreen working ;)

Good; I will send the patch to move pointercal-xinput to meta-fsl-arm,
as it is where it ought to be. Please check the possibility of using
it as it'd avoid a bbappend for xorg and it will be  easier to
maintain in long term.

Patch

diff --git a/recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10057-evdev.conf.patch b/recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10057-evdev.conf.patch
new file mode 100644
index 0000000..a52a0ef
--- /dev/null
+++ b/recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10057-evdev.conf.patch
@@ -0,0 +1,23 @@ 
+cfa10057: add temporary calibration data to be able to fully calibrate
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
+---
+ config/10-evdev.conf | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config/10-evdev.conf b/config/10-evdev.conf
+index cc83ab2..4afcfd7 100644
+--- a/config/10-evdev.conf
++++ b/config/10-evdev.conf
+@@ -37,4 +37,6 @@ Section "InputClass"
+         MatchIsTouchscreen "on"
+         MatchDevicePath "/dev/input/event*"
+         Driver "evdev"
++        Option "Calibration" "185 4074 285 3946"
++        Option "SwapAxes" "1"
+ EndSection
+-- 
+1.8.1.2
+
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10058-evdev.conf.patch b/recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10058-evdev.conf.patch
new file mode 100644
index 0000000..376301a
--- /dev/null
+++ b/recipes-graphics/xorg-xserver/xserver-xorg-1.14.0/cfa10058-evdev.conf.patch
@@ -0,0 +1,22 @@ 
+cfa10058: add temporary calibration data to be able to fully calibrate
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
+---
+ config/10-evdev.conf | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/config/10-evdev.conf b/config/10-evdev.conf
+index cc83ab2..3dbaff2 100644
+--- a/config/10-evdev.conf
++++ b/config/10-evdev.conf
+@@ -37,4 +37,5 @@ Section "InputClass"
+         MatchIsTouchscreen "on"
+         MatchDevicePath "/dev/input/event*"
+         Driver "evdev"
++        Option "Calibration" "249 3861 3861 249"
+ EndSection
+-- 
+1.8.1.2
+
diff --git a/recipes-graphics/xorg-xserver/xserver-xorg_1.14.0.bbappend b/recipes-graphics/xorg-xserver/xserver-xorg_1.14.0.bbappend
new file mode 100644
index 0000000..f8777e8
--- /dev/null
+++ b/recipes-graphics/xorg-xserver/xserver-xorg_1.14.0.bbappend
@@ -0,0 +1,5 @@ 
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
+
+SRC_URI_append_cfa10057 = " file://cfa10057-evdev.conf.patch"
+SRC_URI_append_cfa10058 = " file://cfa10058-evdev.conf.patch"
+