From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BB7D14D8CE; Mon, 13 Jan 2025 17:20:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736788846; cv=none; b=F8LNEGAZiZoh9r+ztQOJAjJjegIs+8UziUTHzyWJ4fEZJEkucz3VFl08gBk2ZpQJ667MEen1lXHGRiQo9xroZ6Sxt4QkrryvtpAPiVQ/91nP4FGieWOVmj4Eypq9KpPk6bycP0nXSegLZqCG4yi7TGSRdQ8ATYapgC/N6PFpmzE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736788846; c=relaxed/simple; bh=sI6JaOjakoEdGvRIdJ2kFY3O/ANYwTb0/8GsKasdb+w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IALeS88gmjmkSGHB0m/CwhsJ2urbSj75kPw12ueQLmphBlmjl2yVxoYRYW/l9kyqHTDLBeR9Uv7ytPNzBN26KTw0xyeLqp684uwpM4QhW8wfddrx7/4n814N9VScVAhfmT/OMaNmkqTaldOSB0jEDmEfDe9eHdYb831YSU9hgoQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 635391424; Mon, 13 Jan 2025 09:21:11 -0800 (PST) Received: from bogus (e133711.arm.com [10.1.196.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 891B33F673; Mon, 13 Jan 2025 09:20:41 -0800 (PST) Date: Mon, 13 Jan 2025 17:20:38 +0000 From: Sudeep Holla To: Ranjani Vaidyanathan Cc: Peng Fan , "Peng Fan (OSS)" , Sudeep Holla , "cristian.marussi@arm.com" , "ulf.hansson@linaro.org" , "arm-scmi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [EXT] Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state as off Message-ID: References: <20250110061346.2440772-1-peng.fan@oss.nxp.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jan 13, 2025 at 03:30:58PM +0000, Ranjani Vaidyanathan wrote: > -----Original Message----- > From: Sudeep Holla [mailto:sudeep.holla@arm.com] > Sent: Monday, January 13, 2025 7:49 AM > To: Peng Fan > Cc: Peng Fan (OSS) ; cristian.marussi@arm.com; Sudeep Holla ; ulf.hansson@linaro.org; arm-scmi@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; Ranjani Vaidyanathan > Subject: [EXT] Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state as off > > On Mon, Jan 13, 2025 at 11:37:23AM +0000, Peng Fan wrote: > > > Subject: Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state > > > as off > > > > > > On Fri, Jan 10, 2025 at 02:13:46PM +0800, Peng Fan (OSS) wrote: > > > > From: Peng Fan > > > > > > > > Per ARM SCMI Spec DEN0056E, page 16, "The platform may disable a > > > > resource if no agent has requested to use that resource." > > > > > > > > > > True, but ... > > > > > > > Linux Kernel should not rely on a state that it has not requested, > > > > so make state as off during initialization. > > > > > > > > > > IIUC, this was done to avoid any transitions if the bootloader like > > > U- Boot has turned on the resource and OS can just rely on that stay. > > > > But if it is not U-Boot turned it on? > > Not sure if I understand what exactly you mean by that. > [RV] Its possible that some other agent (M33/M7 running OS) in the system > turned on the power domain. Resources in the same power domain can shared > across agents. That being said, uboot provides mechanism to clean up any > power domains/clocks that it enabled. And our implementation of uboot does > disable any power domain it powered up for downloading of images or anything > else (display is a unique case if splash screen is enabled). > Right I was referring to the display as one of the example when I referred to the case where bootloader turns on the resource. > > > > Because the power domain is ON, kernel will not issue SCMI to platform > > to request it ON when kernel needs this power domain on. > > > > Yes, but the agent(via bootloader) has already requested the SCMI platform, > so it should be fine. No ? > [RV] As mentioned above, it need not be the bootloader. And secondly how to > handle this power domain during suspend/resume? It's possible that the agent > that turned on the power domain initially will have different wakeup > requirements. IMO Linux should completely be responsible for the power > domains that the drivers need. > May be I am still missing something. The genpd framework does issue power down of all the PD that are not used once we boot. Is that not sufficient. We are just not changing the pd state when initialising the genpds. Is that causing the issue ? I was under the impression that it shouldn't matter if the driver manages the genpds they consume and all unused ones get turned off eventually. What exactly is the issue for which this patch is the solution ? I think I might have not understood the issue properly here. Sorry if that is the case. -- Regards, Sudeep