This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem using ili9341 lcd(240x320) with am5728 sitara processor.

Other Parts Discussed in Thread: AM5728

Hi,

 We are using sitara am5728 processor based custom board , we are connecting ili9341 lcd to processor using spi serial interface. We are able to see TI logo at boot time and we are able to push data from user space to /dev/fb0 interface and able to see the data on LCD. Our requirement is to display QT GUI on LCD of size 240x320 for that we are facing following issues.

We are using ti-processor-sdk-linux-am57xx-evm-02.00.01.07 SDK.

1. We are unable to run Qt binary on LCD it gives following error.

Failed to create display (No such file or directory).

2. Below is the result of modetest command.

Result of modetest:-

root@am57xx-evm:~# modetest
trying to open device 'i915'...failed.
trying to open device 'radeon'...failed.
trying to open device 'nouveau'...failed.
trying to open device 'vmwgfx'...failed.
trying to open device 'omapdrm'...success.[   50.447146] omapdss error: HDMI I2C Master Error

Encoders:
id      crtc    type    possible crtcs  possible clones
25      28      TMDS    0x00000001      0x00000000
29      32      TMDS    0x00000002      0x00000000

Connectors:
id      encoder status          type    size (mm)       modes   encoders
26      25      connected       HDMI-A  0x0             5       25
  modes:
        name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  1024x768 60 1024 1048 1184 1344 768 771 777 806 flags: nhsync, nvsync; type: driver
  800x600 60 800 840 968 1056 600 601 605 628 flags: phsync, pvsync; type: driver
  800x600 56 800 824 896 1024 600 601 603 625 flags: phsync, pvsync; type: driver
  848x480 60 848 864 976 1088 480 486 494 517 flags: phsync, pvsync; type: driver
  640x480 60 640 656 752 800 480 489 492 525 flags: nhsync, nvsync; type: driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:

2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0
30      29      connected       unknown 0x0             2       29
  modes:
        name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
  320x240 71 320 330 340 360 240 244 246 248 flags: nhsync, nvsync; type: preferred, driver
  320x240 71 320 330 340 360 240 244 246 248 flags: nhsync, nvsync; type: preferred, driver
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0

3. When I am running weston on LCD i am getting following logs.

oot@am57xx-evm:~# unset WAYLAND_DISPLAY
root@am57xx-evm:~#
root@am57xx-evm:~#
root@am57xx-evm:~#
root@am57xx-evm:~# weston --tty=1 --connector=30
Date: 2000-01-01 UTC
[00:02:13.090] weston 1.6.0
wayland.freedesktop.org/
Bug reports to: bugs.freedesktop.org/enter_bug.cgi
Build: 1.5.93-5-g2858cc2 configure.ac: bump version to 1.6.0 (2014-09-19 13:40:14 +0300)
[00:02:13.090] OS: Linux, 4.1.13-dirty, #101 SMP PREEMPT Tue Jul 19 19:41:01 IST 2016, armv7l
[00:02:13.091] Using config file '/etc//weston.ini'
[00:02:13.091] Loading module '/usr/lib/weston/drm-backend.so'
[00:02:13.093] initializing drm backend
[00:02:13.096] us[ 161.040967] omapdss error: HDMI I2C Master Errorabhi
ing /dev/dri/card0
[00:02:13.096] Loading module '/usr/lib/weston/gl-renderer.so'
failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
loaded module: gbm_pvr.so
PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
[00:02:13.113] warning: EGL_EXT_buffer_age not supported. Performance could be affected.
[00:02:13.115] input device 'TSC2007 Touchscreen', /dev/input/event0 is a touch device
[00:02:13.115] input device 'palmas_pwron', /dev/input/event1 is a keyboard
[00:02:13.116] input device 'UVC Camera (046d:081b)', /dev/input/event2 is a keyboard
[00:02:13.116] launching '/usr/lib/weston/weston-keyboard'
[00:02:13.151] Applying calibration: 0.957024 -0.031620 23.466064 0.035414 1.056099 -47.766022 (normalized 0.073331 -0.199025)
[00:02:13.162] EGL version: 1.4 build 1.9@2253347
[00:02:13.162] EGL vendor: Imagination Technologies
[00:02:13.162] EGL client APIs: OpenGL_ES

[00:02:13.162] EGL extensions: EGL_IMG_client_api_ogl EGL_KHR_image
EGL_KHR_image_base EGL_KHR_image_pixmap
EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image
EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image
EGL_IMG_cl_image EGL_KHR_fence_sync EGL_IMG_hibernate_process
EGL_WL_bind_wayland_display EGL_KHR_surfaceless_gles2
EGL_NV_post_sub_buffer
[00:02:13.162] GL version: OpenGL ES 2.0 build 1.9@2253347
[00:02:13.162] GLSL version: OpenGL ES GLSL ES 1.00 build 1.9@2253347
[00:02:13.162] GL vendor: Imagination Technologies
[00:02:13.162] GL renderer: PowerVR SGX 544MP
[00:02:13.162] GL extensions: GL_OES_rgb8_rgba8 GL_OES_depth24
GL_OES_vertex_half_float GL_OES_texture_float
GL_OES_texture_half_float GL_OES_element_index_uint
GL_OES_mapbuffer GL_OES_fragment_precision_high
GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image
GL_OES_EGL_image_external GL_OES_required_internalformat
GL_OES_depth_texture GL_OES_get_program_binary
GL_OES_packed_depth_stencil GL_OES_standard_derivatives
GL_OES_vertex_array_object GL_OES_egl_sync GL_OES_texture_npot
GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888
GL_EXT_discard_framebuffer GL_EXT_shader_texture_lod
GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc
GL_IMG_texture_compression_pvrtc2 GL_IMG_texture_npot
GL_IMG_texture_format_BGRA8888 GL_IMG_read_format
GL_IMG_program_binary GL_IMG_uniform_buffer_object
GL_IMG_multisampled_render_to_texture
GL_TI_image_external_raw_video
[00:02:13.162] GL ES 2 renderer features:

read-back format: RGBA
wl_shm sub-image to texture: no
EGL Wayland extension: yes
[00:02:13.162] Chosen EGL config details:
RGBA bits: 8 8 8 8
swap interval range: 1 - 1
[00:02:13.162] Failed to initialize backlight
[00:02:13.163] Output None1, (connector 30, crtc 32)
mode 320x240@71.1, preferred, current
mode 320x240@71.1, preferred
[00:02:13.163] Compositor capabilities:
arbitrary surface rotation: yes
screen capture uses y-flip: yes
[00:02:13.163] Loading module '/usr/lib/weston/desktop-shell.so'
[00:02:13.210] launching '/usr/lib/weston/weston-desktop-shell'

4. Since we are using serial spi interface is there any omapdrm compatible alternative of drivers/staging/fbtft  i found something called tinydrm  Can i use it for our case ?

Thanks & Regards

Abhishek

  • Hi Abhishek,
    4. Since we are using serial spi interface is there any omapdrm compatible alternative of drivers/staging/fbtft i found something called tinydrm Can i use it for our case?


    It seems that this is created especially for spi displays: lwn.net/.../
    So it should be OK to use it. However I am not sure how much effort you'll have to put in order to port it to TI SDK.

    Best Regards,
    Yordan
  • Hi Yordan,
    1. can you please suggest why we are not able to run weston with default sdk, While we are able to see argo project login on LCD on weston --tty=1 --connector=30 (does resolution may affect since we are using 320x240 of lcd ?).
  • Hi Abhishek,

    I am not sure. Can you try:

    $ pvrsrvinit

    $ weston --tty1

    The following console messages make me think that somehow the pvr driver is not loaded:

     [00:02:13.096] Loading module '/usr/lib/weston/gl-renderer.so'

     failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory

     failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory

     loaded module: gbm_pvr.so

     PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]

     [00:02:13.113] warning: EGL_EXT_buffer_age not supported. Performance could be affected.


    Best Regards, 
    Yordan

  • Hi,
    I can clear your doubt regarding pvr driver.
    I am able to run weston and Qt application on HDMI monitor (if pvr driver was not loaded than weston should not run on HDMI also right ?) and i am able to see omapdrm_pvr driver is loaded by using lsmod.
  • Hi Yordan,
    Can you please make sure weather Wayland protocol can run on small size of lcd with SDK release 02.00.01.07.
  • Hi Abhishek,

    I have no way of thesting this on my side.. I use only the TI reference designs, the closest I have is AM335x Starter Kit (4.7'' touch screen LCD 480x272) & Wayland is working fine on it.

    Best Regards,
    Yordan
  • Hi Yordan,

                        One more thing i want to try. Since in our case I am able to put data to lcd using frame buffer device /dev/fb0, I found that we can run weston using framebuffer device also by using weston --tty=1 --backend=fbdev-backend.so --device=/dev/fb0 (am i thinking it in right direction ?) but the problem i am facing is fbdev-backend.so file is not available in /usr/lib/weston directory.

    Can you please tell me how can i get this  shared object file and source code of the weston.

    Thanks & Regrds

    Abhishek

  • Hi Abhishek,

    but the problem i am facing is fbdev-backend.so file is not available in /usr/lib/weston directory.


    I think this is because the weston uses wayland & drm in SDK02.00.01.07. I am not sure that fbdev-backend.so will solve your problem. 

    Let me consult the graphics experts on this one. Their feedback will be posted here. 

    Best Regards,
    Yordan

  • Hi Yordan,
    No I am not able to use drm backend since the lcd module we are using do not use drm. So i have cross compiled the weston source code and i got fbdev-backend.so by using this i am able to see white graphics weston screen on my LCD. But i am unable to run any QT application over it, it is giving segmentation fault and i am also not able to run matrix-gui.

    I initiated new thread for this here


    Thanks & Regards
    Abhishek