alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump()
@ 2021-05-28 16:05 Kai Vehmanen
  2021-05-28 16:05 ` [PATCH 2/2] ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails Kai Vehmanen
  2021-06-01 17:38 ` [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Kai Vehmanen @ 2021-05-28 16:05 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: kai.vehmanen, yung-chuan.liao, lgirdwood, pierre-louis.bossart,
	ranjani.sridharan, daniel.baluta, Bard Liao

From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

Clean up the hda_dsp_dump() function to avoid duplicating
the ROM status and error.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/intel/hda.c | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 126232a76a10..e1e368ff2b12 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -394,28 +394,21 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags)
 	struct sof_ipc_dsp_oops_xtensa xoops;
 	struct sof_ipc_panic_info panic_info;
 	u32 stack[HDA_DSP_STACK_DUMP_SIZE];
-	u32 status, panic;
 
-	/* try APL specific status message types first */
+	/* print ROM/FW status */
 	hda_dsp_get_status(sdev);
 
-	/* now try generic SOF status messages */
-	status = snd_sof_dsp_read(sdev, HDA_DSP_BAR,
-				  HDA_DSP_SRAM_REG_FW_STATUS);
-	panic = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_TRACEP);
-
+	/* print panic info if FW boot is complete. Otherwise, print the extended ROM status */
 	if (sdev->fw_state == SOF_FW_BOOT_COMPLETE) {
+		u32 status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_STATUS);
+		u32 panic = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_SRAM_REG_FW_TRACEP);
+
 		hda_dsp_get_registers(sdev, &xoops, &panic_info, stack,
 				      HDA_DSP_STACK_DUMP_SIZE);
 		snd_sof_get_status(sdev, status, panic, &xoops, &panic_info,
 				   stack, HDA_DSP_STACK_DUMP_SIZE);
 	} else {
-		sof_dev_dbg_or_err(sdev->dev, flags & SOF_DBG_DUMP_FORCE_ERR_LEVEL,
-				   "status = 0x%8.8x panic = 0x%8.8x\n",
-				   status, panic);
-
 		hda_dsp_dump_ext_rom_status(sdev, flags);
-		hda_dsp_get_status(sdev);
 	}
 }
 

base-commit: 058efb40641845432c52777443b3372dbc97c032
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails
  2021-05-28 16:05 [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Kai Vehmanen
@ 2021-05-28 16:05 ` Kai Vehmanen
  2021-06-01 17:38 ` [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kai Vehmanen @ 2021-05-28 16:05 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: kai.vehmanen, yung-chuan.liao, lgirdwood, pierre-louis.bossart,
	ranjani.sridharan, daniel.baluta, Bard Liao

From: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>

cl_dsp_init() dumps the ROM status if it fails after max
attempts before powering off the DSP. Remove the duplicate
log to print the ROM status and error in
hda_dsp_cl_boot_firmware(). These values are invalid anyway
as the DSP is already powered off.

Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/sof/intel/hda-loader.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c
index fc25ee8f68dc..6f4771bf9de3 100644
--- a/sound/soc/sof/intel/hda-loader.c
+++ b/sound/soc/sof/intel/hda-loader.c
@@ -385,11 +385,6 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)
 	if (i == HDA_FW_BOOT_ATTEMPTS) {
 		dev_err(sdev->dev, "error: dsp init failed after %d attempts with err: %d\n",
 			i, ret);
-		dev_err(sdev->dev, "ROM error=0x%x: FW status=0x%x\n",
-			snd_sof_dsp_read(sdev, HDA_DSP_BAR,
-					 HDA_DSP_SRAM_REG_ROM_ERROR),
-			snd_sof_dsp_read(sdev, HDA_DSP_BAR,
-					 HDA_DSP_SRAM_REG_ROM_STATUS));
 		goto cleanup;
 	}
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump()
  2021-05-28 16:05 [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Kai Vehmanen
  2021-05-28 16:05 ` [PATCH 2/2] ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails Kai Vehmanen
@ 2021-06-01 17:38 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-06-01 17:38 UTC (permalink / raw)
  To: alsa-devel, Kai Vehmanen
  Cc: daniel.baluta, pierre-louis.bossart, lgirdwood, Mark Brown,
	ranjani.sridharan, yung-chuan.liao, Bard Liao

On Fri, 28 May 2021 19:05:50 +0300, Kai Vehmanen wrote:
> Clean up the hda_dsp_dump() function to avoid duplicating
> the ROM status and error.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump()
      commit: 7ff562fed98043b9e9eafa11db6100feb08412aa
[2/2] ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails
      commit: d95eca7e3b9f7c1361fc1e1329247490abec678c

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-01 17:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 16:05 [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Kai Vehmanen
2021-05-28 16:05 ` [PATCH 2/2] ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails Kai Vehmanen
2021-06-01 17:38 ` [PATCH 1/2] ASoC: SOF: Intel: hda: clean up hda_dsp_dump() Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).