-
Notifications
You must be signed in to change notification settings - Fork 140
[RFC] [DO NOT MERGE] Ensure link DMA channel with the same ID as trace host DMA is reserved #882
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
Conversation
There is a HW limitation that requires the host and link DMA engines to be coupled whenever link DMA engine needs to be reset. This means that even in decoupled mode, we always need to reserve link and host DMA channels with the same ID. Trace utilizes only the host DMA. Therefore, to prevent the link DMA with the same ID as trace host DMA from being assigned to another stream, its link_locked attribute must be set. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
|
@RanderWang @keqiaozhang I dont have a CML to test this. Could I please request to check if this fixes the issue? |
This PR could fix the failure of FW loading, but it doesn't fix the coupled & decoupled issue in SOF. |
|
I share you some cases to your list. Assuming all dma channel zero are used by dma trace. (2) a pcm with one FE and multiple BEs (3) There are one FE and two BEs for pcm1, one FE & one BE fro pcm2, how to make them not affect each other. The key idea here is how to allocated dma channel (3) a few pcms mixed by FW to one BEs. (4) for tone generator, there is no FE only BE (5) for stream like dma trace, there is only FE without BE (6) For M streams map to N BEs. The streams are enabled in different time and maybe disabled in different time. My advice is to refine the allocation algorithm and refine coupled mode setting in hw_free. According to Proborszcz, Filip( please review the Email for coupled &decoupled mode), they also refined the allocation algorithm on windows. |
|
@RanderWang ack and thanks for the explanation. Agree that we need a slightly more sophisticated stream allocation scheme to get around the HW limitation. But this PR is still relevant isnt it? |
yes, it is relevant. It is a special case for allocation algorithm. |
plbossart
left a comment
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.
No objection on the change proper, although it's not generic enough to cover all usages we discussed before. However the commit message and comments are misleading.
First we never talk about 'hardware limitation', they are 'recommended programming sequences' and second this is really related to the fact that the format has to be set while the host and link DMA are coupled.
| } | ||
|
|
||
| /* | ||
| * There is a HW limitation that requires the host and link DMA engines |
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.
nope. the hw recommended programming sequence is to couple the host and link DMA so set the format, as done in a previous commit. This change has nothing to do with reset.
|
@plbossart I understand this isnt generic enough. I think this change along with reverting back to assigning the link dma channel during hw_params should take care of most of the cases. The only case that will still not work is 1 FE connected to multiple BE's. I think I'll need to have a chat with you about this. |
|
Closing this one. Will be replaced by a slightly more generic solution soon |
There is a HW limitation that requires the host and link DMA engines
to be coupled whenever link DMA engine needs to be reset. This means
that even in decoupled mode, we always need to reserve link and
host DMA channels with the same ID. Trace utilizes only the host DMA.
Therefore, to prevent the link DMA with the same ID as trace host DMA
from being assigned to another stream, its link_locked attribute
must be set.
fixes thesofproject/sof#1173