Hello!
I've sought help about this on the Utilite forums but almost no one has tried Wayland yet. Weston starts fine using the fbdev backend and weston-simple-egl even works but that's about it. I've tried to start XBMC and Neverball (SDL2, built for GLES) and both complain about being unable to create an EGL surface. I built eglinfo (./waf configure --platform=wayland --device=imx6) and I get this.
EGL information:
API version: 1.4
vendor string: Vivante Corporation
version string: 1.4
client APIs: OpenGL_ES OpenVG
extensions:
EGL_KHR_reusable_sync
EGL_KHR_fence_sync
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_lock_surface
EGL_WL_bind_wayland_display
number of configurations: 84
win = window (c) = conformant slow = slow config gl = Desktop OpenGL
pb = pbuffer (n) = non-conformant nonconfmt = non-conformant config es1,es2 = OpenGL ES 1.x/2.x
pix = pixmap vg = OpenVG
# ID LEVEL COLORBUFFER.......... DEPTH STENCIL MULTISAMPLE.... VISUAL....... SURFACES.. RENDERABLES...................... TRANSPARENT.. CAVEAT...
type size r g b a size size samples buffers type id apis native type r g b
0 1 0 rgb 32 8 8 8 0 0 0 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
1 2 0 rgb 32 8 8 8 0 16 0 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c),vg(c) yes none -1 -1 -1 none
2 3 0 rgb 32 8 8 8 0 24 0 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
3 4 0 rgb 32 8 8 8 0 24 8 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
4 5 0 rgb 32 8 8 8 0 0 0 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
5 6 0 rgb 32 8 8 8 0 16 0 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
6 7 0 rgb 32 8 8 8 0 24 0 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
7 8 0 rgb 32 8 8 8 0 24 8 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
8 9 0 rgb 32 8 8 8 0 0 0 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
9 10 0 rgb 32 8 8 8 0 16 0 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
10 11 0 rgb 32 8 8 8 0 24 0 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
11 12 0 rgb 32 8 8 8 0 24 8 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
12 13 0 rgb 32 8 8 8 8 0 0 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
13 14 0 rgb 32 8 8 8 8 16 0 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c),vg(c) yes none -1 -1 -1 none
14 15 0 rgb 32 8 8 8 8 24 0 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
15 16 0 rgb 32 8 8 8 8 24 8 0 0 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
16 17 0 rgb 32 8 8 8 8 0 0 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
17 18 0 rgb 32 8 8 8 8 16 0 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
18 19 0 rgb 32 8 8 8 8 24 0 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
19 20 0 rgb 32 8 8 8 8 24 8 2 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
20 21 0 rgb 32 8 8 8 8 0 0 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
21 22 0 rgb 32 8 8 8 8 16 0 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
22 23 0 rgb 32 8 8 8 8 24 0 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
23 24 0 rgb 32 8 8 8 8 24 8 4 1 0x0020 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
24 25 0 rgb 16 4 4 4 0 0 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
25 26 0 rgb 16 4 4 4 0 16 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
26 27 0 rgb 16 4 4 4 0 24 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
27 28 0 rgb 16 4 4 4 0 24 8 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
28 29 0 rgb 16 4 4 4 0 0 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
29 30 0 rgb 16 4 4 4 0 16 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
30 31 0 rgb 16 4 4 4 0 24 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
31 32 0 rgb 16 4 4 4 0 24 8 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
32 33 0 rgb 16 4 4 4 0 0 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
33 34 0 rgb 16 4 4 4 0 16 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
34 35 0 rgb 16 4 4 4 0 24 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
35 36 0 rgb 16 4 4 4 0 24 8 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
36 37 0 rgb 16 4 4 4 4 0 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
37 38 0 rgb 16 4 4 4 4 16 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c),vg(c) no none -1 -1 -1 none
38 39 0 rgb 16 4 4 4 4 24 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
39 40 0 rgb 16 4 4 4 4 24 8 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
40 41 0 rgb 16 4 4 4 4 0 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
41 42 0 rgb 16 4 4 4 4 16 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
42 43 0 rgb 16 4 4 4 4 24 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
43 44 0 rgb 16 4 4 4 4 24 8 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
44 45 0 rgb 16 4 4 4 4 0 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
45 46 0 rgb 16 4 4 4 4 16 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
46 47 0 rgb 16 4 4 4 4 24 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
47 48 0 rgb 16 4 4 4 4 24 8 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
48 49 0 rgb 16 5 5 5 0 0 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
49 50 0 rgb 16 5 5 5 0 16 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
50 51 0 rgb 16 5 5 5 0 24 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
51 52 0 rgb 16 5 5 5 0 24 8 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
52 53 0 rgb 16 5 5 5 0 0 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
53 54 0 rgb 16 5 5 5 0 16 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
54 55 0 rgb 16 5 5 5 0 24 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
55 56 0 rgb 16 5 5 5 0 24 8 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
56 57 0 rgb 16 5 5 5 0 0 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
57 58 0 rgb 16 5 5 5 0 16 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
58 59 0 rgb 16 5 5 5 0 24 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
59 60 0 rgb 16 5 5 5 0 24 8 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
60 61 0 rgb 16 5 5 5 1 0 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
61 62 0 rgb 16 5 6 5 0 0 0 0 0 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
62 63 0 rgb 16 5 5 5 1 16 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c),vg(c) no none -1 -1 -1 none
63 64 0 rgb 16 5 6 5 0 16 0 0 0 0x0010 0x0000 win,pb,pix es1(c),es2(c),vg(c) yes none -1 -1 -1 none
64 65 0 rgb 16 5 5 5 1 24 0 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
65 66 0 rgb 16 5 6 5 0 24 0 0 0 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
66 67 0 rgb 16 5 5 5 1 24 8 0 0 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
67 68 0 rgb 16 5 6 5 0 24 8 0 0 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
68 69 0 rgb 16 5 5 5 1 0 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
69 70 0 rgb 16 5 6 5 0 0 0 2 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
70 71 0 rgb 16 5 5 5 1 16 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
71 72 0 rgb 16 5 6 5 0 16 0 2 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
72 73 0 rgb 16 5 5 5 1 24 0 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
73 74 0 rgb 16 5 6 5 0 24 0 2 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
74 75 0 rgb 16 5 5 5 1 24 8 2 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
75 76 0 rgb 16 5 6 5 0 24 8 2 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
76 77 0 rgb 16 5 5 5 1 0 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
77 78 0 rgb 16 5 6 5 0 0 0 4 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
78 79 0 rgb 16 5 5 5 1 16 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
79 80 0 rgb 16 5 6 5 0 16 0 4 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
80 81 0 rgb 16 5 5 5 1 24 0 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
81 82 0 rgb 16 5 6 5 0 24 0 4 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
82 83 0 rgb 16 5 5 5 1 24 8 4 1 0x3038 0x0000 win,pb,pix es1(c),es2(c) no none -1 -1 -1 none
83 84 0 rgb 16 5 6 5 0 24 8 4 1 0x0010 0x0000 win,pb,pix es1(c),es2(c) yes none -1 -1 -1 none
OpenGL ES 2 information:
version string: OpenGL ES 2.0
renderer string: Vivante GC2000
extensions:
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_compressed_paletted_texture
GL_OES_EGL_image
GL_OES_depth24
GL_OES_fbo_render_mipmap
GL_OES_fragment_precision_high
GL_OES_rgb8_rgba8
GL_OES_stencil1
GL_OES_stencil4
GL_OES_texture_npot
GL_OES_vertex_half_float
GL_OES_depth_texture
GL_OES_packed_depth_stencil
GL_OES_standard_derivatives
GL_OES_get_program_binary
GL_EXT_texture_format_BGRA8888
GL_IMG_read_format
GL_EXT_blend_minmax
GL_EXT_read_format_bgra
GL_EXT_multi_draw_arrays
GL_APPLE_texture_format_BGRA8888
GL_APPLE_texture_max_level
GL_ARM_rgba8
GL_EXT_frag_depth
GL_VIV_shader_binary
GL_VIV_direct_texture
GL_OES_mapbuffer
GL_OES_EGL_image_external
GL_EXT_discard_framebuffer
GL_EXT_multisampled_render_to_texture
GL_VIV_clamp_to_border
GL_OES_vertex_type_10_10_10_2
GL_EXT_texture_type_2_10_10_10_REV
GL_EXT_texture_filter_anisotropic
GL_OES_element_index_uint
main stats:
max texture size: 8192
max cubemap texture size: 8192
max texture image units: 8
max renderbuffer size: 8192
max combined texture image units: 12
num compressed texture formats: 15
aliased line width range: 1 - 16
aliased point size range: 1 - 2048
implementation color read format: RGBA
implementation color read type: unsigned byte
max viewport dimensions: 8192 x 8192
subpixel bits: 4
supported compressed texture formats:
PALETTE4_RGBA4_OES
PALETTE4_RGB5_A1_OES
PALETTE4_R5_G6_B5_OES
PALETTE4_RGB8_OES
PALETTE4_RGBA8_OES
PALETTE8_RGBA4_OES
PALETTE8_RGB5_A1_OES
PALETTE8_R5_G6_B5_OES
PALETTE8_RGB8_OES
PALETTE8_RGBA8_OES
ETC1_RGB8
COMPRESSED_RGB_S3TC_DXT1_EXT
COMPRESSED_RGBA_S3TC_DXT1_EXT
COMPRESSED_RGBA_S3TC_DXT3_ANGLE
COMPRESSED_RGBA_S3TC_DXT5_ANGLE
shader specific stats:
max vertex attribs: 16
max vertex texture image units: 4
num program binary formats: 1
num shader binary formats: 1
max varying vectors: 11
max vertex uniform vectors: 168
max fragment uniform vectors: 64
shader compiler: yes
supported program binary formats:
0x8fc5
supported shader binary formats:
SHADER_BINARY_VIV
No valid surface: EGL failed to allocate resources for the requested operation.
eglMakeCurrent() failed: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a valid surface).
I've noted several things about this. This error appears when it attempts to display information about OpenVG. If I use libOpenVG_3D.so instead of libOpenVG_355.so, I don't get an error but it reports that OpenVG is unaccelerated and the above programs still do not work. If I run the framebuffer version of eglinfo, no error appears and it reports that OpenVG is accelerated as it should be. This could be a red herring but I have noticed from using strace that libOpenVG.so is loaded shortly before the above programs fail. I've looked into the error itself and it maps to a return value of EGL_BAD_ALLOC.
I primarily use a self-built hard float Gentoo system and I have created a flexible gpu-viv-bin-mx6q package that I plan to release when I get this working. I do feel that I know what I'm doing (built Cairo with GLES support, patched Weston as necessary, selected the right Vivante libraries) but obviously there is a lot of scope for error when using Gentoo. I also tried jas-mx's Debian Jessie image that he used in a blog post to demonstrate Weston acceleration. I got exactly the same result but then again, he used the UDOO and he never mentioned trying anything more demanding that weston-simple-egl. Finally, I built fsl-arm-yocto-bsp (dora_3.10.17-1.0.1) using the imx6qsabresd/wayland target, thinking that couldn't possibly fail, but I got the same result yet again!
I did most of this testing using CompuLab's kernel patches rebased onto imx_3.10.17_1.0.1_ga. I have mostly used my own configuration but I did also try CompuLab's default configuration against Gentoo. The latter does not disable anything that isn't already disabled in the Freescale default configuration so I don't believe I am missing anything here. The fact that the framebuffer version of eglinfo seems to work also makes me think this must be a userspace issue.
In terms of Weston versions, I have tried 1.4.0, 1.5.0, 1.5.92 and fsl-arm-yocto-bsp currently uses 1.3.1. Seems we can rule this out.
Even if you don't know what the problem might be, please do comment if you have had success with anything more than just weston-simple-egl, especially if it was on a Utilite. If you wish to try this stuff on a Utilite yourself, I have found that it can't cope with 1080p, seemingly due to some IPU issue. I have to switch it to 720p first but I'll look into that more once I get the above issue resolved.
Nobody? I've had to start looking at the open Etnaviv drivers instead and I think I'm actually closer to success with those. That's not what you want now, is it? :smileywink:
Any luck with EGL on iMX6? Im getting EGL_BAD_ALLOC when calling eglGetDisplay , but on a Riotboard (iMX6 Solo).
A couple more things to add.
Freescale builds Weston with -DEGL_API_WL. At first I thought this was a typo and should have been -DWL_EGL_PLATFORM but now I see that the former also exists. But only in HAL/gc_hal_eglplatform.h. This is only referenced by wayland-viv/gc_wayland_protocol.h. They do look important but neither of these are referenced anywhere else in gpu-viv-bin-mx6q or in Weston either. Surely that makes the -DEGL_API_WL flag useless? I wonder if they are used when building libEGL-wl.so.
I've also noticed the i.MX DRM driver in the kernel staging area. Having used the open Radeon drivers on my desktop, I think this is likely to be the future. I did give it a try, hoping that it would work with the Weston DRM backend and maybe even solve the issue above but it doesn't detect a HDMI connection. Can anyone tell me more about this driver?