This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: PVR error

Expert 2730 points
Part Number: AM3358


Tool/software: Linux

So I'm trying to get the eglfs to work, but I'm having problems. I'm using the newest SDK 4.3 and I have compiled the pvrsrvkm module. I'm able to load it with ins mod without any problems, but when I try to start the PVR initialisation server I'll get the following error:

root@am335x-evm:~# lsmod                                                                                                                                                                                        
Module                  Size  Used by                                                                                                                                                                           
pvrsrvkm              408859  0                                                                                                                                                                                 
ti_emif_sram            5663  0                                                                                                                                                                                 
ti_am335x_tsc           5965  0                                                                                                                                                                                 
rtc_omap                9662  0                                                                                                                                                                                 
omap_wdt                4634  0                                                                                                                                                                                 
root@am335x-evm:~# pvrsrvctl --start --no-module                                                                                                                                                                
PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]                                                                                                                                                        
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [0, ]                                                                                                                                                   
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [0, ]                                                                                                                                                     
pvrsrvctl: SrvInit failed (already initialized?) (err=PVRSRV_ERROR_INIT_FAILURE)                                                                                                                                
root@am335x-evm:~# eglinfo                                                                                                                                                                                      
PVR:(Error): OpenServices: PVRDRMOpenRender failed [0, ]                                                                                                                                                        
PVR:(Error): PVRSRVConnect: Unable to open connection. [0, ]                                                                                                                                                    
PVR:(Error): Couldn't connect to services [0, ]                                                                                                                                                                 
Unable to initialise egl                                                                                                                                                                                        
    egl error 'EGL_BAD_ALLOC' (0x3003)                        

What am I missing here?

  • Hello JHi,

    You need to stop weston.
    root@am335x-evm:~# /etc/init.d/weston stop

    Best regards,
    Kemal
  • I'm using the base image and there is no weston. I have to use the base one because full image is too big for NAND.

    I have also checked the libraries with ldd:

    root@am335x-evm:/usr/bin# arm-linux-gnueabihf-ldd --root / pvrsrvctl            
            libdrm.so.2 => /usr/lib/libdrm.so.2 (0xdeadbeef)                        
            libm.so.6 => /lib/libm.so.6 (0xdeadbeef)                                
            libc.so.6 => /lib/libc.so.6 (0xdeadbeef)                                
            ld-linux-armhf.so.3 => /lib/ld-linux-armhf.so.3 (0xdeadbeef)            
            libgbm.so.2 => /usr/lib/libgbm.so.2 (0xdeadbeef)                        
            libudev.so.1 => /lib/libudev.so.1 (0xdeadbeef)                          
            libcap.so.2 => /lib/libcap.so.2 (0xdeadbeef)                            
            librt.so.1 => /lib/librt.so.1 (0xdeadbeef)                              
            libpthread.so.0 => /lib/libpthread.so.0 (0xdeadbeef)                    
            libresolv.so.2 => /lib/libresolv.so.2 (0xdeadbeef)                      
            libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xdeadbeef)                        
            libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0xdeadbeef)  
            libffi.so.6 => /usr/lib/libffi.so.6 (0xdeadbeef)                        
            libdrm_omap.so.1 => /usr/lib/libdrm_omap.so.1 (0xdeadbeef)              
            libsrv_init.so.1 => /usr/lib/libsrv_init.so.1 (0xdeadbeef)              
            libsrv_um.so.1 => /usr/lib/libsrv_um.so.1 (0xdeadbeef)                  
            libdl.so.2 => /lib/libdl.so.2 (0xdeadbeef) 

    I did made ldconfig after inserting the libraries.

    And the pvr libraries (am I missing something?)

    ls libpvr* -la
    lrwxrwxrwx    1 root     root            24 Apr 16 14:01 libpvr2d.so -> libpvr2d.so.1.14.3699939
    lrwxrwxrwx    1 root     root            24 Apr 16 14:01 libpvr2d.so.1 -> libpvr2d.so.1.14.3699939
    -rwxr-xr-x    1 root     root         15828 Apr 16 14:01 libpvr2d.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Apr 16 13:52 libpvrDRMWSEGL.so -> libpvrDRMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Apr 16 13:52 libpvrDRMWSEGL.so.1 -> libpvrDRMWSEGL.so.1.14.3699939
    -rwxr-xr-x    1 root     root         16796 Apr 16 13:52 libpvrDRMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Apr 16 13:58 libpvrGBMWSEGL.so -> libpvrGBMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            30 Apr 16 13:58 libpvrGBMWSEGL.so.1 -> libpvrGBMWSEGL.so.1.14.3699939
    -rwxr-xr-x    1 root     root         19492 Apr 16 13:57 libpvrGBMWSEGL.so.1.14.3699939
    lrwxrwxrwx    1 root     root            32 Apr 16 13:58 libpvrws_WAYLAND.so -> libpvrws_WAYLAND.so.1.14.3699939
    lrwxrwxrwx    1 root     root            32 Apr 16 13:58 libpvrws_WAYLAND.so.1 -> libpvrws_WAYLAND.so.1.14.3699939
    -rwxr-xr-x    1 root     root         12600 Apr 16 13:58 libpvrws_WAYLAND.so.1.14.3699939
    
    root@am335x-evm:/usr/lib# cat /etc/powervr.ini 
    [Default]
    WindowSystem=libpvrDRMWSEGL.so
    DefaultPixelFormat=RGB565
    

    modetest works.

  • pvrsrvctl --start --no-module fails and it is not already initialized. What is the dmesg saying, "PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet" or else? Seems you incorrectly compiled the pvrsrvkm.ko. Can you post the output of modinfo pvrsrvkm command and attach your pvrsrvkm.ko?

  • Modinfo:

    root@am335x-evm:/lib/modules/4.9.69-g9ce43c71ae/extra# modinfo pvrsrvkm.ko                                                 
    filename:       /lib/modules/4.9.69-g9ce43c71ae/extra/pvrsrvkm.ko                                                          
    license:        Dual MIT/GPL                                                                                               
    author:         Imagination Technologies Ltd. <gpl-support@imgtec.com>                                                     
    license:        Dual MIT/GPL                                                                                               
    author:         Imagination Technologies Ltd. <gpl-support@imgtec.com>                                                     
    srcversion:     533BB7E5866E52F63B9ACCB                                                                                    
    alias:          of:N*T*Cti,dra7-sgx544C*                                                                                   
    alias:          of:N*T*Cti,dra7-sgx544                                                                                     
    depends:                                                                                                                   
    vermagic:       4.9.69-g9ce43c71ae preempt mod_unload modversions ARMv7 p2v8                                               
    parm:           gPVRDebugLevel:Sets the level of debug output (default 0x7) (uint)

    dmesg:

    dmesg | grep -i pvr                                                 
    [   98.511829] pvrsrvkm: loading out-of-tree module taints kernel
    dmesg | grep -i sgx                                                 
    [    0.000000] AM335X ES2.1 (sgx neon)

    pvrsrvkm.ko.zip

  • See this:
    alias: of:N*T*Cti,dra7-sgx544C*
    alias: of:N*T*Cti,dra7-sgx544

    You built it for dra7-sgx544, not for am3352-sgx530.

  • How can I build the correct one? I compiled the ti-sgx-ddk-km-1.14.3699939/eurasia_km/eurasiacon/build/linux2/omap_linux
  • By defining TARGET_PRODUCT=ti335x
  • Thanks! Now I can load it and eglinfo works also.