Skip to content
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

1920*1080大小输入图像帧拷贝到mpp frame buffer占用CPU高 #64

Closed
Iyiren opened this issue Jan 22, 2024 · 1 comment
Closed

Comments

@Iyiren
Copy link

Iyiren commented Jan 22, 2024

我在使用XDMA从FPGA PCIE把数据放到了xdma.buffer里,xdma.buffer是posix_memalign()分配的内存,当我把192010803大小的数据用memcpy拷贝到mpp buffer(DRM或者DMA_HEAP类型)里,使用时间3---4ms,但是cpu占用率约40%。
我又使用librga的imcopy(),效果差不多,耗时3---4ms,cpu占用率仍然30%~40%。
请问有没有什么方法可以降低CPU使用率呢?有没有免拷贝或者DMA直接拷贝,不经过CPU的方法呢?

@HermanChen
Copy link
Owner

能直接写到 MppBuffer 对应 fd 的 dmabuf 里么?不要用 malloc 出来的内存

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants