From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE748C433EF for ; Thu, 18 Nov 2021 21:29:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D879611F2 for ; Thu, 18 Nov 2021 21:29:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4D879611F2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DBD1017DC; Thu, 18 Nov 2021 22:28:55 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DBD1017DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637270985; bh=8iKw5QkZbxsMaxhNKhrSnGAxCXUKA3vSMsTrmdK45L0=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=O3laSuJmfDqaAu7fB0iEiirJUo5kyRI1bYHYBZ7/oO+h8Z45v3taZw0YxLiz6ERPY tXyDx/hMdUQ9yx4YgThuQo7WKN8ZfRy4JkFJTGNh0EmjItkPhvmVxgQZH6z1WdJ/NL 6FqMFjwEFBwxVPUQrs5JsVH19g+vaCbMZFohK74o= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 21B52F8026D; Thu, 18 Nov 2021 22:28:55 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 429FBF80272; Thu, 18 Nov 2021 22:28:33 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B6FE7F800FA for ; Thu, 18 Nov 2021 22:28:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B6FE7F800FA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cp3egkEr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pafceiVa" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 68F5521637; Thu, 18 Nov 2021 21:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1637270901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tj2qDPPH7/fdXs4s6fVfZvvEYvOEPb6jEe+qwBqRPH8=; b=cp3egkErElQpA+Ra7uYswz6PK0JERQXemVSktGQsv51ws29izSgOQCpgh45l1WaDKe6oXA 8GWSJ2sL2rkR0hWw8pX6gQ8btoYTXzeWV5YgbkegDJ5OIN4rH2Z06G3CcRat/kQ5vsu6zD 0Tpd8VWy1DwOkpYTTwrrmlZbpYO8axM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1637270901; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Tj2qDPPH7/fdXs4s6fVfZvvEYvOEPb6jEe+qwBqRPH8=; b=pafceiVa6nM/LRnWYfPESgkuUKJYb65IQix2SV4X5OsVD3au22KjfuJoo/zym6uLaAKgND H0295qba0vh5VsAQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 5B2CBA3B83; Thu, 18 Nov 2021 21:28:21 +0000 (UTC) Date: Thu, 18 Nov 2021 22:28:21 +0100 Message-ID: From: Takashi Iwai To: Heiner Kallweit Subject: Re: Warning due to "ALSA: hda: intel: More comprehensive PM runtime setup for controller driver" In-Reply-To: References: 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/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, Linux PM X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, 18 Nov 2021 21:33:34 +0100, Heiner Kallweit wrote: > > I get the following warning caused by 4f66a9ef37d3 ("ALSA: hda: intel: More > comprehensive PM runtime setup for controller driver"): > > snd_hda_intel 0000:00:1f.3: Unbalanced pm_runtime_enable! > > Not sure how this patch was tested because the warning is obvious. > The patch doesn't consider what the PCI sub-system does with regard to > RPM. Have a look at pci_pm_init(). > > I'd understand to add the call to pm_runtime_dont_use_autosuspend(), > but for all other added calls I see no justification. > > If being unsure about when to use which RPM call best involve > linux-pm@vger.kernel.org. Thanks for the notice. It's been through Intel CI and tests on a few local machines, maybe we haven't checked carefully those errors but only concentrated on the other issues, as it seems. There were two problems: one was the runtime PM being kicked off even during the PCI driver remove call, and another was the proper runtime PM setup after re-binding. For avoiding the former, only the pm_runtime_forbid() (and maybe pm_runtime_dont_use_autosuspend(), too) would suffice? Also, for PCI device, no need for pm_runtime_set_supended() at remove, right? thanks, Takashi