Open kewlcreatures opened 4 years ago
Hey this looks really interesting.
I'm also a user of QDMA with a few patches of my own to share.
would you like to fork this project and merge our changes together?
I already created my fork: https://github.com/ramonaoptics/dma_ip_drivers
I can make a few small PRs if you want to see the little changes i made to 2019.1
i pushed a few of our changes on there. our main branch is ours_2019.1
Hi Mark, Sincere apologies for this delay in replying. I've been very busy. Yes I'll commit my changes to the fork and we can merge our changes together.
BTW with regards to the driver code I do have some more suggestions and questions which could . If you can share your email address I can shoot them to you. Sincere apologies for the delay.
Kind Regards, Vikas L
Hi Mark, Sincere apologies for this delay in replying. I've been very busy. Yes I'll commit my changes to the fork and we can merge our changes together. BTW with regards to the driver code I do have some more suggestions and questions which could . If you can share your email address I can shoot them to you. Sincere apologies for the delay. Kind Regards, Vikas L
@hmaarrfk fyip
@hmaarrfk
If you like perhaps a potential fix to 512 see some comments from this.
https://github.com/Xilinx/dma_ip_drivers/pull/49#issuecomment-642940357
@bhathaway changes with some tweaks might fix some of that pain problem. I can test for your GIT once any changes made. Im using XDMA btw.
Hello,
My name is Mark Harfouche. I am not affiliated with Xilinx in any way. Over the years of using QDMA, I've been wanted better community organization.
I've created a fork of dma_ip_drivers which I intend to maintain and work with the community at large to improve.
The fork can be found https://github.com/hmaarrfk/dma_ip_drivers
For now, I am stating the main goals of the repository in https://github.com/hmaarrfk/dma_ip_drivers/issues/2
If you are interested in working together, feel free to open an issue or PR to my fork.
Best,
Mark
I should really get back to this particular issue.
Board: Alveo- U50DD Environment details: Machine Make and Model : x3650 M4 Operating System: Red Hat Enterprise Linux Server release 7.6 (Maipo) Kernel version: 3.10.0-957.el7.x86_64
After make , make install and make install-mods , we attempted to add AXI-MM C2H and AXI-MM H2C Queues. However the queues did not get added with output as below . dmactl qdma8b000 q add idx 0 mode mm dir h2c Zero Qs
On checking dmactl dev list below was the output. qdma8b000 0000:8b:00.0 max QP: 0, -~- However the output should be: qdma82000 0000:82:00.0 max QP: 512, 0~511
On debugging further below are the observations:
Then taking a deep dive into qdma driver code 2019.1 version we could see the below code in qdma_access.c line number 1943. _if (dev_cap->st_en || dev_cap->mm_cmpt_en) qdma_read_csr_values(dev_hndl, QDMA_OFFSET_C2H_TIMER_CNT, index, count, glbl_tmrcnt); However when I look at the qdma_ip version 3.0 on Vivado 2019.2 I can see that theres no support for AXI-MM with completion infact that option is not available in the main menu. Attempting to fix the issue I've modified the above check to if (dev_cap->st_en || dev_cap->mm_en) in all the qdma code locally. Seems to fix the issues we were facing and the H2C and C2H are up and running. Having said that the dmactl qdma8b000 q list is not yet showing the C2H queue. However need to know if this is the correct direction of the fix as the qdma-driver doesn't seem to be reflecting what the QDMA IP features. By that what I mean is if AXI-MM with completion is not supported by the QDMA IP 3.0 Vivado 2019.1 in hardware how can the code check for the mm_cmpt_en.
Below is the diff of the code fix ive applied locally. Please ignore the Makefile changes. _$ git diff diff --git a/QDMA/linux-kernel/Makefile b/QDMA/linux-kernel/Makefile index 8ffc4c4..62cf6e3 100644 --- a/QDMA/linux-kernel/Makefile +++ b/QDMA/linux-kernel/Makefile @@ -21,6 +21,10 @@ grep = grep 2>/dev/null
ALL subdirectories
ALLSUBDIRS := drv DRIVER_SRC_DIR := drv +#DEBUG := 1 +#DEBUGFS := 1 +# DEBUG_THREADS := 1 +# ERR_DEBUG := 1
subdirectories to be build
SUBDIRS := $(ALLSUBDIRS) diff --git a/QDMA/linux-kernel/libqdma/qdma_access/qdma_access.c b/QDMA/linux-kernel/libqdma/qdma_access/qdma_access.c index cd7aee0..0fc29af 100644 --- a/QDMA/linux-kernel/libqdma/qdma_access/qdma_access.c +++ b/QDMA/linux-kernel/libqdma/qdma_access/qdma_access.c @@ -1805,7 +1805,7 @@ int qdma_set_default_global_csr(void *dev_hndl) qdma_write_csr_values(dev_hndl, QDMA_OFFSET_GLBL_RNG_SZ, 0, QDMA_NUM_RING_SIZES, rng_sz);
if (dev_cap->st_en || dev_cap->mm_cmpt_en) {
if (dev_cap->st_en || dev_cap->mm_en) { / Counter thresholds / qdma_write_csr_values(dev_hndl, QDMA_OFFSET_C2H_CNT_TH, 0, QDMA_NUM_C2H_COUNTERS, cnt_th); @@ -1918,7 +1918,7 @@ int qdma_set_global_timer_count(void *dev_hndl, uint8_t index, uint8_t count,
if (dev_cap->st_en || dev_cap->mm_cmpt_en)
if (dev_cap->st_en || dev_cap->mm_en) qdma_write_csr_values(dev_hndl, QDMA_OFFSET_C2H_TIMER_CNT, index, count, glbl_tmr_cnt); else @@ -1940,7 +1940,7 @@ int qdma_get_global_timer_count(void *dev_hndl, uint8_t index, uint8_t count,
if (dev_cap->st_en || dev_cap->mm_cmpt_en)
if (dev_cap->st_en || dev_cap->mm_en) qdma_read_csr_values(dev_hndl, QDMA_OFFSET_C2H_TIMER_CNT, index, count, glbl_tmr_cnt); else @@ -1962,7 +1962,7 @@ int qdma_set_global_counter_threshold(void *dev_hndl, uint8_t index,
if (dev_cap->st_en || dev_cap->mm_cmpt_en)
if (dev_cap->st_en || dev_cap->mm_en) qdma_write_csr_values(dev_hndl, QDMA_OFFSET_C2H_CNT_TH, index, count, glbl_cnt_th); else @@ -1984,7 +1984,7 @@ int qdma_get_global_counter_threshold(void *dev_hndl, uint8_t index,
if (dev_cap->st_en || dev_cap->mm_cmpt_en)
if (dev_cap->st_en || dev_cap->mm_en) qdma_read_csr_values(dev_hndl, QDMA_OFFSET_C2H_CNTTH, index,