Skip to content

ASoC: SOF: Intel: hda-loader: use small buffer for iccmax stream - #3853

Merged
plbossart merged 1 commit into
thesofproject:topic/sof-devfrom
kv2019i:topic/iccmax-fix
Sep 22, 2022
Merged

plbossart merged 1 commit into
thesofproject:topic/sof-devfrom
kv2019i:topic/iccmax-fix

Conversation

@kv2019i

@kv2019i kv2019i commented Sep 8, 2022 •

Copy link
Copy Markdown
Collaborator

The data received via iccmax stream is not used anywhere, so no need to allocate a big DMA buffer for it. This is especially important as the allocation is done even in cases where reload of the firmware is skipped and execution happens directly from the firmware stored in IMR.

Signed-off-by: Kai Vehmanen [email protected]

@kv2019i

kv2019i commented Sep 8, 2022

Copy link
Copy Markdown
Collaborator Author

@ranj063 @ujfalusi can you check?

@ranj063

ranj063 commented Sep 8, 2022

Copy link
Copy Markdown
Collaborator

@kv2019i this looks OK but isnt IMR boot a better option to fix this problem?

@kv2019i

kv2019i commented Sep 8, 2022

Copy link
Copy Markdown
Collaborator Author

@ranj063 wrote:

@kv2019i this looks OK but isnt IMR boot a better option to fix this problem?

I don't think IMR boot alone will help as this allocation is done even if IMR boot is used:

  • ops->run()
  • hda_dsp_cl_boot_firmware_iccmax()
  • allocate DMA memory
  • hda_dsp_cl_boot_firmware()
  • check for IMR boot and if available, skip loading the firmware again

So you need both this fix AND IMR boot to minimize the memory usage.

@ranj063

ranj063 commented Sep 8, 2022

Copy link
Copy Markdown
Collaborator

@ranj063 wrote:

@kv2019i this looks OK but isnt IMR boot a better option to fix this problem?

I don't think IMR boot alone will help as this allocation is done even if IMR boot is used:

  • ops->run()
  • hda_dsp_cl_boot_firmware_iccmax()
  • allocate DMA memory
  • hda_dsp_cl_boot_firmware()
  • check for IMR boot and if available, skip loading the firmware again

So you need both this fix AND IMR boot to minimize the memory usage.

oh this is a miss. Why do we need the iccmax stream if we're booting from IMR. this needs to be fixed

ranj063
ranj063 previously approved these changes Sep 9, 2022
ujfalusi
ujfalusi previously approved these changes Sep 12, 2022
Comment thread sound/soc/sof/intel/hda-loader.c Resolved
@kv2019i
kv2019i dismissed stale reviews from ujfalusi and ranj063 via 4f1f1f2 September 21, 2022 10:59
@kv2019i

kv2019i commented Sep 21, 2022

Copy link
Copy Markdown
Collaborator Author

V2 update:

plbossart
plbossart previously approved these changes Sep 21, 2022
Comment thread sound/soc/sof/intel/hda-loader.c Resolved
Comment thread sound/soc/sof/intel/hda-loader.c Resolved
The data received via iccmax stream is not used anywhere, so no need to
allocate a big DMA buffer for it. This is especially important as the
allocation is done even in cases where reload of the firmware is skipped
and execution happens directly from the firmware stored in IMR.

Signed-off-by: Kai Vehmanen <[email protected]>
@plbossart
plbossart requested a review from ranj063 September 21, 2022 13:05
@plbossart
plbossart merged commit 3153253 into thesofproject:topic/sof-dev Sep 22, 2022
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.

4 participants