[GDP-206] Support official 7 inch touch screen for RPI Created: 15/May/16  Updated: 20/Jun/17  Resolved: 17/Aug/16

Status: Done
Project: GENIVI Development Platform
Component/s: None
Affects Version/s: None
Fix Version/s: GDP 11

Type: Task Priority: Low
Reporter: Changhyeok Bae Assignee: Tom Pollard [X] (Inactive)
Resolution: Done Votes: 0
Labels: gdp_v11, peripheral, target_board
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: GDP 11 release

 Description   

Task description

GDP-ivi9 doesn't support official 7 inch touch screen for RPi. The goal of this effort is:

Official touch screen: https://www.element14.com/community/docs/DOC-78156/l/raspberry-pi-7-touchscreen-display



 Comments   
Comment by Changhyeok Bae [ 15/May/16 ]

drm isn't initialized by kernel message.

[   11.314518] [drm] No driver support for vblank timestamp query.
[   11.327805] vc4-drm soc:gpu@7e4c0000: No connectors reported connected with modes
[   11.327835] [drm] Cannot find any crtc or sizes - going 1024x768
[   11.445197] vc4-drm soc:gpu@7e4c0000: fb0:  frame buffer device
Comment by Agustin Benito Bethencourt [X] (Inactive) [ 16/May/16 ]

dmesg

[   11.314518] [drm] No driver support for vblank timestamp query.
[   11.327805] vc4-drm soc:gpu@7e4c0000: No connectors reported connected with modes
[   11.327835] [drm] Cannot find any crtc or sizes - going 1024x768
[   11.445197] vc4-drm soc:gpu@7e4c0000: fb0:  frame buffer device

Ivan's comment in mailing list

I used 4.1.10 and 4.1.18 kernels with the same result. Here is output with 4.1.10
drm-backend:

root@raspberrypi2:~# weston --backend=drm-backend.so --tty=3
Date: 2016-05-13 UTC
[12:29:36.529] weston 1.9.0
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.9.0
               Build: 1.8.93-2-gb05cdb8 configure.ac: bump to version 1.9.0 for the official release (2015-09-21 18:11:26 -0700)
[12:29:36.529] OS: Linux, 4.1.10, #1 SMP PREEMPT Thu May 12 22:29:48 MSK 2016, armv7l
[12:29:36.530] Using config file '/etc/xdg/weston/weston.ini'
[12:29:36.532] Loading module '/usr/lib/weston/drm-backend.so'
[12:29:36.595] Output repaint window is 7 ms maximum.
[12:29:36.595] initializing drm backend
[12:29:36.597] logind: failed to get session seat
[12:29:36.597] logind: cannot setup systemd-logind helper (-2), using legacy fallback
[12:29:36.605] no drm device found
[12:29:36.605] fatal: failed to create compositor backend

fbdev-backend:

root@raspberrypi2:/# weston --backend=fbdev-backend.so --tty=3
Date: 2016-05-13 UTC
[12:19:40.327] weston 1.9.0
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.9.0
               Build: 1.8.93-2-gb05cdb8 configure.ac: bump to version 1.9.0 for the official release (2015-09-21 18:11:26 -0700)
[12:19:40.328] OS: Linux, 4.1.10, #1 SMP PREEMPT Thu May 12 22:29:48 MSK 2016, armv7l
[12:19:40.329] Using config file '/etc/xdg/weston/weston.ini'
[12:19:40.330] Loading module '/usr/lib/weston/fbdev-backend.so'
[12:19:40.340] Output repaint window is 7 ms maximum.
[12:19:40.340] initializing fbdev backend
[12:19:40.341] logind: failed to get session seat
[12:19:40.341] logind: cannot setup systemd-logind helper (-2), using legacy fallback
[12:19:40.342] Creating fbdev output.
[12:19:40.342] Opening fbdev frame buffer.
[12:19:40.342] Calculating pixman format from:
                - type: 0 (aux: 0)
                - visual: 2
                - bpp: 16 (grayscale: 0)
                - red: offset: 11, length: 5, MSB: 0
                - green: offset: 5, length: 6, MSB: 0
                - blue: offset: 0, length: 5, MSB: 0
                - transp: offset: 16, length: 0, MSB: 0
[12:19:40.342] Mapping fbdev frame buffer.
[12:19:40.343] fbdev output 800×480 px
               guessing 60 Hz and 96 dpi
[12:19:40.347] input device 'USB USB Keyboard', /dev/input/event0 is tagged by udev as: Keyboard
[12:19:40.347] input device 'USB USB Keyboard', /dev/input/event0 is a keyboard
[12:19:40.349] input device 'USB USB Keyboard', /dev/input/event1 is tagged by udev as: Keyboard
[12:19:40.350] input device 'USB USB Keyboard', /dev/input/event1 is a keyboard
[12:19:40.458] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               presentation clock: CLOCK_MONOTONIC_RAW, id 4
[12:19:40.460] Loading module '/usr/lib/weston/ivi-shell.so'
[12:19:40.464] launching '/usr/lib/weston/weston-keyboard'
[12:19:40.470] Loading module '/usr/lib/weston/ivi-controller.so'
[12:19:40.475] Loading module '/usr/lib/weston/ivi-input-controller.so'
[12:19:40.476] ivi-input-controller module loaded successfully!
[12:19:44.206] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[12:19:45.206] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle
[12:19:45.716] ivi-shell: source rectangle is not yet set by ivi_layout_surface_set_source_rectangle

Leon's comment in mailing list

Hi Changhyeok,

I did several tests today. I added rpi-ft5406-overlay.dtb through recipe linux-raspberrypi_4.4.bbappend and append it to config.txt through rpi-config_git.bbappend. In the kernel defconfig I have:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_RPI_FT5406=m

Despite this Weston still fails to launch on rpi2 with the official 7" touch screen display. Here is my work in progress so far (a patch and a log):
https://gist.github.com/leon-anavi/b539e3d0cc5fcc40b89495150474c892

Best regards, Leon
Comment by Agustin Benito Bethencourt [X] (Inactive) [ 16/May/16 ]
  1. Moved the logs from the description to the comment section.
  2. Added as task for this ticket to add the screen to the peripheral wiki page.
Comment by Leon Anavi [ 17/May/16 ]

Hi,

I am still trying to figure out what is wrong with the 7 inch monitor and its touch screen.

Weston still fails to start, according to its log it cannot detect monitor and resolution:

[13:56:09.923] no available modes for HDMI-A-1
[13:56:09.923] No currently active connector found.

Here is the full weston log: https://gist.github.com/leon-anavi/b539e3d0cc5fcc40b89495150474c892#file-weston-log

Best regards, Leon

Comment by Tom Pollard [X] (Inactive) [ 17/May/16 ]

Isn't the raspi monitor LVDS? If so does weston.ini need to be told the output field and mode is LVDS1 maybe? Also setting the ft5406 module to 'y' may have some value at boot

Comment by Leon Anavi [ 17/May/16 ]

Hi Tom, yes, my guess is that weston.ini should be adjusted properly. I tried by setting mode in output section without success. I have to try again.

Comment by Tom Pollard [X] (Inactive) [ 17/May/16 ]

Leon Anavi Maybe something here may help further https://www.mankier.com/7/weston-drm

I'm looking forward to getting stuck in with all of this!...

Comment by Changhyeok Bae [ 19/May/16 ]

In kernel, drm isn't initialized and I can see below message
[ 11.327805] vc4-drm soc:gpu@7e4c0000: No connectors reported connected with modes

So I'm using drm test tool in libdrm and I got the below message.

root@raspberrypi2:/tmp# modeprint vc4
Starting test
Resources

count_connectors : 1
count_encoders   : 1
count_crtcs      : 3
count_fbs        : 0

Connector: HDMI-A-1
	id             : 19
	encoder id     : 0
	conn           : connected
	size           : 0x0 (mm)
	count_modes    : 0
	count_props    : 2
	props          : 1 2
	count_encoders : 1
	encoders       : 18

Encoder
	id     :18
	crtc_id   :0
	type   :2
	possible_crtcs  :0x1
	possible_clones :0x0

Crtc
	id             : 21
	x              : 0
	y              : 0
	width          : 0
	height         : 0
	mode           : 0xf3d214
	gamma size     : 0
Crtc
	id             : 32
	x              : 0
	y              : 0
	width          : 0
	height         : 0
	mode           : 0xf3d024
	gamma size     : 0
Crtc
	id             : 43
	x              : 0
	y              : 0
	width          : 0
	height         : 0
	mode           : 0xf3d024
	gamma size     : 0

Ok
root@raspberrypi2:/tmp# 

I thought that official kernel doesn't support vc4-dsi (Display Serial Interface).
Now I see https://github.com/anholt/linux/commits/drm-vc4-dsi.

Please see https://en.wikipedia.org/wiki/Display_Serial_Interface about DSI.

FYI.
I created issue in https://github.com/raspberrypi/linux/issues/1478.

Comment by Agustin Benito Bethencourt [X] (Inactive) [ 20/May/16 ]

We got this touchscreen at Codethink Ltd.

Comment by Changhyeok Bae [ 20/May/16 ]

There are two options to solve this problem.
1. Wait DSI merge into official branch.
2. Create patches from anholt's drm-vc4-dsi branch and test.

When I have spare time, I'll test #2 but not this time.

Comment by Tom Pollard [X] (Inactive) [ 02/Jun/16 ]

I think it's reasonable to wait until anholts DSI work is finished and is merged into the kernel

Comment by Tom Pollard [X] (Inactive) [ 08/Aug/16 ]

Looks like this issue is still being worked on by anholt, but is moving closer to being use-able, see here:

https://github.com/anholt/linux/issues/8

Comment by Tom Pollard [X] (Inactive) [ 08/Aug/16 ]

And here is the current PR into linux kernel

https://github.com/raspberrypi/linux/pull/1556

As noted, this will still be without touch support, only basic video currently.

Comment by Changhyeok Bae [ 10/Aug/16 ]

https://github.com/raspberrypi/linux/pull/1556 is merged. With CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN = Y, I'll test .

Comment by Changhyeok Bae [ 11/Aug/16 ]

I locally tested with https://github.com/raspberrypi/linux/pull/1556 and it works (display and touch are working.) on rpi2 and official 7 inch touch screen provided by Roland Krause.

Comment by Changhyeok Bae [ 11/Aug/16 ]

Please see https://github.com/GENIVI/meta-genivi-dev/pull/32.

Comment by Tom Pollard [X] (Inactive) [ 11/Aug/16 ]

Great, works as expected \o/ I hadn't noticed anholt's comments about touchworking with the change in the overlay!

Comment by Changhyeok Bae [ 16/Aug/16 ]

Merged into master branch.

Comment by Agustin Benito Bethencourt [X] (Inactive) [ 17/Aug/16 ]

This is not documented in the Peripherals wiki page so it is not done, based on the task description.

Comment by Agustin Benito Bethencourt [X] (Inactive) [ 17/Aug/16 ]

Tom Pollard [X] added info to the Peripherals wiki page. I added the ticket. This is now done.

Comment by Leon Anavi [ 18/Aug/16 ]

Hi,

Today I have successfully built GDP from master branch and launched in on Raspberry Pi 2 and 3. I confirm that the official 7" touchscreen display works fine with both models.

Best regards, Leon

Comment by Tom Pollard [X] (Inactive) [ 18/Aug/16 ]

Thanks for reporting and testing it Leon Anavi it is very much appreciated

Comment by Gunnar Andersson [ 20/Jun/17 ]

Doing some cleanup. GDP 11 had not been marked as released in JIRA. To make sure the tickets are at least reported correctly, each ticket that was attached to the Epic that was used to conain the features, will now also be assigned also to the Release (i.e. "Fix Version")

Generated at Sun May 19 10:54:05 UTC 2019 using Jira 8.1.0#801000-sha1:2e1cd1bb771978cda2c5e8f3f10539ab180613f6.