Hey Rob, I see that calling the register functions require that CE is in the air (CERuntimeInit) so it is problematic for us in the same way as doing the CMEM allocations via CodecEngine. So I guess I have no solution except redesigning my system such that CERuntimeInit will be before any buffers allocation. Do you have any other offer that can save me this effort (which is huge)?
Thanks in advance, Erez -----Original Message----- From: Tivy, Robert [mailto:rt...@ti.com] Sent: Tuesday, January 05, 2010 1:30 AM To: Erez Kinarti; Vladimir Pantelic; Davinci-linux-open-source@linux.davincidsp.com Subject: RE: Cmem address translation when working with Codec Engine There is no function available to invalidate all the Memory module virt-phys translations. If your app structure allows it, you can call Memory_registerContigBuf(bigCMEMBufferVirtAddr, 258048, CMEM_getPhys(bigCMEMBufferVirtAddr)); once, and all smaller subdivided buffers will be covered by this one registration (or, even simpler, just call Memory_getBufferPhysicalAddress(bigCMEMBufferVirtAddr, 258048, NULL); and ignore the result, which will do the CMEM_getPhys() for you and register it). You can then call Memory_unregisterContigBuf(bigCMEMBufferVirtAddr, 258048) once when you're ready to free the CMEM buffer. FYI, if you want to double-check me, you can call Memory_dumpKnownContigBufsList() to display (through GT tracing) the contig buffer list (AKA, the Memory module virt-phys translation table). Regards, - Rob > -----Original Message----- > From: davinci-linux-open-source-boun...@linux.davincidsp.com > [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com > ] On Behalf Of Erez Kinarti > Sent: Monday, January 04, 2010 9:15 AM > To: Vladimir Pantelic; Davinci-linux-open-source@linux.davincidsp.com > Subject: RE: Cmem address translation when working with Codec Engine > > Thank you Vladimir, > But we are not able to allocate and free via CodecEngine due > to the structure of our application and the need to call the > alloc not before calling CERuntimeInit(). > > > -----Original Message----- > From: davinci-linux-open-source-boun...@linux.davincidsp.com > [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com > ] On Behalf Of Vladimir Pantelic > Sent: Monday, January 04, 2010 7:09 PM > To: Davinci-linux-open-source@linux.davincidsp.com > Subject: Re: Cmem address translation when working with Codec Engine > > Erez Kinarti wrote: > > Thanks a lot Rob. > > > > calling this function for each of the pointers used with > CodecEngine > > solved the problem. > > > > However, we need something else, some function that invalidates all > this > > virt->phy table and not each of the virtual pointers separately. > > > > Is there a way to do a full invalidate in a single call > without keep > > tracking on each of the virtual pointers? > > > > The reason that Memory_unregisterContigBuf it is not enough for us: > > > > In our system, we allocate a very big buffer from CMEM > (258048 bytes), > > but we don't call CodecEngine with a pointer to the big buffer. > > You dont need to call Memory_unregisterContigBuf, just alloc > and free the buffers via CE and CE will know that you are > calling it with a smaller buffer inside a larger one that it > knows the translation to... > > _______________________________________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > > _______________________________________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source > _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source