From patchwork Thu Aug 4 18:05:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 9264037 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A7AE36048B for ; Thu, 4 Aug 2016 18:05:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 945CA283E4 for ; Thu, 4 Aug 2016 18:05:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 856332841F; Thu, 4 Aug 2016 18:05:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C6FE283E4 for ; Thu, 4 Aug 2016 18:05:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E04036EA2E; Thu, 4 Aug 2016 18:05:32 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTPS id E452C6EA2E for ; Thu, 4 Aug 2016 18:05:29 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7F661AC30; Thu, 4 Aug 2016 18:05:28 +0000 (UTC) Date: Thu, 04 Aug 2016 20:05:27 +0200 Message-ID: From: Takashi Iwai To: Daniel Vetter In-Reply-To: <20160804164411.GS6232@phenom.ffwll.local> References: <1470240540-29004-1-git-send-email-chris@chris-wilson.co.uk> <20160804164411.GS6232@phenom.ffwll.local> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org Subject: Re: [Intel-gfx] [PATCH] drm/i915: Acquire audio powerwell for HD-Audio registers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 04 Aug 2016 18:44:11 +0200, Daniel Vetter wrote: > > On Wed, Aug 03, 2016 at 05:09:00PM +0100, Chris Wilson wrote: > > On Haswell/Broadwell, the HD-Audio block is inside the HDMI/display > > power well and so the sna-hda audio codec acquires the display power > > well while it is operational. However, Skylake separates the powerwells > > again, but yet we still need the audio powerwell to setup the registers. > > (But then the hardware uses those registers even while powered off???) > > Yeah feels fishy, but will at least duct-tape over the breakage from the > audio side. Most likely the reg writes go exactly nowhere and there's a > bug on the audio side. And this patch doesn't fix that. Well, if the relevant code paths are only over these callbacks, I guess the following fix would work instead. Can anyone check? Takashi diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 89dacf9b4e6c..88ad391452ae 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1021,8 +1021,8 @@ static int azx_runtime_resume(struct device *dev) snd_hdac_i915_set_bclk(bus); } else { /* toggle codec wakeup bit for STATESTS read */ - snd_hdac_set_codec_wakeup(bus, true); - snd_hdac_set_codec_wakeup(bus, false); + snd_hdac_display_power(bus, true); + snd_hdac_display_power(bus, false); } }