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

Zynq Ultrascale+ (ARM Cortex A-53) Kernel 5.15.19 problem #94

Open
oguzhancik opened this issue Oct 4, 2022 · 4 comments
Open

Zynq Ultrascale+ (ARM Cortex A-53) Kernel 5.15.19 problem #94

oguzhancik opened this issue Oct 4, 2022 · 4 comments

Comments

@oguzhancik
Copy link

Everything compiled good with Petalinux kernel 5.15.19. I'm also creating device tree with dma-coherent property as shown below.

dma_data_buffer@0x00{
	compatible = "ikwzm,u-dma-buf";
	device-name = "dma_data_buffer";
	size = <0x09400000>;
	dma-coherent; 	
};

When i try to use it with succesfully working user DMA software with previous kernel 5.10 everything works well. However, with this 5.15.19 kernel it doesn't work. I suspect that it is caused by cache coherency because i'm using hw coherent bus of MPSOC and hardware flush or invalidates the cache over cache coherent bus. Can you help for this issue? I think proper support fr 5.15.19 will fix this issue.

@ikwzm
Copy link
Owner

ikwzm commented Oct 5, 2022

thank you for this precious issue.

Please give me a little more time.
I'm not using Linux Kernel 5.15.x yet.

I would like to ask you some questions
What exactly do you mean by "it doesn't work"?

@oguzhancik
Copy link
Author

oguzhancik commented Oct 5, 2022

I use Xilinx AXI DMA with scatter gather engine from user space. I create all data and descriptor buffers with u-dma-buf in the userspace. This space is cache coherent and dma makes cache coherent AXI bus transactions with proper port of Zynq MPSoC ps. In case of a problem with cache coherency it doesn't trigger when I send the data. It works well with previous kernel version 5.10. Only change is this system is kernel version.

@ikwzm
Copy link
Owner

ikwzm commented Oct 6, 2022

Thanks for your reply.

Let me ask you a few more questions.

Q1. How did you build the Linux Kernel? Petalinux? Yocto? Other?  

Q2. What is the output of dmesg when u-dma-buf is installed? I especially want to know the u-dma-buf version and physical address.

Sorry for the inconvenience, but thank you in advance.

@oguzhancik
Copy link
Author

Hello
I'm sharing the answers below.

Q1. I build using Petalinux.
Q2. Here is the info for u-dma-buf

[ 11.083838] u-dma-buf dma_data_buffer: driver version = 4.0.0
[ 11.083873] u-dma-buf dma_data_buffer: major number = 237
[ 11.083880] u-dma-buf dma_data_buffer: minor number = 0
[ 11.083886] u-dma-buf dma_data_buffer: phys address = 0x000000005d900000
[ 11.083894] u-dma-buf dma_data_buffer: buffer size = 155189248
[ 11.083903] u-dma-buf dma_data_buffer@0x00: driver installed.
[ 11.084180] u-dma-buf dma_rx_desc_buffer@0x00: driver probe start.
[ 11.156243] u-dma-buf dma_rx_desc_buffer: driver version = 4.0.0
[ 11.156282] u-dma-buf dma_rx_desc_buffer: major number = 237
[ 11.156288] u-dma-buf dma_rx_desc_buffer: minor number = 1
[ 11.156294] u-dma-buf dma_rx_desc_buffer: phys address = 0x0000000066d00000
[ 11.156303] u-dma-buf dma_rx_desc_buffer: buffer size = 25165824
[ 11.156313] u-dma-buf dma_rx_desc_buffer@0x00: driver installed.
[ 11.156681] u-dma-buf mov_ul_frame_buffer@0x00: driver probe start.
[ 11.237942] u-dma-buf mov_ul_frame_buffer: driver version = 4.0.0
[ 11.237975] u-dma-buf mov_ul_frame_buffer: major number = 237
[ 11.237982] u-dma-buf mov_ul_frame_buffer: minor number = 2
[ 11.237987] u-dma-buf mov_ul_frame_buffer: phys address = 0x0000000068500000
[ 11.237994] u-dma-buf mov_ul_frame_buffer: buffer size = 155189248
[ 11.238004] u-dma-buf mov_ul_frame_buffer@0x00: driver installed.

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