alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: SOF: Intel: hda: turn off display power in resume
@ 2021-02-24 14:15 Kai Vehmanen
  2021-03-01 23:34 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Kai Vehmanen @ 2021-02-24 14:15 UTC (permalink / raw)
  To: alsa-devel, broonie
  Cc: kai.vehmanen, yung-chuan.liao, lgirdwood, pierre-louis.bossart,
	ranjani.sridharan, daniel.baluta, Sathyanarayana Nujella

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(-)

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;
 }
 

base-commit: 9fd914d917da05641b42cab7d40bdf8ab06dac3b
-- 
2.29.2


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

* Re: [PATCH] ASoC: SOF: Intel: hda: turn off display power in resume
  2021-02-24 14:15 [PATCH] ASoC: SOF: Intel: hda: turn off display power in resume Kai Vehmanen
@ 2021-03-01 23:34 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-03-01 23:34 UTC (permalink / raw)
  To: Kai Vehmanen, alsa-devel
  Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart,
	ranjani.sridharan, Sathyanarayana Nujella, daniel.baluta

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

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 14:15 [PATCH] ASoC: SOF: Intel: hda: turn off display power in resume Kai Vehmanen
2021-03-01 23:34 ` 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).