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/TDA2PHG-ACD: did OSA_memInit can be called by Multiple processes ?

Part Number: TDA2PHG-ACD

Tool/software: Linux

we want use ti links& chains to capture video frame from ipu. & send frame to A15 (hlos).  on linux , we have multiple process to visit this frame . we have write the frame phyaddr to  share memory . processes read the phyaddr from share memory. i want map the phyaddr to virtualaddr on every processes.    now i want know if the osa_mem model can be use by multiple processes on linux ?   

for synchronization between app.out & my algrithom processes.  if the rpmsg socket is can be use ??  thanks 

  • Hi,

    You can use the os_mem model to map the regions for each process. In Vision-SDK the buffers allocated from M4 are exported as a DMABUF FD to user-space. To share this betweeen processes, you need to (please include necessary headers as required):

    From apps.out (vision-SDK):
    1. call omap_bo_from_dmabuf(FD). FD is the DMABUF FD exposed to the user-space from IPC. This returns a pointer (call it ptr)
    2. call omap_bo_get_name(ptr). This returns an integer value (call it name).

    Now you can pass this name to the other processes (using sockets or fifos etc). In the other process call:

    1. omap_bo_from_name(name). This returns a pointer (call it ptr2)
    2. omap_bo_map(ptr2). This returns a virtual address which can be used by the other process.

    Regards
    Shravan