Hello,
I am trying to run some Qt example applications using OpenGL (gles2) on the am335x StarterKit. These run fine with a resolution up to 1920x1080. But our application needs the LCD controller to be configured for 2048x2040. I have that resolution also working when not using OpenGL. Now, when I launch an OpenGL application with the 2048x2040 resolution, it fails with the following error:
root@am335x-evm:~# /usr/share/qt5/examples/opengl/2dpainting/2dpainting -platform eglfs
PVR: Hint: Setting ParamBufferSize to 33554432
PVR: Hint: Setting WindowSystem to libpvrDRMWSEGL_FRONT.so
PVR:(Error): OpenServices: Cannot open device driver /dev/omapdrm_pvr. [140, /pvr_bridge_u.c]
PVR:(Error): PVRSRVConnect: Unable to open connection. [361, /bridged_pvr_glue.c]
Could not initialize egl display
Cannot initialize PVR2D contex
Running the same command with strace gives the following output, which suggest a memory allocation problem when trying to open omapdrm_pvr
...
open("/usr/lib/libpvr2d.so.1", O_RDONLY|O_CLOEXEC) = 5
read(5, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\10\30\0\0004\0\0\0"..., 512) = 512
fstat64(5, {st_mode=S_IFREG|0644, st_size=147145, ...}) = 0
mmap2(NULL, 50288, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 5, 0) = 0xb408a000
mprotect(0xb408f000, 28672, PROT_NONE)  = 0
mmap2(0xb4096000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 5, 0x4000) = 0xb4096000
close(5)                                = 0
open("/dev/omapdrm_pvr", O_RDWR)        = -1 ENOMEM (Cannot allocate memory)
write(2, "PVR:(Error): OpenServices: Canno"..., 94PVR:(Error): OpenServices: Cannot open device driver /dev/omapdrm_pvr. [140, /pvr_bridge_u.c]
) = 94
write(2, "PVR:(Error): PVRSRVConnect: Unab"..., 82PVR:(Error): PVRSRVConnect: Unable to open connection. [361, /bridged_pvr_glue.c]
) = 82
...
Here is the output of the gfx_check.sh script:
WSEGL settings
[default]
ParamBufferSize=33554432
WindowSystem=libpvrDRMWSEGL_FRONT.so
DisableHWTQTextureUpload=1
------
ARM CPU information
processor    : 0
model name    : ARMv7 Processor rev 2 (v7l)
BogoMIPS    : 274.24
Features    : half thumb fastmult vfp edsp thumbee 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        : 0000000000000000
------
SGX driver information
Version SGX_DDK_Linux_CustomerTI sgxddk 19 1.9@2253347 (release) omap335x_linux
System Version String: None
------
Framebuffer settings
mode "2048x2040"
    geometry 2048 2040 2048 2040 32
    timings 0 0 0 0 0 0 0
    accel true
    rgba 8/16,8/8,8/0,0/0
endmode
Frame buffer device information:
    Name        : 
    Address     : 0x8d100000
    Size        : 16711680
    Type        : PACKED PIXELS
    Visual      : TRUECOLOR
    XPanStep    : 1
    YPanStep    : 1
    YWrapStep   : 0
    LineLength  : 8192
    Accelerator : No
------
Rotation settings
0
------
Kernel Module information
Module                  Size  Used by
ipv6                  306868  24 
cryptodev              33612  0 
arc4                    1587  2 
hid_generic              901  0 
usbmouse                2640  0 
wl12xx                 58126  0 
usbhid                 28525  0 
wlcore                180472  1 wl12xx
mac80211              358155  2 wl12xx,wlcore
cfg80211              218405  2 mac80211,wlcore
musb_dsps               7807  0 
musb_hdrc              69089  1 musb_dsps
udc_core               11604  1 musb_hdrc
joydev                  9168  0 
usbcore               190325  3 musb_hdrc,usbhid,usbmouse
evdev                  10085  0 
snd_soc_evm             5106  0 
pm33xx                  4633  0 
omapdrm_pvr           335287  0 
wlcore_sdio             6142  0 
omap_rng                4470  0 
lis3lv02d_i2c           3245  0 
rng_core                7660  2 omap_rng
lis3lv02d              15679  1 lis3lv02d_i2c
snd_soc_tlv320aic3x    41117  1 
input_polldev           4559  1 lis3lv02d
musb_am335x             1240  0 
rtc_omap                7578  1 
omap_wdt                4347  0 
ti_am335x_tsc           5415  0 
ti_am335x_tscadc        5622  1 ti_am335x_tsc
gpio_keys               8092  0 
leds_gpio               3445  0 
------
Boot settings
console=ttyO0,115200n8 quiet consoleblank=0 omapfb.debug=y drm.debug=0x3f vram=32M omapfb.vram=0:32M root=/dev/nfs nfsroot=172.29.4.89:/export/rootfs,nolock rw ip=dhcp
------
Linux Kernel version
Linux am335x-evm 4.1.13-g8dc6617 #3 PREEMPT Wed Mar 2 18:32:18 CET 2016 armv7l GNU/Linux
So my question is: what needs to be done to be able to allocate enough memory to support opengl with a 2048x2040 resolution?
Regards,
Johann
 
				 
		 
					 
                           
				 
				 
				