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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D544EC77B7A for ; Fri, 2 Jun 2023 20:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:Cc:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J1JEB/hkCSofyQdGb+M7N25qWmcrwSIs5ytvxIRW+pk=; b=0vqG2t9UsfbdsE qMsUabY12zyR0kbkjZx8wESryoo7lv7B86GyDp/S6+YUJAa5Qw1Tq9p3IUnYhKUm5TFr5bdI0Ynd7 +qiq8/U4PbyQhO5PhBRC+uwv+FfX6EswELb8SSzHANmLuxM8D0PuolSsTkYssFnvGGnLLPU7tqC1o D7xL29i7gaOmqI7qF+rMrX81aPtldv/KN2/ZtuYu8fJBD0PO8XnOcMf5D9RXZM9cG1SSmvz1fD05j ON8O/xJWS+L4Wpi/6E/zaUeOaubAthYKSRUVb58hf4WUWRJJGs5vmi24/57T0s+klAMFC985lQvpF bmldPHsnilKKQr6fq/iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q5B2g-007o8P-0q; Fri, 02 Jun 2023 20:06:34 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q5B2e-007o7H-0L for linux-arm-kernel@lists.infradead.org; Fri, 02 Jun 2023 20:06:33 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q5B2O-0007ge-2h; Fri, 02 Jun 2023 22:06:16 +0200 Message-ID: Subject: Re: [PATCH 2/2] soc: imx: gpcv2: prepare bus clocks early From: Lucas Stach To: Marek Vasut , Shawn Guo Cc: Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , patchwork-lst@pengutronix.de, linux-arm-kernel@lists.infradead.org, Luca Ceresoli , Laurent Pinchart Date: Fri, 02 Jun 2023 22:06:13 +0200 In-Reply-To: References: <20230602185417.4098937-1-l.stach@pengutronix.de> <20230602185417.4098937-2-l.stach@pengutronix.de> User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230602_130632_150334_1982D97A X-CRM114-Status: GOOD ( 18.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Marek, Am Freitag, dem 02.06.2023 um 21:12 +0200 schrieb Marek Vasut: > On 6/2/23 20:54, Lucas Stach wrote: > > Prepare the bus clocks during PGC domain driver probe. This avoids a > > potential deadlock when there a clock providers inside the domain, > > as this might end up trying to take the CCF prepare_lock from two > > different contexts, when runtime PM is trying to resume the PGC domain > > for the clock provider. By keeping the bus clocks prepared as long as > > there is a PGC domain driver attached, we don't need to take the > > prepare_lock in the domain power up/down paths. > > > > We don't want to do this for regular reset clocks, as this might lead > > to some PLLs being kept prepared that could otherwise be shut down. > > For the bus clocks this isn't a concern, as all the bus clocks are > > derived from always-on system PLLs. > > > > Signed-off-by: Lucas Stach > > --- > [...] > Isn't this similar approach to > > [PATCH] [RFC] soc: imx: gpcv2: Split clock prepare from clock enable in > the domain > > where Laurent (now on CC) reported that this still causes issues ? > > If not, then please ignore my comment here. Yes, that's right. It doesn't solve the clock provider (HDMI PHY) is inside a power domain itself issue. However it resolves the simple cases where we would deadlock due to the needed bus clocks, which is what happens when audiomix adds runtime PM support. So I still think it's a good idea in general, even if it doesn't solve all the problems. Regards, Lucas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel