From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: lgirdwood@gmail.com, broonie@kernel.org,
pierre-louis.bossart@linux.intel.com
Cc: alsa-devel@alsa-project.org, ranjani.sridharan@linux.intel.com,
kai.vehmanen@linux.intel.com
Subject: [PATCH 2/2] ASoC: SOF: Intel: hda: Skip IMR boot after a firmware crash or boot failure
Date: Tue, 12 Jul 2022 15:09:36 +0300 [thread overview]
Message-ID: <20220712120936.28072-3-peter.ujfalusi@linux.intel.com> (raw)
In-Reply-To: <20220712120936.28072-1-peter.ujfalusi@linux.intel.com>
To make sure that we start from a clean state next time when the DSP is
powered up after a firmware crash or boot failure we must skip the IMR
booting attempt.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
sound/soc/sof/intel/hda-dsp.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index eddfd77ad90f..671c3e02d7df 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -620,8 +620,13 @@ static int hda_suspend(struct snd_sof_dev *sdev, bool runtime_suspend)
/*
* The memory used for IMR boot loses its content in deeper than S3 state
* We must not try IMR boot on next power up (as it will fail).
+ *
+ * In case of firmware crash or boot failure set the skip_imr_boot to true
+ * as well in order to try to re-load the firmware to do a 'cold' boot.
*/
- if (sdev->system_suspend_target > SOF_SUSPEND_S3)
+ if (sdev->system_suspend_target > SOF_SUSPEND_S3 ||
+ sdev->fw_state == SOF_FW_CRASHED ||
+ sdev->fw_state == SOF_FW_BOOT_FAILED)
hda->skip_imr_boot = true;
hda_sdw_int_enable(sdev, false);
--
2.37.0
next prev parent reply other threads:[~2022-07-12 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-12 12:09 [PATCH 0/2] ASoC: SOF: Intel: hda: Use cold/purge boot after firmware crash Peter Ujfalusi
2022-07-12 12:09 ` [PATCH 1/2] ASoC: SOF: Intel: hda: Introduce skip_imr_boot flag Peter Ujfalusi
2022-07-12 12:09 ` Peter Ujfalusi [this message]
2022-07-12 15:10 ` [PATCH 0/2] ASoC: SOF: Intel: hda: Use cold/purge boot after firmware crash Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220712120936.28072-3-peter.ujfalusi@linux.intel.com \
--to=peter.ujfalusi@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=lgirdwood@gmail.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox