-
Notifications
You must be signed in to change notification settings - Fork 321
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
Remove sparse step1 #8166
Remove sparse step1 #8166
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,15 +36,16 @@ | |
LOG_MODULE_DECLARE(ipc, CONFIG_SOF_LOG_LEVEL); | ||
|
||
/* create a new component in the pipeline */ | ||
struct comp_buffer *buffer_new(const struct sof_ipc_buffer *desc) | ||
struct comp_buffer *buffer_new(const struct sof_ipc_buffer *desc, bool is_shared) | ||
{ | ||
struct comp_buffer *buffer; | ||
|
||
tr_info(&buffer_tr, "buffer new size 0x%x id %d.%d flags 0x%x", | ||
desc->size, desc->comp.pipeline_id, desc->comp.id, desc->flags); | ||
|
||
/* allocate buffer */ | ||
buffer = buffer_alloc(desc->size, desc->caps, desc->flags, PLATFORM_DCACHE_ALIGN); | ||
buffer = buffer_alloc(desc->size, desc->caps, desc->flags, PLATFORM_DCACHE_ALIGN, | ||
is_shared); | ||
if (buffer) { | ||
buffer->id = desc->comp.id; | ||
buffer->pipeline_id = desc->comp.pipeline_id; | ||
|
@@ -174,8 +175,8 @@ int comp_buffer_connect(struct comp_dev *comp, uint32_t comp_core, | |
{ | ||
/* check if it's a connection between cores */ | ||
if (buffer->core != comp_core) { | ||
/* set the buffer as a coherent object */ | ||
coherent_shared_thread(buffer, c); | ||
/* buffer must be shared */ | ||
assert(buffer->is_shared); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this recoverable ? I assume this data is derived from topology so could a bad topology cause an assert here ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not recoverable, must not happen. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but here at least you have a perfect chance to error out, don't you? |
||
|
||
if (!comp->is_shared) | ||
comp_make_shared(comp); | ||
|
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.
head
is now unneeded, can be removed later