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

Allocating multiple DMA buffers but not in a single parse #81

Open
rajatkha opened this issue Nov 10, 2021 · 3 comments
Open

Allocating multiple DMA buffers but not in a single parse #81

rajatkha opened this issue Nov 10, 2021 · 3 comments

Comments

@rajatkha
Copy link

What if I want to allocate two buffers of size 256 bytes but not in a single go?
insmod u-dma-buf.ko udmabuf0=256 udmabuf1=256 --> this is correct
but what if I want to allocate them separately?
insmod u-dma-buf.ko udmabuf0=256
now what about the udmabuf1? How do I allocate this now?

@ikwzm
Copy link
Owner

ikwzm commented Nov 10, 2021

Thank you for the issue.

How about using /dev/u-dma-buf/mgr?
Allocate the buffer as follows:

shell# insmod u-dma-buf.ko udmabuf0=256
shell# echo 'create udmabuf1 256 > /dev/u-dma-buf-mgr

Alternatively, use device tree overlay to allocate the buffer. See the Readme.md for more details.

@rajatkha
Copy link
Author

Thanks for replying.
I tried with the above method but facing this error on executing echo 'create udmabuf1 256' > /dev/u-dma-buf-mgr
-bash: /dev/u-dma-buf-mgr: Permission denied

Any solutions to this?

@ikwzm
Copy link
Owner

ikwzm commented Nov 17, 2021

Does /dev/u-dma-buf-mrg exist?

What is the permission for /dev/u-dma-buf-mgr ?

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