Gonzalo Fernandez

iMX53QSB: DirectFB and TSlib

Discussion created by Gonzalo Fernandez on Oct 3, 2011
Latest reply on May 14, 2013 by Gonzalo Fernandez

Hi all,

 

I'm trying to setup DirectFB working with TSlib. Under Ltib, I've selected Dialog DA9052 TSI to support the touch controller, and I can compile without errors.

When the QSB is booting I can see the TSI driver is loaded. This has been extracted from the boot log:

DA9052 TSI Device Driver, v1.0
input: da9052-tsi as /class/input/input0
TSI Drv Successfully Inserted da9052-tsi

These are the exports I'm using:

export TSLIB_CALIBFILE=/etc/pointercal
export TSLIB_CONFFILE=/usr/etc/ts.conf
export TSLIB_TSDEVICE=/dev/input/event0
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CONSOLEDEVICE=none

Thanks to the patch that Shlomo Kut posted here http://imxcommunity.org/group/imx53quickstartboard/forum/topics/seiko-wvga-panel-with-imx53?commentId=4103961%3AComment%3A15243&groupId=4103961%3AGroup%3A5816 now I'm able to run ts_calibrate OK, but DirectFB (df_input) doesn't work.

Under /usr/lib/directfb-1.4-5/inputdrivers I can only see libdirectfb_linux_input.so. I think libdirectfb_tslib.so should also be there, but I'm not able to locate this file in my system ¿?.

 

Then, when I run df_input, I get the following:

root@freescale ~$ df_input                             

   ~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.13 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-10-03 09:59)
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/FBDev: Found 'DISP3 BG' (ID 0) with frame buffer at 0x8e000000, 32768k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: mma8450 0.1 (directfb.org)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Interface: Loaded 'FT2' implementation of 'IDirectFBFont'.
(*) FBDev/Mode: Setting 800x480 RGB16
(*) FBDev/Mode: Switched to 800x480 (virtual 800x1440) at 16 bit (RGB16), pitch 1600
(*) Direct/Interface: Loaded 'PNG' implementation of 'IDirectFBImageProvider'.

Exiting PEN DOWN HANDLER
The raw data count is 10
The OS data count is 2
PEN UP DECLARED
Exiting PEN DOWN HANDLER
The raw data count is 10
The OS data count is 2
PEN UP DECLARED

 

In the LCD I'm getting readings from the mma8450, but the touch screen is not working.

The contents of /dev/input/ is:

root@freescale ~$ ls -l /dev/input
crw-r-----    1 root     root      13,  64 Jan  1 04:42 event0
crw-r-----    1 root     root      13,  65 Jan  1 04:42 event1

and the input devices in my system are:

root@freescale ~$ cat /sys/class/input/input0/name
da9052-tsi
root@freescale ~$ cat /sys/class/input/input1/name
mma8450

 

Just to see what happens, I have also exported TSLIB_TSDEVICE as:

export TSLIB_TSDEVICE=/dev/input/event1

In this case ts_calibrate doesn't work (as expected) but, for a while, I can get touch screen events in df_input ¿¿¿???? This is what I see when running df_input:

~~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.4.13 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2001-2010  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2011-10-03 09:59)
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'VT Switcher' (-1) [CRITICAL OTHER/OTHER 0/0] <8388608>...
(*) Direct/Thread: Started 'VT Flusher' (-1) [DEFAULT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/FBDev: Found 'DISP3 BG' (ID 0) with frame buffer at 0x8e000000, 32768k (MMIO 0x00000000, 0k)
(*) Direct/Thread: Started 'Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: da9052-tsi 0.1 (directfb.org)
(*) Direct/Thread: Started 'Hotplug with Linux Input' (-1) [INPUT OTHER/OTHER 0/0] <8388608>...
(*) DirectFB/Input: Hot-plug detection enabled with Linux Input Driver
(*) DirectFB/Graphics: Generic Software Rasterizer 0.6 (directfb.org)
(*) DirectFB/Core/WM: Default 0.3 (directfb.org)
(*) Direct/Interface: Loaded 'FT2' implementation of 'IDirectFBFont'.
(*) FBDev/Mode: Setting 800x480 RGB16
(*) FBDev/Mode: Switched to 800x480 (virtual 800x1440) at 16 bit (RGB16), pitch 1600
(*) Direct/Interface: Loaded 'PNG' implementation of 'IDirectFBImageProvider'.

 

Something is messed up here. Please, could someone point me what I'm missing?

 

Thanks,

Gonzalo.

 


Outcomes