Skip to content

memory: added requesting alignment for buffer heap - #1694

Closed
dabekjakub wants to merge 1 commit into
thesofproject:masterfrom
dabekjakub:alignment
Closed

dabekjakub wants to merge 1 commit into
thesofproject:masterfrom
dabekjakub:alignment

Conversation

@dabekjakub

@dabekjakub dabekjakub commented Jul 31, 2019 •

Copy link
Copy Markdown
Member

Some buffers need to be aligned - added this possibility.
Introduced wa for dma buffer alignment. Until now
buffers were aligned because buffer heap started aligned and
buffer blocks were in alignmet with dma required alignment - 128.

Introduced WA for DMA buffers which need to be changed to
topology token.

Signed-off-by: Jakub Dabek jakub.dabek@intel.com

Comment thread src/audio/buffer.c Resolved
Comment thread src/audio/buffer.c Resolved
Comment thread src/include/sof/lib/alloc.h Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/include/sof/lib/alloc.h Outdated

@dbaluta dbaluta Jul 31, 2019 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The commit message is empty? Please give more information about why this change is needed. Also please use imperative mood as pointed out in a previous comment.

So, please use something like this:

memory: Introduce API for requesting align buffers

This is needed because....

I am pretty sure everything is clear for you because you worked on that. But please have mercy on some poor
guys wanting to understand the code on months later.

Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
@jajanusz

jajanusz commented Jul 31, 2019 •

Copy link
Copy Markdown
Contributor

@dabekjakub Please fix also checkpatch warnings - except Macro argument reuse, cos it was already there.

Comment thread src/include/sof/lib/alloc.h Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/lib/alloc.c Resolved
Comment thread src/include/sof/lib/alloc.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Default alignment should be cache line size. It will be due to the buffer placement, but it's always better to show it explicitly.

Comment thread src/lib/alloc.c Resolved
@dabekjakub
dabekjakub force-pushed the alignment branch 2 times, most recently from 736949f to 9ef1b43 Compare August 1, 2019 12:44
Added buffer alignment API.
Needed to set alignment that different buffers require.
Example: Dma buffer has to be aligned to 128 due to hardware
configuration.

Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
Comment thread src/include/sof/lib/alloc.h Resolved
@dabekjakub

Copy link
Copy Markdown
Member Author

Created a draft of alternative pull request i will work on tomorrow with @tlauda
#1698

@dabekjakub

Copy link
Copy Markdown
Member Author

Droping this for new version in #1698

@dabekjakub dabekjakub closed this Aug 2, 2019
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.

5 participants