From patchwork Wed Jun 3 01:30:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Libin" X-Patchwork-Id: 6531861 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C68819F1CC for ; Wed, 3 Jun 2015 01:39:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E08F020692 for ; Wed, 3 Jun 2015 01:39:00 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AB6262068A for ; Wed, 3 Jun 2015 01:38:59 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 45C5226586C; Wed, 3 Jun 2015 03:38:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C8D2126583F; Wed, 3 Jun 2015 03:38:48 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 61E7E265850; Wed, 3 Jun 2015 03:38:47 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 1A55C2657F4 for ; Wed, 3 Jun 2015 03:38:39 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 02 Jun 2015 18:38:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,543,1427785200"; d="scan'208";a="501860021" Received: from younglee-grantley.sh.intel.com ([10.239.159.178]) by FMSMGA003.fm.intel.com with ESMTP; 02 Jun 2015 18:38:37 -0700 From: libin.yang@intel.com To: alsa-devel@alsa-project.org, tiwai@suse.de Date: Wed, 3 Jun 2015 09:30:15 +0800 Message-Id: <1433295015-547-1-git-send-email-libin.yang@intel.com> X-Mailer: git-send-email 1.9.1 Cc: Libin Yang Subject: [alsa-devel] [PATCH] ALSA: hda - remove controller dependency on i915 power well for SKL X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Libin Yang For SKL, only the HDMI codec is in the display power well while the HD-A controller isn't. So the controller flag 'need_i915_power' is not set to release the display power after probe, and the codec flag 'link_power_control" is set to request/release the display power via bus link_power ops. Signed-off-by: Libin Yang --- sound/pci/hda/hda_intel.c | 9 +++++++-- sound/pci/hda/patch_hdmi.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 391e4f8..e5597fd 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -345,6 +345,11 @@ enum { #define use_vga_switcheroo(chip) 0 #endif +#define CONTROLLER_IN_GPU(pci) (((pci)->device == 0x0a0c) || \ + ((pci)->device == 0x0c0c) || \ + ((pci)->device == 0x0d0c) || \ + ((pci)->device == 0x160c)) + static char *driver_short_names[] = { [AZX_DRIVER_ICH] = "HDA Intel", [AZX_DRIVER_PCH] = "HDA Intel PCH", @@ -1976,8 +1981,8 @@ static int azx_probe_continue(struct azx *chip) * display codec needs the power and it can be released after probe. */ if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { - /* Baytral/Braswell controllers don't need this power */ - if (pci->device != 0x0f04 && pci->device != 0x2284) + /* HSW/BDW controllers need this power */ + if (CONTROLLER_IN_GPU(pci)) hda->need_i915_power = 1; err = snd_hdac_i915_init(bus); diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 73c20c0..407978b 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2339,7 +2339,7 @@ static int patch_generic_hdmi(struct hda_codec *codec) * can cover the codec power request, and so need not set this flag. * For previous platforms, there is no such power well feature. */ - if (is_valleyview_plus(codec)) + if (is_valleyview_plus(codec) || is_skylake(codec)) codec->core.link_power_control = 1; if (is_haswell_plus(codec) || is_valleyview_plus(codec))