You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There're full of garbage in mailbox after system booted. this issue happens with kernel sof-v4.18 and sof-dev branch on APL and CNL, but cannot reproduce this issue on BYT.
Error log:
using 19.20MHz timestamp clock
0x0 [960767920505.705811] delta [********] value 0xffffffffffffffff
0x10 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x20 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x30 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x40 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x50 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x60 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x70 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x80 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0x90 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff
0xa0 [960767920505.705811] delta [0.000000] value 0xffffffffffffffff rmbox.log
I removed the RUNTIME_PM options and the error is still there.
I don't have time to look into this, and I don't have time to wait either, so I am tempted to push this v4.18 version as a force-in-function operation to fix this...
@keqiaozhang@lgirdwood
it seems to be error caused by PM_RUNTIME
manually disable all RUNTIME code will fix this.
We have discuss this yesterday @plbossart
I found that we may have some error in
int snd_sof_runtime_suspend(struct device *dev)
{
return sof_suspend(dev);
}
int snd_sof_suspend(struct device *dev)
{
/* suspend if dev is runtime_active */
if (pm_runtime_active(dev))
return sof_suspend(dev);
return 0;
}
RUNTIME_PM option will not influence the runtime pm from the above code.
well, I've lost five hours of my time due to a misleading bug report . This rmbox issue already exists for topic/sof-dev, meaning there was no new bug introduced by the 4.18 transition. GAH!
Git bisect points to the following bad commit - definitively linked to runtime_pm.
64980d0c14a5257e85763b6b77f0d0bb29812a16 is the first bad commit
commit 64980d0c14a5257e85763b6b77f0d0bb29812a16
Author: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Date: Fri Jul 20 00:12:15 2018 -0700
ASoC: SOF: decrement device usage counter after booting firmware
Decrement device usage counter for both the sof device
and the pci/acpi/spi device.
Without this change the runtime_usage count never reaches 0
and the device will not suspend.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Couple of findings on the resume flow:
PCI_TCSEL is not updated on resume - different from Skylake driver
CGCTL.MISCBDCGE is not updated on resume - different from Skylake driver.
PPCTL_GPROCEN PPCTL_PIE are not enable on resume - different from Skylake driver
GPROCEN is a smoking gun, it defined how the BAR access maps to memory mapped configuration registers.
On suspend:
PGCTL register not updated to disable LP retention mode (LSRMD)
MISCBDCGE changes before resetting the link
@bardliao Yes, I haven't seen this issue for a long time. But I'm not sure which patch fixed this. I'll close it. We can reopen it if it occurs in the future.
Activity
keqiaozhang commentedon Aug 14, 2018
rmbox-t.log
dmesg.log
plbossart commentedon Aug 14, 2018
rmbox -t works fine (the rmbox-t.log file above shows the same)
rmbox without the -t doesn't work at all indeed.
If I am not mistaken, it means the DMA transfers work ok, but the memory window doesn't
@lgirdwood your input would be most useful here.
keqiaozhang commentedon Aug 14, 2018
Yes, the rmbox -t works fine, but memory window is full of garbage. I have changed the title.
lgirdwood commentedon Aug 14, 2018
Looks PM related, ie. we are in S0ix when reading the SRAM window and should cache the trace as context.
plbossart commentedon Aug 15, 2018
I removed the RUNTIME_PM options and the error is still there.
I don't have time to look into this, and I don't have time to wait either, so I am tempted to push this v4.18 version as a force-in-function operation to fix this...
xiulipan commentedon Aug 15, 2018
@keqiaozhang @lgirdwood
it seems to be error caused by PM_RUNTIME
manually disable all RUNTIME code will fix this.
We have discuss this yesterday
@plbossart
I found that we may have some error in
RUNTIME_PM option will not influence the runtime pm from the above code.
plbossart commentedon Aug 15, 2018
well, I've lost five hours of my time due to a misleading bug report . This rmbox issue already exists for topic/sof-dev, meaning there was no new bug introduced by the 4.18 transition. GAH!
keqiaozhang commentedon Aug 15, 2018
@plbossart We apologize for the misleading message, I just confirmed that this issue also happens for sof-dev branch. We will review our work.
[-]sof-v4.18 branch: trace mailbox shows garbage[/-][+]Trace mailbox shows garbage[/+]lgirdwood commentedon Aug 15, 2018
I will add a feature enhancement for caching context prior to D3 / S0ix.
plbossart commentedon Aug 15, 2018
@keqiaozhang no hard feelings, it's a good finding, and we may be able to bisect to see where the problem happens.
plbossart commentedon Aug 15, 2018
Git bisect points to the following bad commit - definitively linked to runtime_pm.
plbossart commentedon Aug 15, 2018
Couple of findings on the resume flow:
PCI_TCSEL is not updated on resume - different from Skylake driver
CGCTL.MISCBDCGE is not updated on resume - different from Skylake driver.
PPCTL_GPROCEN PPCTL_PIE are not enable on resume - different from Skylake driver
GPROCEN is a smoking gun, it defined how the BAR access maps to memory mapped configuration registers.
On suspend:
PGCTL register not updated to disable LP retention mode (LSRMD)
MISCBDCGE changes before resetting the link
keqiaozhang commentedon Aug 16, 2018
@plbossart
I also run a git bisect and the first bad commit points to:
commit 7cd8049
Author: Ranjani Sridharan ranjani.sridharan@linux.intel.com
Date: Tue Jul 24 19:54:00 2018 -0700
I also checked with 64980d0, but failed to reproduce this issue.
bardliao commentedon Sep 14, 2018
@mengdonglin @ZhendanYang @keqiaozhang The issue seems not to be reproducible now. Could you check it?
ZhendanYang commentedon Sep 14, 2018
@bardliao Yes, I haven't seen this issue for a long time. But I'm not sure which patch fixed this. I'll close it. We can reopen it if it occurs in the future.
bpf: sockmap, restore sk_write_space when psock gets dropped
scsi: target: fix hang when multiple threads try to destroy the same …
btrfs: fix warning when creating a directory with smack enabled
Merge pull request thesofproject#81 from Rust-for-Linux/this-module-r…
wifi: mac80211: fix memory corruption in minstrel_ht_update_rates()
LoongArch: BPF: Fix sign-extension mov instructions
bpftool: Fix missing pids during link show
mm/pagewalk: fix usage of pmd_leaf()/pud_leaf() without present check
LoongArch: BPF: Optimize sign-extention mov instructions
ALSA: usb-audio: Add quirks for HP Elite x3 Lap Dock