Skip to content

drivers: Intel: hda-dma: Poll with timeout for DMA idle - #4931

Closed
ranj063 wants to merge 1 commit into
thesofproject:mainfrom
ranj063:fix/gbusy_wait
Closed

ranj063 wants to merge 1 commit into
thesofproject:mainfrom
ranj063:fix/gbusy_wait

Conversation

@ranj063

@ranj063 ranj063 commented Oct 27, 2021

Copy link
Copy Markdown
Collaborator

Poll the DGCS register with a timeout to check if the DMA is idle after
clearing the GEN bit.

potential fix for #4919

Poll the DGCS register with a timeout to check if the DMA is idle after
clearing the GEN bit.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
return -EBUSY;
return ret;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the addition of a wait seems ok, but this is done in code where interrupts are disabled. Isn't that creating a bigger problem?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

that is a good point but we have a similar polling with interrutps disabled in

ret = poll_for_register_delay(dma_base(dma) +

Not sayng that code is right, just saying that we have precedence for doing something similar

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ranj063 this change will be fine with @lyakh trigger STOP update. We will also need to make sure it works with DW DMA as above. @lyakh fyi it looks like DW DMA has a 1.5ms poll delay which may mean we need to have a delayed stop (like early BCLK) where we use the LL scheduler ticks to wait on the DW DMA event.

@XiaoyunWu6666

Copy link
Copy Markdown
Contributor

Environment
Kernel Branch: topic/sof-dev
Kernel Commit: thesofproject/linux@6b090e6
SOF Branch: main
SOF Commit: 0a3342f

without this commit , it happened (not sure which round)
with this commit, ran 'TPLG=/lib/firmware/intel/sof-tplg/sof-cml-rt711-rt1308-mono-rt715.tplg ~/sof-test/test-case/multiple-pause-resume.sh -r 250' and found no error

@plbossart

Copy link
Copy Markdown
Member

Is this PR still relevant @ranj063 ?

@ranj063

ranj063 commented Dec 9, 2021

Copy link
Copy Markdown
Collaborator Author

Is this PR still relevant @ranj063 ?
probably not. closing it

@ranj063 ranj063 closed this Dec 9, 2021
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

Successfully merging this pull request may close these issues.

4 participants