Skip to content

Trace mailbox shows garbage #81

Closed
Closed

Description

@keqiaozhang

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

Activity

  1. keqiaozhang commented on Aug 14, 2018

    @keqiaozhang
    Author
  2. plbossart commented on Aug 14, 2018

    @plbossart
    Member

    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.

  3. keqiaozhang commented on Aug 14, 2018

    @keqiaozhang
    Author

    Yes, the rmbox -t works fine, but memory window is full of garbage. I have changed the title.

  4. lgirdwood commented on Aug 14, 2018

    @lgirdwood
    Member

    Looks PM related, ie. we are in S0ix when reading the SRAM window and should cache the trace as context.

  5. plbossart commented on Aug 15, 2018

    @plbossart
    Member

    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...

  6. xiulipan commented on Aug 15, 2018

    @xiulipan

    @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.

  7. plbossart commented on Aug 15, 2018

    @plbossart
    Member

    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!

  8. keqiaozhang commented on Aug 15, 2018

    @keqiaozhang
    Author

    @plbossart We apologize for the misleading message, I just confirmed that this issue also happens for sof-dev branch. We will review our work.

  9. changed the title [-]sof-v4.18 branch: trace mailbox shows garbage[/-] [+]Trace mailbox shows garbage[/+] on Aug 15, 2018
  10. lgirdwood commented on Aug 15, 2018

    @lgirdwood
    Member

    I will add a feature enhancement for caching context prior to D3 / S0ix.

  11. plbossart commented on Aug 15, 2018

    @plbossart
    Member

    @keqiaozhang no hard feelings, it's a good finding, and we may be able to bisect to see where the problem happens.

  12. plbossart commented on Aug 15, 2018

    @plbossart
    Member

    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>
    
  13. plbossart commented on Aug 15, 2018

    @plbossart
    Member

    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

  14. keqiaozhang commented on Aug 16, 2018

    @keqiaozhang
    Author

    @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

    ASoC: SOF: allow runtime_pm for pci/acpi/spi device
    
    Allow runtime_pm to be enabled after probe is finished for
    pci/acpi/spi devices.
    

    I also checked with 64980d0, but failed to reproduce this issue.

  15. bardliao commented on Sep 14, 2018

    @bardliao
    Collaborator

    @mengdonglin @ZhendanYang @keqiaozhang The issue seems not to be reproducible now. Could you check it?

  16. ZhendanYang commented on Sep 14, 2018

    @ZhendanYang

    @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.

  17. added a commit that references this issue on May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1Blocker bugs or important featuresbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions