I'm developing a codec based on the "scale" example provided in the codec
engine package, and I'm running into some cache coherency problems: I
occasionally get stale results from the codec.  To test this, all of my
output buffers are zeroed out in the application, and then set to non-zero
constants in the codec/algorithm.  The output buffers are usually correct
(non-zero) upon return from the codec, but occasionally I see stale results
(zeroes in all buffers), or a mixture of the two (some zero, some non-zero).

I've modified the scale example to use XDM_BufDescs for the input and output
buffers (one large input buffer and 3 relatively small output buffers).  In
the stubs part of the extension, I've added code to step through the
BufDesc, doing the virtual-to-physical address translation for each buffer
pointer and the bufSizes arrays.  Each input and output buffer is allocated
by contigAlloc, as well as the bufSizes arrays for the BufDescs.

Similarly, the skeleton has been modified to invalidate caches following the
same pattern as the scale example, but now extended to iterate over all
buffers in the BufDesc.  That is, first invalidate each input and output
buffer, then process, then writeback-invalidate the output buffers.  Just to
make sure I'm not crazy, I also tried hard-coding the buffer lengths into
the invalidate calls, but it doesn't seem to help.

Could there be something screwy happening in the writeback-invalidate?  I'm
compiling with -O2, could this be affecting the cache-invalidate operations?

For the sake of completeness, here are the library versions I'm using:

   dvevm 1.20
   cmem 1.02
   codec engine 1.10.01
   codec servers 1.23
   dsplink 1.30.08.02
   xdais 5.10
   xdc 2.94

I realize that these are not the most recent versions, but I haven't found
anything (yet) in the release notes for later versions describing this sort
of problem.

Any help would be greatly appreciated.

-- 
Brian
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to