-
Notifications
You must be signed in to change notification settings - Fork 349
base_fw: Extend fw_config with information about the host buffer size #10254
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
base_fw: Extend fw_config with information about the host buffer size #10254
Conversation
|
fyi @abonislawski |
tmleman
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.
The code itself looks fine. I'm temporarily blocking it before merging to confirm that adding the new ID has been discussed internally.
@tmleman whats your ETA for this, will need this as part of v2.14 as it fixes some use cases. |
|
Thanks @tmleman, id 33 is indeed available right now but this needs to be agreed and reserved in parallel to merge this and avoid future mismatch. |
| __cold static uint32_t get_host_buffer_size(void) | ||
| { | ||
| struct sof_dma *dma_host; | ||
| uint32_t periods; |
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.
we can omit calling assert_can_be_cold() if this is a static function and all the callers have called it - as is the case here. But let's at least make a comment about it to make sure this isn't broken in the future.
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.
a comment would not stop misuse of this function, which is a helper to be used by basefw_config()
I will add the assert_can_be_cold() instead of a comment.
e70bee7 to
ffb406f
Compare
The host buffer default or minimum size can be platform dependent and it is not know by the host. It is in sole discretion of the firmware and the hardware where it is running and can be changed by recompiling the firmware. Add new tlv item to fw_config with ID 33 and store the host DMA default period size, which is the indication of the default, minimum size of the host buffer in ms. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
|
Changes since v1:
|
|
Slightly off-topic, but I just remembered something. Some time ago, someone added a parameter to IPC for specifying the stack size of the DP thread. I recently noticed that this information is already provided in the module manifest, but SOF doesn't recognize it because the field in the manifest structure have a different name. We've also added new module type values for llext. A sync with the reference firmware is necessary. |
Linux wont use manifest for runtime configuration data if data is also available in topology, yes manifest should be supported, but can be overridden via topology on Linux based OSes. |
Great - is this now reserved ? |
No yet. |
| /* Minimum size of host buffer in ms */ | ||
| IPC4_FW_MIN_HOST_BUFFER_PERIODS = 33, |
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.
There is agreement to reserve this value, so there's no reason for me to keep my change request.
softwarecki
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.
LGTM
The host buffer default or minimum size can be platform dependent and it is not know by the host.
It is in sole discretion of the firmware and the hardware where it is running and can be changed by recompiling the firmware.
Add new tlv item to fw_config with ID 33 and store the host DMA default period size, which is the indication of the default, minimum size of the host buffer in ms.