summaryrefslogtreecommitdiff
path: root/sound/soc/sof/ops.h
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/ops.h
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/ops.h')
-rw-r--r--sound/soc/sof/ops.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h
index d143a35f16fc..c7670514aa68 100644
--- a/sound/soc/sof/ops.h
+++ b/sound/soc/sof/ops.h
@@ -243,19 +243,23 @@ snd_sof_dsp_set_power_state(struct snd_sof_dev *sdev,
/* debug */
static inline void snd_sof_dsp_dbg_dump(struct snd_sof_dev *sdev, u32 flags)
{
- if (sof_ops(sdev)->dbg_dump) {
+ if (sof_ops(sdev)->dbg_dump && !sdev->dbg_dump_printed) {
dev_err(sdev->dev, "------------[ DSP dump start ]------------\n");
sof_ops(sdev)->dbg_dump(sdev, flags);
dev_err(sdev->dev, "------------[ DSP dump end ]------------\n");
+ if (!(sof_core_debug & SOF_DBG_PRINT_ALL_DUMPS))
+ sdev->dbg_dump_printed = true;
}
}
static inline void snd_sof_ipc_dump(struct snd_sof_dev *sdev)
{
- if (sof_ops(sdev)->ipc_dump) {
+ if (sof_ops(sdev)->ipc_dump && !sdev->ipc_dump_printed) {
dev_err(sdev->dev, "------------[ IPC dump start ]------------\n");
sof_ops(sdev)->ipc_dump(sdev);
dev_err(sdev->dev, "------------[ IPC dump end ]------------\n");
+ if (!(sof_core_debug & SOF_DBG_PRINT_ALL_DUMPS))
+ sdev->ipc_dump_printed = true;
}
}