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.

Facing an issue with PVR.



Hi,

I'm trying to use ducati codecs and SGX based video sinks on a non-debian based distribution. I followed the steps mentioned in the post.

http://e2e.ti.com/support/omap/f/849/p/249986/875729.aspx#875729

I'm facing issue with PVR modules.

Log when  X is started:

[2188772.081] (II) Loading sub module "omap_pvr"                                                    
[2188772.081] (II) LoadModule: "omap_pvr"                                                           
[2188772.081] (II) Loading /usr/lib/xorg/modules/drivers/omap_pvr_drv.so                            
[2188772.082] (II) Module omap_pvr: vendor="X.Org Foundation"                                       
[2188772.082]   compiled for 1.11.3, module version = 0.83.0                                        
[2188772.082]   Module class: X.Org Video Driver                                                    
[2188772.082]   ABI class: X.Org Video Driver, version 11.0                                         
[2188772.082] (II) OMAP(0): Loaded the omap_pvr sub-module                                          
[2188772.082] (--) Depth 24 pixmap format is 32 bpp                                                 
[2188772.083] (II) OMAP(0): Initializing the "omap_pvr" sub-module ...                              
[2188772.083] PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]
[2188772.094] PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]
[2188772.094] (EE) Couldn't get PVR Services status                                                 
[2188772.105] PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]
[2189214.830] (II) LoadModule: "omap_pvr"                                                                                       
[2189214.831] (II) Loading /usr/lib/xorg/modules/drivers/omap_pvr_drv.so                                                        
[2189214.831] (II) Module omap_pvr: vendor="X.Org Foundation"                                                                   
[2189214.832]   compiled for 1.11.3, module version = 0.83.0                                                                   
[2189214.832]   Module class: X.Org Video Driver                                                                                              
[2189214.832]   ABI class: X.Org Video Driver, version 11.0                                                                                   
[2189214.832] (II) OMAP(0): Loaded the omap_pvr sub-module                                                                                    
[2189214.832] (--) Depth 24 pixmap format is 32 bpp                                                                            
[2189214.832] (II) OMAP(0): Initializing the "omap_pvr" sub-module ...                                                         
[2189214.832] PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]                            
[2189214.844] PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]                            
[2189214.844] (EE) Couldn't get PVR Services status                                                                             
[2189214.854] PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]                       
[2189214.854] PVR:(Error): OpenServices: drmOpen failed [120, /pvr_bridge_u.c]                                                 
[2189214.854] PVR:(Error): PVRSRVConnect: Unable to open connection. [361, /bridged_pvr_glue.c]                                
[2189214.854] (EE) OMAP(0): ERROR: PVR2DCreateDeviceContext failed                                                             
[2189214.855] (II) OMAP(0): Could not initialize the "omap_pvr" sub-module                                                     
[2189214.855] (II) OMAP(0): Soft EXA mode                                                                                       
[2189214.855] (II) EXA(0): Driver allocated offscreen pixmaps                                                                   
[2189214.855] (II) EXA(0): Driver registered support for the following operations:                                              
[2189214.855] (II)         Solid                                                                                                
[2189214.855] (II)         Copy                                                                                                
[2189214.855] (II)         Composite (RENDER acceleration)                                                                     
[2189214.855] (II) OMAP(0): [DRI2] Setup complete                                                                               
[2189214.855] (II) OMAP(0): [DRI2]   DRI driver: omap                                                                           
[2189214.855] (EE) OMAP(0): ERROR: Could not initialize XV                                                                      
[2189214.855] (==) OMAP(0): Backing store disabled                                                                             
[2189214.855] (==) OMAP(0): Silken mouse enabled                                                                               
[2189214.855] (II) OMAP(0): HW cursor initialized                                                                          
[2189214.931] (II) OMAP(0): RandR 1.2 enabled, ignore the following RandR disabled message.                                    
[2189214.931] (WW) OMAP(0): WARNING: rotation not supported by XF86_CRTC_VERSION version: 3                                    
[2189214.932] (==) OMAP(0): DPMS enabled                                         

On pvrsrvinit:

# pvrsrvinit
PVR:(Warning): PVRDRMSetFD: could not get plugin ioctl base: -22 [69, /pvr_bridge_u.c]
PVR:(Error): OpenServices: drmOpen failed [120, /pvr_bridge_u.c]
PVR:(Error): PVRSRVInitSrvConnect: PVRSRVConnect failed [2569, /bridged_pvr_glue.c]
PVR:(Error): SrvInit: PVRSRVInitSrvConnect failed (4) [37, /srvinit.c]
PVR:(Error): main: SrvInit failed (4) [47, /pvrsrvinit.c]

I've attached the complete log Xorg.0.log

5468.Xorg.0.log

Can you please help me with what I'm missing?

Thanks in advance,

Carol

  • Hi Carol.

    I too setup the graphics stack on a non-debian target.  It was a bit of a chore, especially getting the various packages to cross-compile properly.

    From the "could not get plugin ioctl base" error, it looks like drmCommandWriteRead() is failing.  I'd add debugging to that routine.  I don't recall if it is the default or not, but drmMsg() can send debugging to Xorg.0.log

    drmCommandWriteRead() is in libdrm.  Since you are in a non-debian environment, I'm guessing that you are compiling libdrm from source rather than using TI's binary package.  You need to be building libdrm (and a number of other packages) with the TI patches that are in the GLP release.  The stock libdrm will not work.

    Also, make sure your kernel is compiled with CONFIG_DRM and CONFIG_DRM_OMAP turned on.

    Regards,

        Steve

  • Hi Steve,

    Thank you for your quick reply.

    Actually the module " omapdrm_pvr.ko "  wasn't  loaded. 

    I did "modprobe omapdrm_pvr.ko" and I was able to run pvrsrvinit and start X without any error.

    ==========================================================

    [2194156.693] (II) Loading sub module "omap_pvr"
    [2194156.693] (II) LoadModule: "omap_pvr"
    [2194156.694] (II) Loading /usr/lib/xorg/modules/drivers/omap_pvr_drv.so
    [2194156.695] (II) Module omap_pvr: vendor="X.Org Foundation"
    [2194156.695]   compiled for 1.11.3, module version = 0.83.0
    [2194156.695]   Module class: X.Org Video Driver
    [2194156.695]   ABI class: X.Org Video Driver, version 11.0
    [2194156.695] (II) OMAP(0): Loaded the omap_pvr sub-module
    [2194156.695] (--) Depth 24 pixmap format is 32 bpp
    [2194156.695] (II) OMAP(0): Initializing the "omap_pvr" sub-module ...
    [2194156.696] PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
    [2194156.747] (II) OMAP(0): PVR EXA mode
    [2194156.748] (II) EXA(0): Driver allocated offscreen pixmaps
    [2194156.748] (II) EXA(0): Driver registered support for the following operations:
    [2194156.748] (II)         Solid
    [2194156.748] (II)         Copy
    [2194156.748] (II)         Composite (RENDER acceleration)
    [2194156.748] (II) OMAP(0): Successfully initialized the "omap_pvr" sub-module
    [2194156.748] (II) OMAP(0): [DRI2] Setup complete
    [2194156.748] (II) OMAP(0): [DRI2]   DRI driver: omap 
    [2194156.748] (II) OMAP(0): Initialized XV

    =========================================================================

    I have downloaded libdrm and other packages from the site https://launchpad.net/~tiomap-dev/+archive/release. I have included those packages in the buildroot  to make the compilation simpler.

    I'm still facing the "could not get plugin ioctl base" issue, but only when I'm trying to use the ducati plugins.

    libdce.c:460:   init    error: could not get plugin ioctl base: -22
    ERROR: Pipeline doesn't want to pause.

    Is libdrm the root cause ?

    Thanks in advance,

    Carol

  • Hi Carol.

    I used the packages in the GLP release, but they are just a snapshot of the ones on launchpad.  If you are not cross-compiling you won't run into the issues that I did, such as Mesa wanting to use the same compiler for building both host tools and target libraries (ie, both x86 and ARM binaries).  Perhaps buildroot simplifies this compared to ptxdist which I used.

    "could not get plugin ioctl base" means that the routine I mentioned earlier -- drmCommandWriteRead() -- is failing.  And yes, that is in libdrm.  It would not surprise me to find out that it is something external to libdrm, such as a DRM kernel ioctl, that is failing, but libdrm is the start.

    Since it is libdce.c that is failing, have you got CONFIG_DRM_OMAP_DCE on in your kernel config?  Is the Ducati firmware loaded during boot?

    Regards,

        Steve

  • Hi Steve,

    You are right, ducati firmware wasn't loaded. The link to ti-firmware-ipu-dce.xem3 created using  alternatives system ( used in the script 'ti-firmware-ipu-dce.postinst') was not right. Thanks a lot for pointing that out.

    I'm not facing the 'could not get plugin ioctl base' issue now.

    Log:

    # modprobe omap_rpmsg_resmgr
    # modprobe rpmsg_resmgr_common
    # modprobe omap_remoteproc
    [   34.336181] rproc remoteproc0: dsp_c0 is available
    [   34.341247] rproc remoteproc0: Note: remoteproc is still under development and considered experimental.
    [   34.351135] rproc remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [   34.363098] rproc remoteproc1: ipu_c0 is available
    [   34.368225] rproc remoteproc1: Note: remoteproc is still under development and considered experimental.
    [   34.378143] rproc remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    # [   36.623870] rproc remoteproc1: powering up ipu_c0
    [   36.655639] rproc remoteproc1: Booting fw image ducati-m3-core0.xem3, size 3997735
    [   36.663787] omap-iommu omap-iommu.1: ipu: version 2.1
    [   36.945495] rproc remoteproc1: remote processor ipu_c0 is now up
    [   36.954254] virtio_rpmsg_bus virtio0: rpmsg host is online
    [   36.960144] rproc remoteproc1: registered virtio0 (type 7)
    [   37.409210] omap-rproc omap-rproc.1: received echo reply from ipu_c0
    [   37.416076] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x32
    [   37.425170] virtio_rpmsg_bus virtio0: creating channel rpmsg-dce addr 0x2a
    [   37.432586] virtio_rpmsg_bus virtio0: creating channel rpmsg-client-sample addr 0x33
    [   38.387573] rproc remoteproc0: error -2 requesting firmware tesla-dsp.xe64T
    [   40.445281] wl12xx: ERROR could not get nvs file ti-connectivity/wl1271-nvs.bin: -2
    [   40.454895] ieee80211 phy0: Failed to initialize wep: -2
    [   40.464782] wl12xx: loaded

    # modprobe omaprpc
    [  107.315612] omaprpc: module is from the staging directory, the quality is unknown, you have been warned.
    [  107.326416] OMAPRPC: Registration of OMAPRPC rpmsg service returned 0! debug=0
    # modprobe rpmsg_omx
    # modprobe omapdce
    [  123.147827] omapdce: module is from the staging directory, the quality is unknown, you have been warned.
    [  123.159057] omap-iommu omap-iommu.1: ipu: version 2.1
    # lsmod
    Module                  Size  Used by    Tainted: G  
    omapdce                22332  0
    rpmsg_omx               6642  0
    omaprpc                14927  0
    arc4                     985  0
    omap_remoteproc         4755  1
    rpmsg_resmgr_common     2195  0
    remoteproc             19102  3 rpmsg_omx,omap_remoteproc,rpmsg_resmgr_common
    omap_rpmsg_resmgr       7118  0
    rpmsg_resmgr            4806  2 rpmsg_resmgr_common,omap_rpmsg_resmgr
    virtio_rpmsg_bus        8133  4 omapdce,rpmsg_omx,omaprpc,rpmsg_resmgr
    wl12xx                  9960  0
    wlcore                128046  1 wl12xx
    mac80211              341042  1 wlcore
    cfg80211              141236  2 wlcore,mac80211
    wlcore_sdio             2741  0

    I'm able to play videos using ducati codecs and SGX based video sinks. Thanks a ton, Steve.

    Regards,

    Carol