-
Notifications
You must be signed in to change notification settings - Fork 131
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
FIx for DP + multicore with IPC4 #4705
FIx for DP + multicore with IPC4 #4705
Conversation
9c2666d
to
4753608
Compare
SOFCI TEST |
4753608
to
7199696
Compare
e0a6a3f
to
790d744
Compare
SOFCI TEST |
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.
The logic sounds mostly good @ranj063, the only concerns I have are locking and a couple of comment on comments.
790d744
to
43ec4f1
Compare
int j; | ||
|
||
/* decrement ref count for all cores that were updated previously */ | ||
for_each_set_bit(j, &spipe->core_mask, sdev->num_cores) { |
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.
not sure if it would work, but in theory
for_each_set_bit(j, &spipe->core_mask, i + 1) {
might work as well?
With IPC4, a pipeline may contain multiple modules in the data processing domain and they can be scheduled to run on different cores. Add a new field in struct snd_sof_pipeline to keep track of all the cores that are associated with the modules in the pipeline. Set the pipeline core mask for IPC3 when initializing the pipeline widget IPC structure. For IPC4, set the core mark when initializing the pipeline widget and initializing processing modules in the data processing domain. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
In the current code, we enable a widget core when it is set up and disable it when it is freed. This is problematic with IPC4 because widget free is essentially a NOP and all widgets are freed in the firmware when the pipeline is deleted. This results in a crash during pipeline deletion when one of it's widgets is scheduled to run on a secondary core and is powered off when widget is freed. So, change the logic to enable all cores needed by all the modules in a pipeline when the pipeline widget is set up and disable them after the pipeline widget is freed. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
43ec4f1
to
9f7b6d2
Compare
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.
LGTM @ranj063, just one question below
35fe2b4
into
thesofproject:topic/sof-dev
replacement for #4692