Description
Describe the bug
Occurred IO transfer timed out when run multi-pipline stress test.
To Reproduce
- Boot up
- Run with comman "./multiplex_pipeline-test_update.sh pcm0p pcm2p pcm5p pcm1c pcm4c"
script:
multiplex_pipeline-test_update.sh.txt
Reproduced rate
Round1 : Run 300 times, failed at 171th time.
Round2: Run 300 times, failed at 132th time.
Expected result
Run multi-pipline stress test successfully
Actual result
Occurred IO transfer timeed out during multi-pipline stress test
Dmesg
[ 1853.884397] intel-sdw sdw-master-0: intel_startup: SDW0 Pin2: start
[ 1853.884401] intel-sdw sdw-master-0: intel_startup: SDW0 Pin2: done
[ 1853.884403] Headphone: ASoC: open FE Headphone
[ 1853.884406] sof-audio-pci 0000:00:1f.3: pcm: open stream 0 dir 0
[ 1853.884407] sof-audio-pci 0000:00:1f.3: period min 192 max 16384 bytes
[ 1853.884408] sof-audio-pci 0000:00:1f.3: period count 2 max 16
[ 1853.884408] sof-audio-pci 0000:00:1f.3: buffer max 65536 bytes
[ 1853.884532] SDW0-Playback: ASoC: hw_params BE SDW0-Playback
[ 1853.884535] rt711 sdw:0:25d:711:0: rt711_pcm_hw_params rt711-aif1
[ 1855.910857] intel-sdw sdw-master-0: IO transfer timed out
[ 1857.959011] intel-sdw sdw-master-0: IO transfer timed out
[ 1857.959191] rt711 sdw:0:25d:711:0: [rt711_sdw_write] 7203 8283 <= 0031
[ 1860.007068] intel-sdw sdw-master-0: IO transfer timed out
Test recipe:
kernel: https://github.com/thesofproject/linux/tree/integration/soundwire-latest commit: d740a3e
FW: https://github.com/thesofproject/sof/commits/master commit: d740a3e
tplg: Same with FW branch, sof-cml-rt711-rt1308-mono-rt715.tplg
platform: CML Laptop with ALC711+ ALC1308+ ALC715 in SDW mode
Logs:
failed_multipipeline_test_171_dmesg.log
failed_multipipeline_test_171_all_logger.log
multipipeline_test_132_all_logger.log
multipipeline_test_132_dmesg.log
Activity
bardliao commentedon Nov 27, 2019
@YvonneYang2 Could you test it with bardliao@690b151 ?
YvonneYang2 commentedon Nov 28, 2019
Tested it 300 times, issue can still be reproduced with latest integration/soundwire-latest + bardliao@690b151
Run 500 times, failed at 243th time.
Dmesg:
failed_multipipeline_test_243_all_logger.log
failed_multipipeline_test_243_dmesg.log
bardliao commentedon Nov 29, 2019
Look like "Link power down failed: -11" can be seen on all the error dmesg log. Let's fix it first. @YvonneYang2 Could you test it with 0001-soundiwre-Intel-set-link_control-bits-again-when-it-.patch.txt?
patch
YvonneYang2 commentedon Nov 29, 2019
Tested it 500 times with latest integration/soundwire-latest (commit:d6078f9) +
0001-soundiwre-Intel-set-link_control-bits-again-when-it-.patch.txt
, IO transfer timed out issue and "Link power down failed: -11" both cannot be reproduced.
bardliao commentedon Nov 29, 2019
@YvonneYang2 To double confirm. Could you check it with below patch instead?
YvonneYang2 commentedon Nov 29, 2019
@bardliao
Issue can still be reproduced with latest integration/soundwire-latest (commit:d6078f9) + patch as above.
Run 300 times, failed at 175th.
Dmesg:
failed_multipipeline_test_175_all_logger.log
failed_multipipeline_test_175_dmesg.log
bardliao commentedon Dec 2, 2019
@YvonneYang2 Could you test it with #1573?
plbossart commentedon Dec 2, 2019
@bardliao what's interesting is that the only time when the error happens when the sequences for pm_runtime are interleaved:
so it's likely we need a mutual exclusion between links...
And looking at the code, it's pretty clear:
so what happens is that we have a common register which is accessed for different fields independently. that can't be good...
plbossart commentedon Dec 2, 2019
it's even worse for power-down, we also touch the glue logic
soundwire: intel: add mutex to prevent concurrent access to SHIM regi…
122 remaining items
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
CHROMIUM: soundwire: intel: revisit SHIM programming sequences.
CHROMIUM: soundwire: intel: revisit SHIM programming sequences.
CHROMIUM: soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.
soundwire: intel: revisit SHIM programming sequences.