11-22-2019 06:29 AM - edited 11-22-2019 07:31 AM
Hi.
my gstreamer application sends VCU decoder output data to the PL side using appsink then receives the frames with appsrc.
I've set the mmaps for both DMA and our custom IP.
the IP module goes through the correct sequence of reset->start->done as I print the values of the registers but the output frames are usually empty(green) with some random bight pixels at one line of the frame, or rarely part of the input frames. ( attached two sample output frames.)
the gstreamer pipeline works correctly when I bypass the DMA transfers and send the appsink data directly to appsrc. My only guess is that the problem occurs when my app tries to fill the appsrc buffer it reads the cached data.
could it a caching problem? if so how can I easily flush the dcache in petalinux? I already tried modifying Xil_DCacheInvalidate but got an "invalid instruction" error in runtime.
--------------------------------------------
update:
to bypass caching of the output buffer, after the DMA transfers are done. I added another variable pointer and mmap it on dest_address and copied its data on the appsrc buffer.
it's working really slow but I made sure the problem is the Dcache.
thanks
11-29-2019 01:44 AM
HI @mksafavi
Looking at your post, it seems that you have already solved your issue, correct?
@mksafavi wrote:
update:
to bypass caching of the output buffer, after the DMA transfers are done. I added another variable pointer and mmap it on dest_address and copied its data on the appsrc buffer.it's working really slow but I made sure the problem is the Dcache.
12-04-2019 11:31 AM
Hi.
I just pointed out that the problem was from the cache. having an unnecessary memory copy after each frame process is way too slow.