-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
dma: Scatter gather test #44041
dma: Scatter gather test #44041
Conversation
@hakehuang the changes to @dleach02 @DerekSnell FYI- These look like the same issues we've been seeing with the EDMA driver, although I didn't investigate too closely (just tried updating the HAL and our EDMA driver) |
32dd04e
to
0fba197
Compare
Thanks for taking a look at this @danieldegrasse and confirming that there are fixes required for this to work on eDMA. I've pushed a change to this PR to disable it for all platforms initially, in the updated designware DMA PR I've enabled it for the appropriate intel adsp platforms. When the NXP changes are merged we can enable it there as well. |
@danieldegrasse, I port the hal fix to this PR, however it does not work at my side for rt1064 board, can you help to double check? maybe my port has problem, thanks in advance.
|
@hakehuang Did you pull in the updates to the EDMA driver in #42750? I saw errors like that when I only had updated the HAL. |
Thanks @danieldegrasse , there is one key update at
which fixes my issues here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need wait for #42750 merged. others looks OK for me and test pass on my rt series board
I don't think it matters a whole lot, especially considering you just got 2 approvals on this and updating the PR would dismiss them and put you back in review purgatory, but the copyrights for the new files should be 2022 instead of 2021. You might consider fixing the copyright comments in another little PR after this one gets merged. |
e9f84eb
@hakehuang please do take a look, should be good to merge now |
Adds a scatter gather test against memory to memory transfers. Initially excludes all platforms as they are all failing. Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
dma_cfg.user_data = (struct device *)dma; | ||
#else | ||
dma_cfg.user_data = NULL; | ||
#endif /* CONFIG_DMAMUX_STM32 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this conditional really necessary ? I don't see the callback using the data passsed here. The driver should not do anything with the user pointer as well.
I may have missed something though.
dma_block_cfgs[i].source_gather_en = 1U; | ||
dma_block_cfgs[i].block_size = XFER_SIZE; | ||
dma_block_cfgs[i].source_address = (uint32_t)(tx_data); | ||
dma_block_cfgs[i].dest_address = (uint32_t)(rx_data[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't these address be 64bit if CONFIG_DMA_64BIT
is selected ? Btw, why don't we use uintptr_t
for these address instead of having it conditionally set ? (not related with this particular patch, just a question)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, looks good to me.
Adds a scatter gather test against memory to memory transfers.
Based on #43984 so the updated designware driver can be built on both test cases in #43883
DesignWare DMA passes both tests, NXP's eDMA does not seem to pass the scatter gather test and its not clear as to why, maybe @hakehuang wouldn't mind taking a look?
Marked DNM until #43984 is merged