如何在Snapdragon芯片组上在Android中使用DMA-BUF?

发布于 2025-02-08 09:58:53 字数 137 浏览 1 评论 0原文

我有一个库,使用NDK开发它。我的一部分计算是在CPU和GPU和DSP之间共享的,因此我需要进行共享内存以减少设备之间的复制。我意识到有DMA-BUF堆是为了同一工作,但我无法将标题文件添加到我的项目中并将其链接到它。我下载了AOSP,但不确定下一步该怎么办。

I have a library, developing it using NDK. Part of my computation is shared between CPU and GPU and DSP, so I need to make shared memory to reduce the copying between devices. I realized that there is DMA-Buf heap which is for the same job but I cannot add the header files to my project and link it against it. I downloaded the AOSP but not sure what I should do next.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

野侃 2025-02-15 09:58:53

您需要的标题是dma-heap.h可能dma-buf.h,取决于您要做的事情。它们在Android NDK中可用:

./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/dma-buf.h
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/dma-heap.h

The headers you need are dma-heap.h and possibly also dma-buf.h depending on what else you want to do. They are available in the Android NDK at:

./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/dma-buf.h
./toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/linux/dma-heap.h
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文