Closed LaurentiuM1234 closed 8 months ago
@LaurentiuM1234 you may find a timer drift after suspend. i.e. the next task may have been scheduled before suspend but the time after resume means this task time is now in the past ? @teburd fyi.
@kv2019i fyi
@LaurentiuM1234 you may find a timer drift after suspend. i.e. the next task may have been scheduled before suspend but the time after resume means this task time is now in the past ? @teburd fyi.
Hm, as far as I know there is a time between the moment at which the DSP clocks get re-enabled and the FW gets loaded in which something nasty (possibly something timer-related like you said) could happen but what I don't understand is how enabling the DMA trace leads to this? As far as I can tell, the DMA trace gets disabled before cutting off DSP clocks and the edf_workq thread should be stuck endlessly waiting for an IRQ in a while loop so there shouldn't be anything left "running" (although I am not sure about the system workq)
EDIT: Also, regarding this statement:
Hm, as far as I know there is a time between the moment at which the DSP clocks get re-enabled and the FW gets loaded in which something nasty (possibly something timer-related like you said) could happen
If this were to happen, shouldn't loading the FW still lead to the FW entering an expected state (the initial state)?
EDIT2: Please let me know if there's anything wrong with my understanding.
So I dont know about the i.MX arch PM logic, but if your DSP is doing a clean reboot after suspend then all FW status and configs should be in a reset state ? i.e. there is no memory of the previous config/state prior to the suspend in the FW (however, the driver may still have previous context ?).
Describe the bug A clear and concise description of what the bug is.
IPC either gets timeout or gets an error when trying to do aplay/arecord after DSP suspend when enabling DMA trace with DMA domain on i.MX using Zephyr build.
What have you tried to diagnose or workaround this issue?
Tried the following: 1) Adding a delay of 200us (by setting
EDF_SCHEDULE_DELAY
to 200) when adding work to edf_schedule => this seems to somehow make things a bit better as I was able to run the testing script for about 2 hours with no errors (usually it takes a few minutes for the IPC timeout issue to occur)To Reproduce 1) Enable the DMA domain on Zephyr by setting CONFIG_DMA_DOMAIN to y. 2) Remove the
ifndef __ZEPHYR__
check insrc/platform/imx8/platform.c
,platform_init()
function from the following sequence:3) Run the following test script:
Reproduction Rate 100%
Expected behavior The IPCs shouldn't get an error.
Impact annoyance - the logs don't work properly because of it
Environment 1) Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
Screenshots or console output Sample 1: (happened in the beginning, without running the test script)
Sample 2: (happend after 11 minutes of running the test script)
Note 1) Without enabling DMA trace, I was able to run the test script for at least 12 hours without the problem occurring (stopped because I thought it was enough, not because of the problem appearing) 2) There are no notable errors reported by sof-logger.