Tool/software:
Hi TI
We want to use the AM6254 GPU and found the GPU driver source code in TI's SDK directory: INSTALL_PATH/ti-processor-sdk-linux-am62xx-evm-09.02.01.10/board-support/extra-drivers/ti-img-rogue-driver-23.3.6512818. I compiled the driver source code and obtained pvrsrvkm.ko. The pvrsrvkm.ko module was also successfully loaded. The relevant print logs are as follows:
[ 2.837653] pvrsrvkm: loading out-of-tree module taints kernel. [ 2.850545] PVR_K: 325: Device: fd00000.gpu [ 2.850744] PVR_K: 325: Read BVNC 33.15.11.3 from HW device registers [ 2.850839] PVR_K: 325: RGX Device registered with BVNC 33.15.11.3 [ 2.852054] [drm] Initialized pvr 23.3.6512818 20170530 for fd00000.gpu on minor 1
The output of the lsmod command is as follows:
root@am62xx-evm:~# lsmod Tainted: G pvrsrvkm 1163264 0 - Live 0xffff800000a40000 (O) root@am62xx-evm:~#
The output of the rgx_triangle_test command is as follows:
root@am62xx-evm:~# rgx_triangle_test Connecting to first (0) default pvr device Selected display mode: 1024x600@59 ----------------------- Start ----------------------- Using display type: DRM/KMS Window created with 2 buffers Frame number 0 Frame number 100 Frame number 200 Frame number 300 Frame number 400 Frame number 500 Frame number 600 Frame number 700 Frame number 800 Frame number 900 Total time: 16882ms Mean time per frame: 16899us FPS: 59.2 root@am62xx-evm:~#
The demonstration effect of the rgx_triangle_test command is as follows:
Our project did not use the Wayland/Houston framework or the X11 framework. The output of the eglinfo instruction is as follows:
root@am62xx-evm:~# eglinfo EGL client extensions string: EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_platform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_platform_wayland EGL_KHR_platform_wayland EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless GBM platform: EGL API version: 1.5 EGL vendor string: Mesa Project EGL version string: 1.5 EGL client APIs: OpenGL_ES EGL extensions string: EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_buf_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_image_gl_colorspace EGL_EXT_yuv_surface EGL_IMG_context_priority EGL_KHR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colorspace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_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_partial_update 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_MESA_image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display EGL_IMG_cl_image Configurations: bf lv colorbuffer dp st ms vis cav bi renderable supported id sz l r g b a th cl ns b id eat nd gl es es2 vg surfaces --------------------------------------------------------------------- 0x01 32 0 8 8 8 8 0 0 0 0 0x34325241-- a y win,pb 0x02 32 0 8 8 8 8 0 0 2 1 0x34325241-- a y win,pb 0x03 32 0 8 8 8 8 0 0 4 1 0x34325241-- a y win,pb 0x04 32 0 8 8 8 8 24 8 0 0 0x34325241-- a y win,pb 0x05 32 0 8 8 8 8 24 8 2 1 0x34325241-- a y win,pb 0x06 32 0 8 8 8 8 24 8 4 1 0x34325241-- a y win,pb 0x07 24 0 8 8 8 0 0 0 0 0 0x34325258-- y y win,pb 0x08 24 0 8 8 8 0 0 0 2 1 0x34325258-- y y win,pb 0x09 24 0 8 8 8 0 0 0 4 1 0x34325258-- y y win,pb 0x0a 24 0 8 8 8 0 24 8 0 0 0x34325258-- y y win,pb 0x0b 24 0 8 8 8 0 24 8 2 1 0x34325258-- y y win,pb 0x0c 24 0 8 8 8 0 24 8 4 1 0x34325258-- y y win,pb 0x0d 16 0 5 6 5 0 0 0 0 0 0x36314752-- y y win,pb 0x0e 16 0 5 6 5 0 0 0 2 1 0x36314752-- y y win,pb 0x0f 16 0 5 6 5 0 0 0 4 1 0x36314752-- y y win,pb 0x10 16 0 5 6 5 0 24 8 0 0 0x36314752-- y y win,pb 0x11 16 0 5 6 5 0 24 8 2 1 0x36314752-- y y win,pb 0x12 16 0 5 6 5 0 24 8 4 1 0x36314752-- y y win,pb Wayland platform: error: XDG_RUNTIME_DIR not set in the environment. error: XDG_RUNTIME_DIR not set in the environment. eglinfo: eglInitialize failed Device platform: eglinfo: eglInitialize failed root@am62xx-evm:~#
But when we use the kmscube command, the following error occurs The error message is that EGL configurations cannot be found, but we have already ported dependency libraries such as EGL and OpenGL. And before and after executing the kmscube command, the content displayed in cat/sys/kernel/debug/pvr/status is also different.
root@am62xx-evm:~# cat /sys/kernel/debug/pvr/status Driver Status: OK Device ID: 0:128 Firmware Status: OK Server Errors: 0 WGP Error Count: 0 TRP Error Count: 0 APM Event Count: 0 root@am62xx-evm:~# kmscube -D /dev/dri/card0 [ 41.577338] PVR_K: 357: RGX Firmware image 'rgx.fw.33.15.11.3' loaded [ 41.583422] PVR_K: 357: Shader binary image 'rgx.sh.33.15.11.3' loaded Using display 0x102fbc80 with EGL version 1.5 =================================== EGL information: version: "1.5" vendor: "Mesa Project" client extensions: "EGL_EXT_client_extensions EGL_EXT_device_base EGL_EXT_device_enumeration EGL_EXT_device_query EGL_EXT_pl atform_base EGL_KHR_client_get_all_proc_addresses EGL_KHR_debug EGL_EXT_platform_device EGL_EXT_platform_wayland EGL_KHR_platf orm_wayland EGL_MESA_platform_gbm EGL_KHR_platform_gbm EGL_MESA_platform_surfaceless" display extensions: "EGL_ANDROID_native_fence_sync EGL_EXT_buffer_age EGL_EXT_create_context_robustness EGL_EXT_image_dma_bu f_import EGL_EXT_image_dma_buf_import_modifiers EGL_EXT_image_gl_colorspace EGL_EXT_yuv_surface EGL_IMG_context_priority EGL_K HR_cl_event2 EGL_KHR_config_attribs EGL_KHR_create_context EGL_KHR_fence_sync EGL_KHR_get_all_proc_addresses EGL_KHR_gl_colors pace EGL_KHR_gl_renderbuffer_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_3D_image EGL_KHR_gl_texture_cubemap_image EG L_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_no_config_context EGL_KHR_partial_update 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_MESA_ image_dma_buf_export EGL_MESA_query_driver EGL_WL_bind_wayland_display EGL_IMG_cl_image " =================================== No EGL configs with appropriate attributes. failed to choose config failed to initialize EGL root@am62xx-evm:~# cat /sys/kernel/debug/pvr/status Driver Status: OK Device ID: 0:128 Firmware Status: OK Server Errors: 0 HWR Event Count: 0 CRR Event Count: 0 SLR Event Count: 0 WGP Error Count: 0 TRP Error Count: 0 FWF Event Count: 0 APM Event Count: 1 GPU Utilisation: 0% VM0 2D Utilisation: 0% GEOM Utilisation: 0% 3D Utilisation: 0% CDM Utilisation: 0% root@am62xx-evm:~#
After I configure the Qt environment variables, our application will also report an error saying 'cannot find egl configs':
After I configure the Qt environment variables, our application will also report an error saying 'cannot find egl configs':
I would like to ask TI, what is the reason for the error of not being able to find egl configs, and is it related to me not using the display framework (Wayland/West)? Is the inconsistency in the content viewed by cat/sys/kernel/debug/pvr/status related to the unsuccessful loading of GPU drivers? Please ask TI experts to help me take a look, thank you!