Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2025833imu; Fri, 14 Dec 2018 04:42:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/VyqHMXvPIlXweCQD5AOU7znsuBrEFtis8IW4WkwSWLorfB5HGra9SiSZkTronne9OwFDSX X-Received: by 2002:a17:902:981:: with SMTP id 1mr2693675pln.142.1544791367341; Fri, 14 Dec 2018 04:42:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544791367; cv=none; d=google.com; s=arc-20160816; b=JE6b/UachUf95WmMEK4psvrpDR3qa1ynm3aqaGZTYv/3TbmhoVkk4CzKAiBN51as92 baAuGFZ5ak+/D5OxB/v16oaXyESTaIXI4omvWjfaoiJNzJj0rW1g0cavEMg3V3lhAepD 8Iz2m8/taxMpNEZ11m/+1pWLMr8R7cVrtmJILYLgq3eDS/PpcQNuiA0yeBODxmEq6u7I LUDUCTL57ICUhdaq1nIdRgQhPMFDhTGJtMoVjS04lEGgSOj/HlPJjUGEyhyJ6E2RIE1l 1p4V2VxZl6Jrfh5ms8CsLnJPoYnK1cl3SzOfFRgBvtN6H4cPCx8KV/d76PN9u/RUa/sk +ejQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sp7mLn6cmAX6mOhiMlJRGbaxr2o98a9I94t2n/ba6DM=; b=XohjxjOGKH+xF1IeqTtAVS+B3zIjEOsV8pXMlrYpFw51npJ6laLo5NAkWQRQgegUHa dV423qs/AdvBORq1TKIPrdabnytkDfhXrC/5bYJUfgj7JihwQR341WGcAi8BEpf9JcRy Ai0s+e7HWCPclMFlcerGElQlw3gLj8UTO4zTsyTNgGQUK7oH9UDrMhGY/dJB2gkZeVtv +p4ToqrKIlBYS9zhiI5ltybmKjjJQwbR1KALjjBlhiBJPbW+Ttw3E1q7bmsWh2leGcN3 bccvFqT4EZtd8hqQTRd9mOiGB4+wtm6iNu3L3fsVpMcx04plmOvqlGKWq5Qvvf7qmbMF Z6Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ybtw13me; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si4066200plx.157.2018.12.14.04.42.32; Fri, 14 Dec 2018 04:42:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ybtw13me; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730624AbeLNMkd (ORCPT + 99 others); Fri, 14 Dec 2018 07:40:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:48600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730427AbeLNMEF (ORCPT ); Fri, 14 Dec 2018 07:04:05 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4B3C82146F; Fri, 14 Dec 2018 12:04:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544789044; bh=YSec+Rm0Fxia5Fn9XFaxxBG8WAuBnbHwcipAgFPb9zI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ybtw13mecLXGEMseuW0KRhcJXuAdOVECErlxRuFLWj1D6Yq4tgwEwKLaceAvGa6/4 e+9iMyZVF5HQUG/j2E3cQhxr/0daWia9AEKqkigfjpTTMUopED1lclCEQM5GEsk7en pTQDvsb2TMt8sJAIW894EJ/SAKXWzLDikY3pc1g8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sriram Periyasamy , Sanyog Kale , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 4.19 050/142] ASoC: Intel: Power down links before turning off display audio power Date: Fri, 14 Dec 2018 12:58:55 +0100 Message-Id: <20181214115749.061464808@linuxfoundation.org> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20181214115747.053633987@linuxfoundation.org> References: <20181214115747.053633987@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 4c10473d6ddf12ec124c9ff71a5d23bb5388478b ] On certain platforms, Display HDMI HDA codec was not going to sleep state after the use when links are powered down after turning off the display power. As per the HW recommendation, links are powered down before turning off the display power to ensure that the codec goes to sleep state. This patch was updated from an earlier version submitted upstream [1] which conflicted with the changes merged for HDaudio codec support with the Intel DSP. [1] https://patchwork.kernel.org/patch/10540213/ Signed-off-by: Sriram Periyasamy Signed-off-by: Sanyog Kale Signed-off-by: Pierre-Louis Bossart Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/hdac_hdmi.c | 11 +++++------ sound/soc/intel/skylake/skl.c | 12 ++++++------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c index 7b8533abf637..b61d518f4fef 100644 --- a/sound/soc/codecs/hdac_hdmi.c +++ b/sound/soc/codecs/hdac_hdmi.c @@ -2184,11 +2184,6 @@ static int hdac_hdmi_runtime_suspend(struct device *dev) */ snd_hdac_codec_read(hdev, hdev->afg, 0, AC_VERB_SET_POWER_STATE, AC_PWRST_D3); - err = snd_hdac_display_power(bus, false); - if (err < 0) { - dev_err(dev, "Cannot turn on display power on i915\n"); - return err; - } hlink = snd_hdac_ext_bus_get_link(bus, dev_name(dev)); if (!hlink) { @@ -2198,7 +2193,11 @@ static int hdac_hdmi_runtime_suspend(struct device *dev) snd_hdac_ext_bus_link_put(bus, hlink); - return 0; + err = snd_hdac_display_power(bus, false); + if (err < 0) + dev_err(dev, "Cannot turn off display power on i915\n"); + + return err; } static int hdac_hdmi_runtime_resume(struct device *dev) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 1d17be0f78a0..50f16a0f6535 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -752,6 +752,12 @@ static void skl_probe_work(struct work_struct *work) } } + /* + * we are done probing so decrement link counts + */ + list_for_each_entry(hlink, &bus->hlink_list, list) + snd_hdac_ext_bus_link_put(bus, hlink); + if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { err = snd_hdac_display_power(bus, false); if (err < 0) { @@ -761,12 +767,6 @@ static void skl_probe_work(struct work_struct *work) } } - /* - * we are done probing so decrement link counts - */ - list_for_each_entry(hlink, &bus->hlink_list, list) - snd_hdac_ext_bus_link_put(bus, hlink); - /* configure PM */ pm_runtime_put_noidle(bus->dev); pm_runtime_allow(bus->dev); -- 2.19.1