cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
422 Views
Registered: ‎10-13-2019

DMA reading cached data in petalinux gstreamer application problem

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

0 Kudos
2 Replies
Highlighted
Moderator
Moderator
349 Views
Registered: ‎11-09-2015

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.


 


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Contributor
Contributor
301 Views
Registered: ‎10-13-2019

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.

0 Kudos