diff mbox series

ASoC: SOF: Intel: hda: turn off display power in resume

Message ID 20210224141541.3331254-1-kai.vehmanen@linux.intel.com
State Accepted
Commit 1372c76802bed271ddcfdd71b6fe3ea9254e6277
Headers show
Series ASoC: SOF: Intel: hda: turn off display power in resume | expand

Commit Message

Kai Vehmanen Feb. 24, 2021, 2:15 p.m. UTC
Turn off display power at the end of controller resume flow. This is now
possible with the changes done in commit 87fc20e4a0cb ("ASoC: SOF:
Intel: hda: use hdac_ext fine-grained link management"). As codec driver
is able to request the HDA link to be brought back up, the controller
no longer needs to blindly keep display power enabled.

Co-developed-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Keyon Jie <yang.jie@intel.com>
---
 sound/soc/sof/intel/hda-dsp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


base-commit: 9fd914d917da05641b42cab7d40bdf8ab06dac3b

Comments

Mark Brown March 1, 2021, 11:34 p.m. UTC | #1
On Wed, 24 Feb 2021 16:15:41 +0200, Kai Vehmanen wrote:
> Turn off display power at the end of controller resume flow. This is now
> possible with the changes done in commit 87fc20e4a0cb ("ASoC: SOF:
> Intel: hda: use hdac_ext fine-grained link management"). As codec driver
> is able to request the HDA link to be brought back up, the controller
> no longer needs to blindly keep display power enabled.

Applied to

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

Thanks!

[1/1] ASoC: SOF: Intel: hda: turn off display power in resume
      commit: b0fd1b9bd056dfa0e188b44f92efe5f39ac33882

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
diff mbox series

Patch

diff --git a/sound/soc/sof/intel/hda-dsp.c b/sound/soc/sof/intel/hda-dsp.c
index 5788fe356960..9900a058ba6e 100644
--- a/sound/soc/sof/intel/hda-dsp.c
+++ b/sound/soc/sof/intel/hda-dsp.c
@@ -678,7 +678,7 @@  static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
 	if (ret < 0) {
 		dev_err(sdev->dev,
 			"error: failed to start controller after resume\n");
-		return ret;
+		goto cleanup;
 	}
 
 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
@@ -704,6 +704,10 @@  static int hda_resume(struct snd_sof_dev *sdev, bool runtime_resume)
 	hda_dsp_ctrl_ppcap_enable(sdev, true);
 	hda_dsp_ctrl_ppcap_int_enable(sdev, true);
 
+cleanup:
+	/* display codec can powered off after controller init */
+	hda_codec_i915_display_power(sdev, false);
+
 	return 0;
 }