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.

AM5728: Using libdce with Qt

Part Number: AM5728

We use PSDK Linux 6.2 and AM5728.

We want to make a media play/rec application using libdce with Qt (eglfs_kms).

Because of our required specifications, we could not use QMediaPlayer, also gstreamer.

We experienced failures of dce_init() with Qt + eglfs_kms (we saw video_graphics_demo for reference).

Is there any solutions?

  • Hi Aoki,

    Gsteamer based encoding and decoding has been demonstrated with libdce as userspace library to invoke IVAHD.

    We don't have enough Qt applications for multimedia players.

    Can you share what is the libdce error seen in your system?

    Thanks

    RamPrasad

  • Hi Ram-san,

    Thanks for your prompt reply.

    When we initialize DCE using dce_init() in Qt App, it must return an invalid device handle.

    We fail to create an omap buffer object using the handle.

    We guess that Qt keeps omap drm, so dce_init() fails to open it.

    Regards,

    Eiji Aoki

  • Hi Aoki san,

    Can you please let me know the SDK version used?

    Also check if you can see /dev/rpmsg-dce node in your target and 

    cat /sys/kernel/debug/remoteproc/remoteproc1/trace0  log

    Thanks

    Ram

  • Hi Ram-san,

    We use ti-processor-sdk-linux-am57xx-evm-06.02.00.81.

    We can see /dev/rpmsg-dce node. And I attached the log.

    Also we can use libdce normally without Qt + eglfs_kms.

    Thanks.

    Eiji Aoki

    % ./MainApp -platform eglfs
    ../git/libdce_linux.c:70:       dce_init        ERROR: Failed OmapDrm_FD > 0 error val -7 [ 1180.357744] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    ../git/libdce.c:485:    Engine_open     ERROR: Failed engine_open_msg != NULL error val -2 Engine open failed
    ^C
    % cat /sys/kernel/debug/remoteproc/remoteproc0/trace0
    [0][      0.000] 17 Resource entries at 0x3000
    [0][      0.000] Watchdog enabled: TimerBase = 0x6803e000 SMP-Core = 0 Freq = 20000000
    [0][      0.000] Watchdog enabled: TimerBase = 0x68036000 SMP-Core = 1 Freq = 20000000
    [0][      0.000] Watchdog_restore registered as a resume callback
    [0][      0.000] IPU2 starting..
    [0][      0.000] 
    [0][      0.000] 
    [0][      0.000]  **** IPUMM VERSION INFO **** 
    [0][      0.000] 
    [0][      0.000] Compile DATE Sep 15 2015 TIME 17:53:33 
    [0][      0.000] GIT IPUMM 
    [0][      0.000]        BRANCH : (detached from 3.00.09.00) 
    [0][      0.000]        TAG : MMIP 3.00.09.00 IPC 3_40_00_06  
    [0][      0.000]        COMMIT-ID : 7ad4bc0
    [0][      0.000] CODEC-VER BEGIN: 
    [0][      0.000]        H264D-02.00.17.01
    [0][      0.000]        MPEG4D-01.00.15.01
    [0][      0.000]        MPEG2D-01.00.14.01
    [0][      0.000]        VC1D-01.00.02.01
    [0][      0.000]        MJPEGD-01.00.13.01
    [0][      0.000]  
    [0][      0.000]        H264E-02.00.09.01
    [0][      0.000]        MPEG4E-01.00.02.01
    [0][      0.000] CODEC-VER END: 
    [0][      0.000] 
    [0][      0.000] ** IPUMM VERSION INFO END ** 
    [0][      0.000] Trace level PA 0x95f5415c Trace Level 0                   
    [0][      0.000] Trace Usage: level:[0-4: 0-no trace, 1-err, 2-debug, 3-info, 4-CE,FC,IPC traces] 
    [0][      0.000] 
    [0][      0.000] Trace Buffer PA 0x98a00000 kpi_control (PA 0x95f4f798 value 0x0)
    [1][      0.000] loadTask: started
    [1][      0.000]   SLEEP_TICKS: 1000
    [1][      0.000]   Load_hwiEnabled: 0
    [1][      0.000]   Load_swiEnabled: 0
    [1][      0.000]   Load_taskEnabled: 1
    [1][      0.000]   Load_updateInIdle: 1
    [1][      0.000]   Load_windowInMs: 11
    [0][      0.001] OMAPRPC: registered channel: rpmsg-dce
    [0][      0.001] OMAPRPC: Returning Object @80206740
    [1][      0.001] OMAPRPC: connecting from local endpoint 59 to port 59
    [1][      0.001] registering rpmsg-rpc:rpmsg-dce service on 59 with HOST
    [1][      0.001] OMAPRPC: started channel on port: 59
    [0][      0.971] OMAPRPC: received msg type: 0 len: 8 from addr: 1024
    [0][      0.971] OMAPRPC: channel info query - name rpmsg-dce fxns 8
    [0][      0.971] OMAPRPC: Replying with msg type: 1 to addr: 1024  from: 59 len: 12
    [0][      0.971] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.971] OMAPRPC: function query of type 1
    [0][      0.971] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.972] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.972] OMAPRPC: function query of type 1
    [0][      0.972] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.972] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.972] OMAPRPC: function query of type 1
    [0][      0.972] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.972] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.972] OMAPRPC: function query of type 1
    [0][      0.972] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.973] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.973] OMAPRPC: function query of type 1
    [0][      0.973] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.973] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.973] OMAPRPC: function query of type 1
    [0][      0.973] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.973] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.974] OMAPRPC: function query of type 1
    [0][      0.974] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      0.974] OMAPRPC: received msg type: 2 len: 216 from addr: 1024
    [0][      0.974] OMAPRPC: function query of type 1
    [0][      0.974] OMAPRPC: Replying with msg type: 3 to addr: 1024  from: 59 len: 216
    [0][      1.000] loadTask: cpu load = 20%
    [0][     10.993] OMAPRPC: received msg type: 6 len: 56 from addr: 1025
    [0][     10.993] createService: new OMX Service at endpoint: 101
    [0][     10.993] OMAPRPC: created service instance named: rpmsg-dce (status=0) addr: 101
    [0][     10.993] OMAPRPC: Replying with msg type: 8 to addr: 1025  from: 59 len: 16
    [0][     11.000] loadTask: cpu load = 100%
    [0][     12.000] loadTask: cpu load = 21%
    [0][     12.018] OMAPRPC: received msg type: 4 len: 12 from addr: 1025
    [0][     12.018] OMAPRPC: destroying instance addr: 101
    [0][     12.018] RcmServer_serverThrFxn_P: Exiting thread.
    [1][     12.018] deleteService: removed RcmServer at endpoint: 101
    [1][     12.018] OMAPRPC: Replying with msg type: 7 to addr: 1025  from: 59 len: 16
    [0][     13.000] loadTask: cpu load = 26%
    [0][     14.000] loadTask: cpu load = 21%
    % 

  • Log shows that ipumm firmware is loaded and /dev/rpmsg-dce node is created but not clear why dce_init is failing.

    Can you please check if omapdrm driver is inserted?

    You can also try running gsteramer pipeline to decode a stream or run viddec3test.

    Thanks

    Ram

  • Hi Ram-san,

    The omapdrm driver is inserted.

    gstreamer and other applications using libdce without Qt run normally.

    Is it possible to share omapdrm between libdce and Qt eglfs_kms?

    Thanks,

    Eiji Aoki

  • Hello,

    Do you experience a similar issue when running libdce and Qt with Weston? Based on my understanding, EGLFS runs without an actual windowing system and only one application can access the display at a time.

    Regards,
    Krunal

  • Hello Krunal-san,

    Sorry for my late reply.

    We have not used Wayland because of worry about performance and the need for modifications of our app.

    Krunal Bhargav34 said:

    Based on my understanding, EGLFS runs without an actual windowing system and only one application can access the display at a time.

    We make a single application using Qt + eglfs_kms. Inside the app, we failed to initialize libdce.

    Thanks,

    Eiji Aoki

  • Hi Aoki,

    Have you been able to resolve this issue? You can use one of the many reference examples that initialize the DRM and the libdce such as omapdrmtest examples.

    Please let me know if you still need any help.

    Regards

    Karthik

  • Hi Karthik-san,

    We resolved it using Qt linuxfb.

    We do not have enough time to modify the framework which uses libdce to avoid the conflict with Qt eglfs_kms, finally we chose the solution.

    Thank you for your support.

    Regards,

    Eiji Aoki