I have a custom board with an AM3358 for use in a mobile graphics/AR application. I also have a Beaglebone Black for development purposes. Currently I am trying to run an example OpenGL ES application on the BBB to validate the graphics drivers and start development of a custom OpenGL ES application. I have installed the latest TI Processors Linux (am335x-evm-linux-06.03.00.106.img) by using the Instructions for creating SD card on Windows (Processors SDK Linux section 1.1.2).
After making the changes described at Processors SDK Linux section 3.9.11 I can see the Matrix GUI home screen on an attached HDMI LCD. I can also display a static test pattern using kmstest -f RG16.
Both kmscube and OGLES2ChameleonMan / related demos fail with messages related to EGL initialization. Full output, as well as baseline SGX debug info referencing Processors SDK Linux section 3.8, are pasted below.
kmscube outputs:
### Display [0]: CRTC = 29, Connector = 31, format = 0x36314752
Mode chosen [800x480] : Clock => 29570, Vertical refresh => 60, Type => 72
Horizontal => 800, 816, 896, 992, 0
Vertical => 480, 481, 484, 497, 0
### Primary display => ConnectorId = 31, Resolution = 800x480
Using display 0x37de0 with EGL version 1.5
EGL Version "1.5"
EGL Vendor "Mesa Project"
EGL Extensions "EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_IMG_cl_image EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_reusable_sync EGL_KHR_surfaceless_context EGL_EXT_pixel_format_float EGL_KHR_wait_sync EGL_MESA_configless_context EGL_MESA_drm_image EGL_WL_bind_wayland_display "
failed to create egl surface
failed to initialize EGL
Also, trying /usr/bin/SGX/demos/DRM/OGLES2ChameleonMan gives:
display failed to set mode: Invalid argument
display failed to set mode: Invalid argument
display failed to set mode: Invalid argument
display failed to set mode: Invalid argument
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glClear: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawElements: Can't prepare to draw [0, ]
PVRImageDrawableGetNativeInfo: Image get buffers call failed
PVR:(Error): KEGLGetDrawableParameters: Couldn't recreate drawable
[0, ]
PVR:(Error): PrepareToDraw: Invalid drawable [0, ]
PVR:(Error): glDrawArrays: Can't prepare to draw [0, ]
eglSwapBuffers failed
Segmentation fault (core dumped)
Section 3.8 commands output:
root@am335x-evm:~# cat /etc/powervr.ini
[default]
DefaultPixelFormat=RGB565
root@am335x-evm:~# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 796.91
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2
Hardware : Generic AM33XX (Flattened Device Tree)
Revision : 0000
Serial : 4219BBBK06C8
root@am335x-evm:~# cat /proc/pvr/version
Version SGX_DDK_Linux_XOrg sgxddk 1.17@4948957 (release) omap_linux
System Version String: SGX revision = 125
root@am335x-evm:~# fbset -i
mode "800x480"
geometry 800 480 800 480 16
timings 0 0 0 0 0 0 0
accel true
rgba 5/11,6/5,5/0,0/0
endmode
Frame buffer device information:
Name : DRM emulated
Address : (nil)
Size : 768000
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 1
YPanStep : 1
YWrapStep : 0
LineLength : 1600
Accelerator : No
root@am335x-evm:~# cat /sys/class/graphics/fb0/rotate
0
root@am335x-evm:~# lsmod
Module Size Used by
pvrsrvkm 401408 0
xfrm_user 32768 2
xfrm4_tunnel 16384 0
ipcomp 16384 0
xfrm_ipcomp 16384 1 ipcomp
esp4 20480 0
ah4 16384 0
af_key 36864 0
xfrm_algo 16384 5 xfrm_user,esp4,ah4,af_key,xfrm_ipcomp
usb_f_acm 16384 1
u_serial 20480 3 usb_f_acm
usb_f_ecm 16384 1
g_multi 16384 0
usb_f_mass_storage 45056 2 g_multi
usb_f_rndis 28672 2 g_multi
u_ether 20480 3 usb_f_ecm,g_multi,usb_f_rndis
libcomposite 53248 5 usb_f_ecm,usb_f_acm,usb_f_mass_storage,g_multi,usb_f_rndis
usbhid 28672 0
pru_rproc 24576 0
irq_pruss_intc 16384 1 pru_rproc
pruss 16384 1 pru_rproc
musb_dsps 20480 0
musb_hdrc 106496 1 musb_dsps
phy_am335x 16384 2
udc_core 28672 8 usb_f_ecm,usb_f_acm,usb_f_mass_storage,u_serial,musb_hdrc,u_ether,usb_f_rndis,libcomposite
phy_generic 16384 1 phy_am335x
phy_am335x_control 16384 1 phy_am335x
snd_soc_simple_card 16384 0
snd_soc_simple_card_utils 16384 1 snd_soc_simple_card
pm33xx 16384 0
wkup_m3_ipc 16384 1 pm33xx
wkup_m3_rproc 16384 1
remoteproc 49152 3 pru_rproc,wkup_m3_rproc,wkup_m3_ipc
omap_aes_driver 24576 0
crypto_engine 16384 1 omap_aes_driver
omap_crypto 16384 1 omap_aes_driver
omap_sham 28672 0
ti_emif_sram 16384 1 pm33xx
pruss_soc_bus 16384 0
at24 20480 0
rtc_omap 20480 2
omap_wdt 16384 0
musb_am335x 16384 0
sch_fq_codel 20480 3
uio_module_drv 16384 0
uio 20480 1 uio_module_drv
ftdi_sio 45056 0
usbserial 36864 1 ftdi_sio
usbcore 217088 4 usbhid,ftdi_sio,musb_hdrc,usbserial
usb_common 16384 6 phy_am335x,udc_core,musb_hdrc,libcomposite,musb_dsps,usbcore
cryptodev 49152 0
root@am335x-evm:~# cat /proc/cmdline
console=ttyO0,115200n8 root=PARTUUID=55c1f8d5-02 rw rootfstype=ext4 rootwait
root@am335x-evm:~# uname -a
Linux am335x-evm 4.19.94-gbe5389fd85 #1 PREEMPT Sun Apr 19 03:43:09 UTC 2020 armv7l GNU/Linux