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

The dma-coherent default setting #127

Open
TieraLai opened this issue Jan 9, 2025 · 1 comment
Open

The dma-coherent default setting #127

TieraLai opened this issue Jan 9, 2025 · 1 comment

Comments

@TieraLai
Copy link

TieraLai commented Jan 9, 2025

Hi,

I'm using the u-dma-buf module on an OS with Linux kernel version 5.15.136, running on an ARM Cortex-A78AE CPU.

I install the module using the insmod command and plan to use udmabuf as the PCI RX/TX DMA buffer.

However, I encountered an issue: when I load the module with insmod, the default value of dma-coherent is set to 0.

How can I change the value of dma-coherent?

P.S. I'm a newcomer trying to figure this out. Any guidance would be greatly appreciated.

@ikwzm
Copy link
Owner

ikwzm commented Jan 9, 2025

Thanks for the issue.

If u-dma-buf is created by the argument of the insmod command, the value of dma-coherent is set to the Linux Kernel default value. In principle, it is impossible to change this value later.

However, if you add a u-dma-buf under a bus (e.g., simple-bus such as /soc) using the device tree, adding a property called dma-coherent to the u-dma-buf node will set dma-coherent to 1 and adding the property dma-noncoherent to the u-dma-buf node will set dma-coherent to 0.

See of_dma_configure() and of_dma_is_coherent() in Linux Kernel for details.

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