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

dma: Update dma_dw from sof #43883

Merged
merged 3 commits into from
Mar 29, 2022
Merged

Conversation

teburd
Copy link
Collaborator

@teburd teburd commented Mar 16, 2022

Ports the existing SOF DesignWare DMA code to Zephyr styling, calls, Kconfig setup and such.

Effectively replaces much of what was the designware driver as this
driver enables scatter gather which the older driver did not.

Passes newly updated suspend/resume and created scatter gather test cases. Works in SoF thanks to the great work from @abonislawski

Marked DNM until dependent PRs make their way in

I realize the commit sequence is maybe a little messy for some, but this was a collaborative effort and I don't wish to squash it all immediately

Signed-off-by: Tom Burdick thomas.burdick@intel.com

@teburd teburd force-pushed the dma_cavs_gpdma_sof branch 6 times, most recently from bce8579 to 7164c6e Compare March 18, 2022 23:52
@github-actions github-actions bot added the area: Tests Issues related to a particular existing or missing test label Mar 18, 2022
@teburd teburd force-pushed the dma_cavs_gpdma_sof branch 3 times, most recently from fbecd8c to 69e2c1c Compare March 21, 2022 17:33
@teburd teburd force-pushed the dma_cavs_gpdma_sof branch 4 times, most recently from b9fd5b9 to 3b743ac Compare March 21, 2022 22:47
@github-actions github-actions bot added the area: API Changes to public APIs label Mar 22, 2022
@kv2019i kv2019i added the platform: Intel ADSP Intel Audio platforms label Mar 23, 2022
@teburd teburd force-pushed the dma_cavs_gpdma_sof branch 6 times, most recently from 6d4c204 to 852593b Compare March 23, 2022 20:12
@teburd teburd added the DNM This PR should not be merged (Do Not Merge) label Mar 23, 2022
@teburd teburd marked this pull request as ready for review March 23, 2022 20:12
@teburd teburd requested a review from carlescufi as a code owner March 23, 2022 20:12
@nashif
Copy link
Member

nashif commented Mar 28, 2022

@teburd can you please rebase?

Adds a bit flag config option for cyclic transfer lists, where the
transfer list tail may link to its head creating a never ending
loop of transfer descriptors.

DesignWare DMA supports such cyclic transfers.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Adds to the dma_status struct the number of free bytes available
in the current transfer buffer.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
@teburd teburd force-pushed the dma_cavs_gpdma_sof branch 2 times, most recently from b0a76cf to f4ed876 Compare March 28, 2022 18:36
@teburd teburd removed the DNM This PR should not be merged (Do Not Merge) label Mar 28, 2022
@teburd
Copy link
Collaborator Author

teburd commented Mar 28, 2022

Tested in SOF by @abonislawski and with the new DAI drivers by @juimonen

nashif
nashif previously approved these changes Mar 28, 2022
@nashif nashif requested a review from dcpleung March 28, 2022 20:54
dcpleung
dcpleung previously approved these changes Mar 28, 2022
Copy link
Member

@dcpleung dcpleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just minor things that MISRA will probably flag.

drivers/dma/dma_cavs_gpdma.c Outdated Show resolved Hide resolved
drivers/dma/dma_cavs_gpdma.c Outdated Show resolved Hide resolved
dcpleung
dcpleung previously approved these changes Mar 28, 2022
nashif
nashif previously approved these changes Mar 28, 2022
@teburd teburd dismissed stale reviews from nashif and dcpleung via 3db501b March 29, 2022 13:15
@teburd teburd force-pushed the dma_cavs_gpdma_sof branch 2 times, most recently from 3db501b to 833134d Compare March 29, 2022 13:42
Ports the SOF DesignWare DMA code to Zephyr.

Effectively replaces much of what was the designware driver as this
driver enables scatter gather which the older driver did not.

* Enables cyclic transfer description lists when the cyclic config
  param is given.
* Enables linear link position usage with cAVS GPDMA.
* Passes suspend/resume, scatter/gather tests.
* Provides status updates of the transfer through dma_get_status()
* Enables reloading a cyclic transfer with dma_reload()
* Enables dma handshakes using the dma_slot config param.
* cAVS specifics remain in the dma_cavs_gpdma driver.

Co-authored-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Co-authored-by: Tom Burdick <thomas.burdick@intel.com>
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
@teburd teburd requested review from dcpleung and nashif March 29, 2022 14:18
@juimonen juimonen mentioned this pull request Mar 29, 2022
@nashif nashif merged commit 2f792c2 into zephyrproject-rtos:main Mar 29, 2022
@teburd teburd deleted the dma_cavs_gpdma_sof branch March 29, 2022 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: API Changes to public APIs area: Tests Issues related to a particular existing or missing test platform: Intel ADSP Intel Audio platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants