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 EC502C433FE for ; Thu, 30 Sep 2021 15:54:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DAE9C615A7 for ; Thu, 30 Sep 2021 15:54:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346577AbhI3P4d (ORCPT ); Thu, 30 Sep 2021 11:56:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:41278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347054AbhI3P4b (ORCPT ); Thu, 30 Sep 2021 11:56:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD97E61411; Thu, 30 Sep 2021 15:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633017288; bh=yAvF0oaXK8W6D+jFlTBiLLGWoEkjwCO7hRxYI1y/LrE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=khJZ+J1xtOwUA7n2tTPgk7Axqa6ELe8mTWSzitgz7UZG7gix2Ali9FUD2vieswtJi /WLPjaU51EP+JEEMT2LfjfvEONz6/ftJO0Z28eHuc5MCeMePgvWgQEfUt6yh+f6I/N ksZUl1fHtaS4WSicVOSvY/bBB/HNGdMoCvdlZeeKbk9NlQM8BmomsvxiLbyIbA00fS zU2qesN0/NbDlf1nrDONRrMDr4buMEhbPTi73drjdJ2OmrBWVgDDoe9DpPzztcXE8D w2HVnUCD3SYELwuGh5KGBrPPblNult6tqzItuBh4uK2PoiENbFf2FTfNbDThk8xd21 hrZq+kA+d3FQQ== Message-ID: <25e5880dc5c2c00bc2c261bd12246289a2adb8b5.camel@kernel.org> Subject: Re: [PATCH 4/5] drm/vc4: hdmi: Move the HSM clock enable to runtime_pm From: nicolas saenz julienne To: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Mike Turquette , Stephen Boyd , Florian Fainelli , Michael Stapelberg , Linus Torvalds , Dave Stevenson Date: Thu, 30 Sep 2021 17:54:43 +0200 In-Reply-To: <20210922125419.4125779-5-maxime@cerno.tech> References: <20210922125419.4125779-1-maxime@cerno.tech> <20210922125419.4125779-5-maxime@cerno.tech> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org On Wed, 2021-09-22 at 14:54 +0200, Maxime Ripard wrote: > In order to access the HDMI controller, we need to make sure the HSM > clock is enabled. If we were to access it with the clock disabled, the > CPU would completely hang, resulting in an hard crash. > > Since we have different code path that would require it, let's move that > clock enable / disable to runtime_pm that will take care of the > reference counting for us. > > Since we also want to change the HSM clock rate and it's only valid > while the clock is disabled, we need to move the clk_set_min_rate() call > on the HSM clock above pm_runtime_get_and_sync(). > > Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver") > Signed-off-by: Maxime Ripard > Reviewed-by: Dave Stevenson > --- Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Regards, Nicolas 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 9423CC433EF for ; Thu, 30 Sep 2021 15:56:32 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5EB0D61411 for ; Thu, 30 Sep 2021 15:56:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5EB0D61411 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=Q35UMYV861DdOxWMI2yOGdkK1ZR1PQgSUOcsUaGi3ug=; b=DjyGNpkOb/0NGY u4waDEsuM7druUFSuyENWwwgaNMXfJriXxnE2ZRhBzZ5bLGEIHxz//m7E1/FvPMMo7VQZBgoY5moi bYCu4Jkx0MCaR5I92RrGJkqcQCOZXQpWMFWVd1ESLKxganyRzUwZLPv4e7eAF6X0eQeyQ3mO0wlGF FrTRRqnTsT1C2H72/eawaxYJzFlthY5qtNFO1OsU9PTC+REn3p08uTAOYwJ1crx7sYfnYKJzhlTDf 9SnSgDTlkbXk+qK3yXgTsUNQ0foMzQsXXTw0Ytgf3t33NfQTYT2+7r1aTtvqvclx9emk9U24yYYoY SW2g5tCgC3ppt6NcZb7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVyOh-00F2pz-2v; Thu, 30 Sep 2021 15:55:00 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVyOW-00F2nM-J4; Thu, 30 Sep 2021 15:54:49 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id AD97E61411; Thu, 30 Sep 2021 15:54:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633017288; bh=yAvF0oaXK8W6D+jFlTBiLLGWoEkjwCO7hRxYI1y/LrE=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=khJZ+J1xtOwUA7n2tTPgk7Axqa6ELe8mTWSzitgz7UZG7gix2Ali9FUD2vieswtJi /WLPjaU51EP+JEEMT2LfjfvEONz6/ftJO0Z28eHuc5MCeMePgvWgQEfUt6yh+f6I/N ksZUl1fHtaS4WSicVOSvY/bBB/HNGdMoCvdlZeeKbk9NlQM8BmomsvxiLbyIbA00fS zU2qesN0/NbDlf1nrDONRrMDr4buMEhbPTi73drjdJ2OmrBWVgDDoe9DpPzztcXE8D w2HVnUCD3SYELwuGh5KGBrPPblNult6tqzItuBh4uK2PoiENbFf2FTfNbDThk8xd21 hrZq+kA+d3FQQ== Message-ID: <25e5880dc5c2c00bc2c261bd12246289a2adb8b5.camel@kernel.org> Subject: Re: [PATCH 4/5] drm/vc4: hdmi: Move the HSM clock enable to runtime_pm From: nicolas saenz julienne To: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie Cc: linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Mike Turquette , Stephen Boyd , Florian Fainelli , Michael Stapelberg , Linus Torvalds , Dave Stevenson Date: Thu, 30 Sep 2021 17:54:43 +0200 In-Reply-To: <20210922125419.4125779-5-maxime@cerno.tech> References: <20210922125419.4125779-1-maxime@cerno.tech> <20210922125419.4125779-5-maxime@cerno.tech> User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210930_085448_720142_C83FCD2C X-CRM114-Status: GOOD ( 12.42 ) 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 On Wed, 2021-09-22 at 14:54 +0200, Maxime Ripard wrote: > In order to access the HDMI controller, we need to make sure the HSM > clock is enabled. If we were to access it with the clock disabled, the > CPU would completely hang, resulting in an hard crash. > > Since we have different code path that would require it, let's move that > clock enable / disable to runtime_pm that will take care of the > reference counting for us. > > Since we also want to change the HSM clock rate and it's only valid > while the clock is disabled, we need to move the clk_set_min_rate() call > on the HSM clock above pm_runtime_get_and_sync(). > > Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver") > Signed-off-by: Maxime Ripard > Reviewed-by: Dave Stevenson > --- Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Regards, Nicolas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel