Repository navigation
hda: dma preload timeout - #783
Conversation
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
|
@jajanusz CI still pending ? |
|
@lgirdwood looks like someone introduced new 'feature' that triggers check on approval, because it restarted CI when you approved this PR |
|
@lgirdwood also please wait for @keyonjie tests before merging this |
|
sorry, didn't have enough time to test this on my UP2, now testing started. |
|
ah, it do taking effect, my stress test fails easily at iteration 27. |
|
that means we have about 4% possibility that the BF will never arrive at preload(e.g. trigger start), that is 4% possibility for FW hang at start a pipeline. |
| (chan->state & HDA_STATE_BF_WAIT)) { | ||
| if (deadline < platform_timer_get(platform_timer)) { | ||
| return -ETIME; | ||
| } |
There was a problem hiding this comment.
could you please only emit a warning or error, and still return success to let the trigger_start continue?
For user, 1/2 ms noise is tolerable, comparing to the start failed annoyance.
There was a problem hiding this comment.
I'm not sure that it's a good idea. Maybe it solves your problem but looks like architectural/design flaw. Timeout is timeout - usually error caused by something external to the FW (HW or driver error), if you want to preload something it should happen, otherwise you get error. I guess we need something like start without preload.
What is root cause of your problem, why it cannot preload in time (or at all) ?
There was a problem hiding this comment.
I'm not sure that it's a good idea. Maybe it solves your problem but looks like architectural/design flaw. Timeout is timeout - usually error caused by something external to the FW (HW or driver error), if you want to preload something it should happen, otherwise you get error. I guess we need something like start without preload.
What is root cause of your problem, why it cannot preload in time (or at all) ?
I don't know what is the root cause of the problem why buffer never full at some cases, we have followed the sequence Marcin suggested in driver side, haven't you met this issue with slim driver stress testing?
There was a problem hiding this comment.
@keyonjie BF at the startup is the only way to control the flow and align the state of HW ptrs and sw ptrs. Could you re-test with the DMI L0 forced all the time? Do you hit the t/o again?
There was a problem hiding this comment.
@keyonjie The current cavs/pm_runtime.c cavs_pm_runtime_force_host_dma_l1_exit() forces L0 for short time (PLATFORM_FORCE_L1_EXIT_TIME). Please do a quick test with the bit toggled early once and do not toggle it back.
There was a problem hiding this comment.
@mmaka1 thanks for explain. I didn't get why it is named "L0 forced", I thought "L1 exit" means invalidate the L1 cached data and write it back to physical memory so couldn't imagine what L0 related there.
Thanks for the hints, I think it's better to merge this PR now and report any BF errors based on that for future debugging and fixes.
@mmaka1 @lgirdwood @jajanusz are you OK with it?
There was a problem hiding this comment.
IMO it's good to merge. Timeout is better than freezing, so it's improvement anyway.
@keyonjie
I think it would be good to close old issue #723 when this is merged and create new issue that explains problem better (that it's going to be timeout) + what steps/env are needed to reproduce potential bug with BF.
|
@jajanusz can you check the CI before I merge, it should have rerun last night but I still see an issue |
|
@lgirdwood |
|
hi @mmaka1 @slawblauciak @lgirdwood the new created item #856 is to track the remaining issue. |
Implementation for #723
I used
PLATFORM_HOST_DMA_TIMEOUTthat looks to be defined for all platforms, but is unused - name looks good for this purpose, so I guess someone could even declare it for that use.It's 50 microseconds for all platforms for now.
Signed-off-by: Janusz Jankowski janusz.jankowski@linux.intel.com