[Mesa-dev] Unable to find a matching EGL config on Wayland

Devashish Tiwari devashish at cdot.in
Fri Jan 31 06:17:23 UTC 2020


Hello,

Ihave built a simple application using QT & SDL that has a buttonwhich opens a preview on clicking, whenever camera (system/usb) isconnected to the EVM.

Myapp successfully receives correct parameters related to camera(resolution, frame rate, frame format) and I have verified it usingdebug prints. However, when I click on preview button, it crashes andthrows error related to EGL.

Onexecuting it with gdb, I found out that it is not able to get a validEGL configuration. The eglChooseConfig function (in SDL_egl.c)doesn't find a matching EGL config and it fails to create a surfaceand open the preview.

Also,Ido not get any "EGL 1.4 Initialised" prints whenmy app executes. This print, on the contrary, is visible when I runOGLES2ChameleonManin/usr/bin/SGX/demos/Wayland.

Ondigging further, I found that the "eglinfo" commanddisplays the egl configurations on the terminal.

However,when it returns EGL_BAD_ALLOC on my EVM, if I run it without stoppingweston. It runs successfully only after stopping weston. I amassuming this is the reason why my application is not able to find amatching EGL config because it runs over weston.

-----------------------------------------------------------------------------------

root at am57xx-evm:/mnt# eglinfo

eglGetConfigs():======================================================================**********************************EGL config number: 0EGL vendor string: Imagination TechnologiesEGL version string: 1.4 build 1.14 at 3699939 (MAIN)EGL extensions: EGL_IMG_client_api_ogl EGL_KHR_image EGL_KHR_image_base 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_context_priority EGL_IMG_hibernate_process EGL_IMG_image_plane_attribs EGL_KHR_surfaceless_context EGL_KHR_wait_sync EGL_KHR_create_context EGL_WL_bind_wayland_display EGL_EXT_image_dma_buf_importEGL client APIs are: OpenGL_ES EGL config Attributes:EGL_CONFIG_ID = 0x1 EGL_BUFFER_SIZE = 0x20 EGL_RED_SIZE = 0x8 EGL_GREEN_SIZE = 0x8 EGL_BLUE_SIZE = 0x8 EGL_LUMINANCE_SIZE = 0x0 EGL_ALPHA_SIZE = 0x8 EGL_ALPHA_MASK_SIZE = 0x0 EGL_BIND_TO_TEXTURE_RGB = 0x1 EGL_BIND_TO_TEXTURE_RGBA = 0x1 EGL_COLOR_BUFFER_TYPE = 0x308e EGL_CONFIG_CAVEAT =
  0x3038 EGL_CONFORMANT = 0x1 EGL_DEPTH_SIZE = 0x18 EGL_LEVEL = 0x0 EGL_MAX_PBUFFER_WIDTH = 0x1000 EGL_MAX_PBUFFER_HEIGHT = 0x1000 EGL_MAX_PBUFFER_PIXELS = 0x1000000 EGL_MAX_SWAP_INTERVAL = 0xa EGL_MIN_SWAP_INTERVAL = 0x1 EGL_NATIVE_RENDERABLE = 0x0 EGL_NATIVE_VISUAL_ID = 0x0 EGL_NATIVE_VISUAL_TYPE = 0x0 EGL_RENDERABLE_TYPE = 0x1 EGL_OPENGL_ES_BIT EGL_SAMPLE_BUFFERS = 0x0 EGL_SAMPLES = 0x0 EGL_STENCIL_SIZE = 0x8 EGL_SURFACE_TYPE = 0x5 EGL_PBUFFER_BIT EGL_WINDOW_BIT EGL_TRANSPARENT_TYPE = 0x3038 EGL_TRANSPARENT_RED_VALUE = 0x0 EGL_TRANSPARENT_GREEN_VALUE = 0x0 EGL_TRANSPARENT_BLUE_VALUE = 0x0 Creating Window surface..PVR:(Error): WSEGL_CreateWindowDrawable: Couldn't set CRTC: Permission denied [0, ]Unable to create surfaceegl error 'EGL_BAD_ALLOC' (0x3003)

-----------------------------------------------------------------------------------

Doesanyone has any idea about this strange behaviour?

Also,Is there any way to run eglinfocommandwithout stopping weston?Because I think my application is pollingavailable egl configurations at the run time, but is notreturning anything as it runs over weston.

The ldd of my application returns:

-----------------------------------------------------------------------------------

root at am57xx-evm:/mnt# ldd cam_preview 
linux-vdso.so.1 (0xbec50000)
libpjsua.so.2 => /usr/local/PJSIP_ONLY/libpjsua.so.2 (0xb6e6e000)
libpjsip-ua.so.2 => /usr/local/PJSIP_ONLY/libpjsip-ua.so.2 (0xb6e48000)
libpjsip-simple.so.2 => /usr/local/PJSIP_ONLY/libpjsip-simple.so.2 (0xb6e28000)
libpjsip.so.2 => /usr/local/PJSIP_ONLY/libpjsip.so.2 (0xb6dda000)
libpjmedia-codec.so.2 => /usr/local/PJSIP_ONLY/libpjmedia-codec.so.2 (0xb6dba000)
libpjmedia-videodev.so.2 => /usr/local/PJSIP_ONLY/libpjmedia-videodev.so.2 (0xb6d9e000)
libpjmedia-audiodev.so.2 => /usr/local/PJSIP_ONLY/libpjmedia-audiodev.so.2 (0xb6d88000)
libpjmedia.so.2 => /usr/local/PJSIP_ONLY/libpjmedia.so.2 (0xb6d12000)
libpjnath.so.2 => /usr/local/PJSIP_ONLY/libpjnath.so.2 (0xb6cdf000)
libpjlib-util.so.2 => /usr/local/PJSIP_ONLY/libpjlib-util.so.2 (0xb6cab000)
libsrtp.so.2 => /usr/local/PJSIP_ONLY/libsrtp.so.2 (0xb6c87000)
libresample.so.2 => /usr/local/PJSIP_ONLY/libresample.so.2 (0xb6c6a000)
libgsmcodec.so.2 => /usr/local/PJSIP_ONLY/libgsmcodec.so.2 (0xb6c4c000)
libspeex.so.2 => /usr/local/PJSIP_ONLY/libspeex.so.2 (0xb6c13000)
libilbccodec.so.2 => /usr/local/PJSIP_ONLY/libilbccodec.so.2 (0xb6bf4000)
libg7221codec.so.2 => /usr/local/PJSIP_ONLY/libg7221codec.so.2 (0xb6bd4000)
libyuv.so.2 => /usr/local/PJSIP_ONLY/libyuv.so.2 (0xb6ba5000)
libpj.so.2 => /usr/local/PJSIP_ONLY/libpj.so.2 (0xb6b77000)
libopenh264.so.5 => /usr/local/PJSIP_ONLY/libopenh264.so.5 (0xb6a94000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0xb6978000)
libuuid.so.1 => /lib/libuuid.so.1 (0xb6964000)
librt.so.1 => /lib/librt.so.1 (0xb694e000)
libasound.so.2 => /usr/lib/libasound.so.2 (0xb686a000)
libSDL2-2.0.so.0 => /usr/local/SDL_ONLY/libSDL2-2.0.so.0 (0xb6783000)
libv4l2.so.0 => /usr/lib/libv4l2.so.0 (0xb6767000)
libQt5Widgets.so.5 => /usr/lib/libQt5Widgets.so.5 (0xb625e000)
libQt5Gui.so.5 => /usr/lib/libQt5Gui.so.5 (0xb5d71000)
libQt5Core.so.5 => /usr/lib/libQt5Core.so.5 (0xb5887000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb5863000)
libGLESv2.so.2 => /usr/lib/libGLESv2.so.2 (0xb57e8000)
libQt5X11Extras.so.5 => /usr/local/PJSIP_ONLY/libQt5X11Extras.so.5 (0xb6f30000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xb56cb000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb569b000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xb5688000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb5673000)
libm.so.6 => /lib/libm.so.6 (0xb55f7000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb55ce000)
libc.so.6 => /lib/libc.so.6 (0xb54e1000)
/lib/ld-linux-armhf.so.3 (0xb6f16000)
libdl.so.2 => /lib/libdl.so.2 (0xb54ce000)
libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0xb54b4000)
libpvr_wlegl.so.1 => /usr/lib/libpvr_wlegl.so.1 (0xb54a3000)
libwayland-cursor.so.0 => /usr/lib/libwayland-cursor.so.0 (0xb548c000)
libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0xb5444000)
libv4lconvert.so.0 => /usr/lib/libv4lconvert.so.0 (0xb53c0000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb537c000)
libsrv_um.so.1 => /usr/lib/libsrv_um.so.1 (0xb5338000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0xb52ff000)
libz.so.1 => /lib/libz.so.1 (0xb52db000)
libicui18n.so.59 => /usr/lib/libicui18n.so.59 (0xb50db000)
libicuuc.so.59 => /usr/lib/libicuuc.so.59 (0xb4f71000)
libicudata.so.59 => /usr/lib/libicudata.so.59 (0xb364c000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0xb362f000)
libgbm.so.2 => /usr/lib/libgbm.so.2 (0xb361c000)
libudev.so.1 => /lib/libudev.so.1 (0xb3600000)
libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0xb35e3000)
libdrm_omap.so.1 => /usr/lib/libdrm_omap.so.1 (0xb35d0000)
libffi.so.6 => /usr/lib/libffi.so.6 (0xb35b9000)
libIMGegl.so.1 => /usr/lib/libIMGegl.so.1 (0xb3593000)
libpvr2d.so.1 => /usr/lib/libpvr2d.so.1 (0xb357f000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb355e000)
libcap.so.2 => /lib/libcap.so.2 (0xb3549000)
libdbm.so.1 => /usr/lib/libdbm.so.1 (0xb3537000)

---------------------------------------------------------------------------------------------

--

Thanks & Regards,

Devashish Tiwari 

CDOT India

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20200131/27bccdb1/attachment.htm>


More information about the mesa-dev mailing list