-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Again) memory cache management and coherency #79
Comments
By the way, we are not using the ACP. Could it be the problem? |
Thank you for the issue. However, I cannot answer because I do not know the situation you are encountering. |
Sorry for the lack of description.
Then we queued these buffers with v4l2. This part of the code is responsible for dequeueing/enqueueing the buffer. pfile.addSaccadeFrame(kk, buffers.getMappedPtr(buf.index)); This is the function that should clean the cache problems (if I understood correctly) `void p3_udmabuf::sync_for_cpu(uint32_t buf_idx) const
}` (We also tried with sync_direction=1 but it doesn't work. I hope that this is clearer and thank you in advance for the time you would take to read this rather long post... |
It seems that the cache is not enabled because you specified the O_SYNC flag when opening the file. By the way, do you need |
Thanks for your reply.
To validate that the data are correctly written by the PL to the physical addresses, we built a baremetal example that runs smoothly and in which we can check that the data are correctly written (using a test pattern instead of the actual image sensor). However the pattern we observe is very strange.
The results are below:
It seems that only the first 16 bytes are updated with the sync_to_cpu. Thank you again!! |
What happened to the answer to this point? |
|
Hello,
First of all, this is an AMAZING driver and I am really grateful that you provide it through github.
I am working with an Zynqmp and petalinux 2020.2
There is something unclear to me for the manual cache management.
The driver allocates a coherent memory region.
I have a second module which interacts with the PL to provide the physical address (given by u_dma_buf) where our IP must directly writes.
My module receives an interrupt when the data are written within the memory area by the PL (I am sure that there is no cache here as we are directly writing in the memory area).
When I read the data, I see that I do have cache issues, even if I use sync_for_cpu.
What am I missing? From my understanding, I should not have any cache issue as I only read some memory region.
Thanks,
PMD
The text was updated successfully, but these errors were encountered: