From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v2 0/6] Runtime PM support (hda/tegra) Date: Tue, 22 Jan 2019 09:25:53 +0100 Message-ID: References: <1548142401-22841-1-git-send-email-spujar@nvidia.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 9C20A26687D for ; Tue, 22 Jan 2019 09:25:55 +0100 (CET) In-Reply-To: <1548142401-22841-1-git-send-email-spujar@nvidia.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Sameer Pujar Cc: alsa-devel@alsa-project.org, broonie@kernel.org List-Id: alsa-devel@alsa-project.org On Tue, 22 Jan 2019 08:33:15 +0100, Sameer Pujar wrote: > > Background > ========== > The device power management operations can be controlled with the help of > runtime power management (runtime PM) framework. In this case hda driver > can register runtime PM callbacks with the power management core (PM core). > Idea is to put the device in low power mode, when it is not getting used. > The clocks and power domains can be turned off when no use case is running > on the device. Current patch series adds necessary support to manage hda > device at runtime. > > Change log > ========== > v1: > ------ > Patch-1: "ALSA: hda/tegra: runtime power management support" > * runtime PM enable/disable added in device probe/remove > * runtime PM calls are forbidden if AZX_DCAPS_PM_RUNTIME is not enabled > in driver flags > * worker thread uses pm_runtime_get_sync to invoke ->runtime_resume and > pm_runtime_put to invoke ->runtime_suspend. The callbacks are added > in subsequent patches > > Patch-2: "ALSA: hda/tegra: get clock handles early in probe" > * Clock handles required for hda are acquired early in the probe. This > is done to make use of runtime PM framework to enable/disable clocks > in the callbacks. > > Patch-3: "ALSA: hda/tegra: add runtime PM callbacks" > * adds runtime PM callbacks for ->runtime_suspend(), ->runtime_resume() > * only skeleton for the callbacks is added, implementation is done in > the subsequent patches > > Patch-4: "ALSA: hda/tegra: remove redundant clock enable API" > * As worked thread is calling pm_runtime_get_sync() now, no need to > enable the clock explicitly. This can be managed from callback. > * Idea is to have clock enable and disable functionalities in runtime > PM callbacks and the driver can make use of the above. Any device > access should be preceded by ->runtime_resume() call. > > Patch-5: "ALSA: hda/tegra: implement runtime suspend/resume" > * clock enable and controller initialization is moved to > ->runtime_reesume() and the reverse is done during > ->runtime_suspend() > * Also during system wide power transitions, pm_runtime_force_resume() > is invoked in system resume() and similarly for suspend case. > > Patch-6: "ALSA: hda/tegra: fix kernel panic" > * kernel panic is happening befoe controller init is done > * added a flag "probed" to indicate the completion of device init > * this flag is checked before doing any device access. > > Patch-7: "ALSA: hda/tegra: add driver flag for runtime PM" > * driver flag AZX_DCAPS_PM_RUNTIME is added if CONFIG_PM is enabled. > * otherwise runtime PM calls will be forbidden and act as dummy calls > > v1-->v2 > ------- > Patch-1: "ALSA: hda/tegra: runtime power management support" > * no change > Patch-2: "ALSA: hda/tegra: get clock handles early in probe" > * no change > Patch-3: "ALSA: hda/tegra: add runtime PM callbacks" > * no change > Patch-4: "ALSA: hda/tegra: remove redundant clock enable API" > * no change > Patch-5: "ALSA: hda/tegra: implement runtime suspend/resume" > * Patch-6(v1) commit is melded into this commit > * instead of new flag "probed", chip->running status is used > to know the completion of probe > Patch-6: "ALSA: hda/tegra: add driver flag for runtime PM" > * This commit is similar to Patch-7(v1) > * AZX_DCAPS_PM_RUNTIME is unconditionally added and CONFIG_PM > under which above flag was added is removed > > ========= > > Sameer Pujar (6): > ALSA: hda/tegra: runtime power management support > ALSA: hda/tegra: get clock handles early in probe > ALSA: hda/tegra: add runtime PM callbacks > ALSA: hda/tegra: remove redundant clock enable API > ALSA: hda/tegra: implement runtime suspend/resume > ALSA: hda/tegra: add driver flag for runtime PM Applied all patches now. Thanks. Takashi