Want to enable the touchscreen support on weston

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Want to enable the touchscreen support on weston

Jump to solution
4,177 Views
darsh_dev
Contributor V

Hello,

Using tslib and evtest, able to detect the touch event, and its working fine on IMX8Mnano (Yocto project)

root@imx8mn-ddr4-evk:~# evtest 
No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:      30370000.snvs:snvs-powerkey
/dev/input/event1:      fts_ts
/dev/input/event2:      gpio_ir_recv
Select the device event number [0-2]: 1
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
Input device name: "fts_ts"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 47 (ABS_MT_SLOT)
      Value      0
      Min        0
      Max        9
    Event code 48 (ABS_MT_TOUCH_MAJOR)
      Value      0
      Min        0
      Max      255
    Event code 53 (ABS_MT_POSITION_X)
      Value      0
      Min        0
      Max        0
    Event code 54 (ABS_MT_POSITION_Y)
      Value      0
      Min        0
      Max        0
    Event code 57 (ABS_MT_TRACKING_ID)
      Value      0
      Min        0
      Max    65535
    Event code 58 (ABS_MT_PRESSURE)
      Value      0
      Min        0
      Max      255
Properties:
  Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1654183895.1654183895, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 62
Event: time 1654183895.1654183895, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 63
Event: time 1654183895.1654183895, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 342
Event: time 1654183895.1654183895, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 618
Event: time 1654183895.1654183895, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1654183895.1654183895, -------------- SYN_REPORT ------------
Event: time 1654183895.1654183895, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 338
Event: time 1654183895.1654183895, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 627
Event: time 1654183895.1654183895, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 330
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 648
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 320
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 675
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 312
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 701
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 304
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 732
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 301
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 742
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 300
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 748
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 299
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 751
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 752
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1654183896.1654183896, type 3 (EV_ABS), code 58 (ABS_MT_PRESSURE), value 0
Event: time 1654183896.1654183896, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1654183896.1654183896, -------------- SYN_REPORT ------------


We would like to enable the touchscreen input support on the Weston GUI.

root@imx8mn-ddr4-evk:~# weston-touch-calibrator 
could not load cursor 'dnd-move'
could not load cursor 'dnd-copy'
could not load cursor 'dnd-none'
No devices listed.

Weston log, giving error for event1 (touchscreen),
Error:
[15:21:23.580] event1 - fts_ts: is tagged by udev as: Touchscreen
[15:21:23.580] event1 - fts_ts: kernel bug: device has min == max on ABS_MT_POSITION_X
[15:21:23.580] event1 - fts_ts: was rejected

[15:21:23.562] event2  - gpio_ir_recv: is tagged by udev as: Keyboard Pointingstick
[15:21:23.563] event2  - gpio_ir_recv: device is a pointer
[15:21:23.563] event2  - gpio_ir_recv: device is a keyboard
[15:21:23.570] event0  - 30370000.snvs:snvs-powerkey: is tagged by udev as: Keyboard
[15:21:23.571] event0  - 30370000.snvs:snvs-powerkey: device is a keyboard
[15:21:23.580] event1  - fts_ts: is tagged by udev as: Touchscreen
[15:21:23.580] event1  - fts_ts: kernel bug: device has min == max on ABS_MT_POSITION_X
[15:21:23.580] event1  - fts_ts: was rejected
[15:21:23.580] event1  - not using input device '/dev/input/event1'
[15:21:23.602] libinput: configuring device "gpio_ir_recv".
[15:21:23.603] libinput: configuring device "30370000.snvs:snvs-powerkey".
[15:21:23.603] DRM: head 'DSI-1' found, connector 35 is connected, EDID make 'unknown', model 'unknown', serial 'unknown'
[15:21:23.604] Registered plugin API 'weston_drm_output_api_v1' of size 24
[15:21:23.607] Chosen EGL config details: id:  21 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 1-60 type: win|pix|pbf|swap_preserved vis_id: XRGB8888 (0x34325258)
[15:21:23.607] Output DSI-1 (crtc 33) video modes:
               720x1280@60.2, preferred, current, 62.0 MHz
[15:21:23.607] associating input device event2 with output DSI-1 (none by udev)
[15:21:23.607] associating input device event0 with output DSI-1 (none by udev)
[15:21:23.607] Output 'DSI-1' enabled with head(s) DSI-1

 
Can you please help me, what configuration is missing here? need to configure the ABS_MT_POSITION_X from kernel space?

Thanks,

Darshak

0 Kudos
Reply
1 Solution
4,171 Views
darsh_dev
Contributor V

I found the solution, I was missing display-coords in the dts configuration

--- a/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk-lcdif-ili9881c.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk-lcdif-ili9881c.dts
@@ -38,6 +38,7 @@ focaltech: edt-ft5x06@38 {
                 status = "okay";
                touchscreen-size-x = <720>;
                touchscreen-size-y = <1280>;
+               focaltech,display-coords =  <0 0 720 1280>;
         };
 };

 

View solution in original post

0 Kudos
Reply
1 Reply
4,172 Views
darsh_dev
Contributor V

I found the solution, I was missing display-coords in the dts configuration

--- a/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk-lcdif-ili9881c.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mn-ddr4-evk-lcdif-ili9881c.dts
@@ -38,6 +38,7 @@ focaltech: edt-ft5x06@38 {
                 status = "okay";
                touchscreen-size-x = <720>;
                touchscreen-size-y = <1280>;
+               focaltech,display-coords =  <0 0 720 1280>;
         };
 };

 

0 Kudos
Reply