Skip to content

SOF DMA Trace: avoid logs clearance at runtime suspend/resume #306

Closed

Description

@keyonjie

We have enabled SOF Runtime Power Management on SKL+ platforms, where we will actually power off/on Audio DSP at suspend/resume, there, DMA trace will be re-initialized, those logs happened before last suspend will be overwritten from offset 0 at once after ADSP is resumed.

To fix this, we can do some extension to BDL setup function, e.g. add a member host_init_offset to store the last trace offset, and copying new generated trace logs to buffers(BDL entries) from this offset, with this implemented, FW won't overwrite the existed logs happened before suspend.

It is somehow different for SKL- platforms where we use GPDMA for DMA trace, we need to implement non-0 offset support to implement the similar feature, please refer to this:
thesofproject/sof#544

Activity

  1. ranj063 commented on Nov 20, 2018

    @ranj063
    Collaborator

    @keyonjie we dont have suspend/resume on SKL- platforms yet

  2. keyonjie commented on Nov 20, 2018

    @keyonjie
    Author

    @keyonjie we dont have suspend/resume on SKL- platforms yet

    thanks for clarification, then we can focus on skl+ implementation ATM.

  3. plbossart commented on Nov 20, 2018

    @plbossart
    Member

    well we don't even have SKL- support since the code doesn't even boot properly with the trace issues, so suspend-resume is not even a problem at this point. Gah.

  4. lgirdwood commented on Nov 22, 2018

    @lgirdwood
    Member

    @keyonjie will this be a driver only fix, or does it need FW change too ?

  5. keyonjie commented on Nov 23, 2018

    @keyonjie
    Author

    @lgirdwood this will be driver only fix for SKL+ platforms.

  6. xiulipan commented on Nov 23, 2018

    @xiulipan

    @keyonjie
    So this is for DMA trace only. I think for error trace we need some FW change too.

  7. changed the title [-]SOF Trace: avoid logs clearance at runtime suspend/resume[/-] [+]SOF DMA Trace: avoid logs clearance at runtime suspend/resume[/+] on Nov 23, 2018
  8. keyonjie commented on Nov 23, 2018

    @keyonjie
    Author

    @xiulipan right, it's for DMA trace only. for etrace, we need think about new solution to avoid clearance.

  9. plbossart commented on Nov 26, 2018

    @plbossart
    Member

    @keyonjie Rather than muck with DMA/BDL programming, I thought the recommendation was to save all traces in host memory before suspend?

  10. keyonjie commented on Nov 27, 2018

    @keyonjie
    Author

    @plbossart that's another thought, but I believe that's belong to user space(e.g. running tools such as sof-logger all the time and saving output to an log file, similar to kern.log or syslog?)

  11. keyonjie commented on Nov 27, 2018

    @keyonjie
    Author

    anyway, porting our DMA trace log to standard system trace is good idea.

  12. plbossart commented on Mar 24, 2019

    @plbossart
    Member

    @ranj063 @keyonjie is this trace support across suspend-resume a planned activity or is this dropped? There's been no update since November 26.

  13. ranj063 commented on Mar 24, 2019

    @ranj063
    Collaborator

    @plbossart I think this issue has been tabled for far too long. Let me check with @keyonjie this week and maybe see if @mengdonglin can assign someone else if Keyon is busy with WoV.

  14. kv2019i commented on Apr 3, 2019

    @kv2019i
    Collaborator

    Hey folks (especially @ranj063 and @keyonjie), I now made a pair of patches that makes "sof-logger -t" work more consistantly over suspends (both runtime and S3) -> PR781 linked above

    This basicly allows to get the traces if you have sof-logger running. If sof-logger is not running and you start it later, you'll get traces since last resume (but not before). The patched sof-logger works also with S3/D3 suspends (so not just with runtime pm).

    This is not necessarily a full replacement for Keyon's patchset, but it does improve trace consistency quite a bit already.

  15. ranj063 commented on Apr 3, 2019

    @ranj063
    Collaborator

    This basicly allows to get the traces if you have sof-logger running. If sof-logger is not running and you start it later, you'll get traces since last resume (but not before).
    Thanks @kv2019i why is this the case? is it because you reset the host_offset to 0 in your open? wondering is that is required.

  16. plbossart commented on May 27, 2020

    @plbossart
    Member

    @keyonjie @kv2019i is this still relevant?

  17. plbossart commented on Aug 11, 2020

    @plbossart
    Member

    @keyonjie @kv2019i no answer -> closing

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 featuresenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions