summaryrefslogtreecommitdiff
path: root/sound/soc/sof/debug.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-10-06 14:06:30 +0300
committerMark Brown <broonie@kernel.org>2021-10-07 17:45:25 +0300
commit9ff90859b95f6c85ce2d671ecd1e95e91dbe7f15 (patch)
tree3358e4052d2a851e3331a02ada263b1c287afca4 /sound/soc/sof/debug.c
parent3f7561f74169e199f9d6f4f0cdb9eb681052381a (diff)
downloadlinux-9ff90859b95f6c85ce2d671ecd1e95e91dbe7f15.tar.xz
ASoC: SOF: Print the dbg_dump and ipc_dump once to reduce kernel log noise
Do not print the dump more than once to keep the kernel log cleaner in case of a firmware failure. When the DSP is rebooted due to suspend or runtime_suspend reset the flags to re-enable the dump prints. Add also a debug flag to print all dumps to get more coverage if needed. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20211006110645.26679-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/debug.c')
-rw-r--r--sound/soc/sof/debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/sof/debug.c b/sound/soc/sof/debug.c
index 3b85e0484411..221808a8e759 100644
--- a/sound/soc/sof/debug.c
+++ b/sound/soc/sof/debug.c
@@ -827,7 +827,9 @@ void snd_sof_handle_fw_exception(struct snd_sof_dev *sdev)
if (IS_ENABLED(CONFIG_SND_SOC_SOF_DEBUG_RETAIN_DSP_CONTEXT) ||
(sof_core_debug & SOF_DBG_RETAIN_CTX)) {
/* should we prevent DSP entering D3 ? */
- dev_info(sdev->dev, "info: preventing DSP entering D3 state to preserve context\n");
+ if (!sdev->ipc_dump_printed)
+ dev_info(sdev->dev,
+ "preventing DSP entering D3 state to preserve context\n");
pm_runtime_get_noresume(sdev->dev);
}