From: libin.yang@intel.com
To: alsa-devel@alsa-project.org, tiwai@suse.de
Cc: Libin Yang <libin.yang@intel.com>
Subject: [PATCH] ALSA: hda - remove controller dependency on i915 power well for SKL
Date: Wed, 3 Jun 2015 09:30:15 +0800 [thread overview]
Message-ID: <1433295015-547-1-git-send-email-libin.yang@intel.com> (raw)
From: Libin Yang <libin.yang@intel.com>
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 <libin.yang@intel.com>
---
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))
--
1.9.1
next reply other threads:[~2015-06-03 1:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 1:30 libin.yang [this message]
2015-06-03 5:39 ` [PATCH] ALSA: hda - remove controller dependency on i915 power well for SKL Takashi Iwai
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=1433295015-547-1-git-send-email-libin.yang@intel.com \
--to=libin.yang@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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