Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp917765pxb; Wed, 6 Apr 2022 04:14:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOUEb+Jst6GxZmaHsTkO3uvd/6q6rwNIIjfmWw0qv2y9HQ7RnNTDkRLSjZad1Va4W68qIi X-Received: by 2002:a17:902:c242:b0:156:a02c:dece with SMTP id 2-20020a170902c24200b00156a02cdecemr8038403plg.171.1649243658451; Wed, 06 Apr 2022 04:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649243658; cv=none; d=google.com; s=arc-20160816; b=yYxb3s1cdEqRVoOB+4pSg+ruSI6JniUFDShuR2Ef88++wFNf1WAwkx6IYbXIaNVwWd DGRBcvI7SVFVi3b1mzqm7r5l+DEg17tOrY9Tpr9MJz65mZ3Jd/wF7sa8toHTNeIBCztV rGbNduwlVdyI8XbIdxDmzx27LPpTinlYAcZIuvnwhdRyiOecIRqdnmQniRTTAQs8LcGl kZ4B8uGDrRAXjBsKiLILnmlyFJK/7WnOCjqcuewl3MLmJU7+r4usRcWom6forBUtuHFL uvBInTU5v43f1SJKxNymzaOrCLlTsMP1uJCpAlYQqpdbzxxRZS3WLgKyUXdDfOGgb22S mGRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=aTh+2zTXB89kA6vJktlW2fR9/Yqn4iAUDt+jiB/asfY=; b=Thi5RlIh9lBId6hV5InCNpHNVFQEaNFw04eA/7lZF8LR7H3lO0gRGTnezghzo3xFzh aviYRZwh6v1EBxttu3LlbPv0p8BA1rrqhCvbtpWQExSo6c8UxsZunCZW3uFwgOOV4xoc kunEdPvvMVvVptwoU5WQp3zB7v1eeNowWtn5o6Dh4axKwpyB/9+Ey1oOTrceAOaHCMHI 6AAkfNzatLPtS23R47o9z704otv0XhamVw102s574Obn0Fpw++iKo+eJgrR3WKHmzG8p VoVh9c/GzjyreiPFP3yGmwXyWGh0ouP5yNvnDFW/uKgIGxLjrs+UtJVbfOWWNz6sWe/U OfYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a9-20020a656549000000b003864fd7c214si14160504pgw.689.2022.04.06.04.14.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:14:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 967AD5D78BF; Wed, 6 Apr 2022 02:39:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1843209AbiDFBkC (ORCPT + 99 others); Tue, 5 Apr 2022 21:40:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356223AbiDEKXa (ORCPT ); Tue, 5 Apr 2022 06:23:30 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF2284AE15 for ; Tue, 5 Apr 2022 03:07:52 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] 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 1nbg62-00035f-JM; Tue, 05 Apr 2022 12:07:34 +0200 Message-ID: <48c9a0feb6e7b06c448308114245e165cf329661.camel@pengutronix.de> Subject: Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active From: Lucas Stach To: Adam Ford , Shawn Guo Cc: arm-soc , Tim Harvey , Adam Ford-BE , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Peng Fan , Linux Kernel Mailing List Date: Tue, 05 Apr 2022 12:07:32 +0200 In-Reply-To: References: <20211120193916.1309236-1-aford173@gmail.com> <319e976acb0a686e596b88520dbcda59c78afe9e.camel@pengutronix.de> <20220405064458.GA129381@dragon> 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 X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb 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-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, dem 05.04.2022 um 04:55 -0500 schrieb Adam Ford: > On Tue, Apr 5, 2022 at 1:45 AM Shawn Guo wrote: > > > > On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote: > > > On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach wrote: > > > > > > > > Hi Adam, hi Shawn, > > > > > > > > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford: > > > > > Enable the vpu-h1 clock when the domain is active because reading > > > > > or writing to the VPU-H1 IP block cause the system to hang. > > > > > > > > > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled") > > > > > Signed-off-by: Adam Ford > > > > > > > > > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c > > > > > index b8d52d8d29db..7b6dfa33dcb9 100644 > > > > > --- a/drivers/soc/imx/gpcv2.c > > > > > +++ b/drivers/soc/imx/gpcv2.c > > > > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = { > > > > > .map = IMX8MM_VPUH1_A53_DOMAIN, > > > > > }, > > > > > .pgc = BIT(IMX8MM_PGC_VPUH1), > > > > > + .keep_clocks = true, > > > > > }, > > > > > > > > > I missed this patch and just stumbled across it when looking at the git > > > > history. I don't think this patch is correct. The H1 GPC domain does > > > > not even have clocks assigned in the DT, so there is nothing to keep > > > > active. Also H1 is not a MIX domain, so it should not keep any bus > > > > clocks active, that is the job of the VPUMIX domain. > > > > > > > > While this patch is a no-op, as far as I can see, it still seems wrong > > > > and I think it should be reverted. > > > > > > At the time I sent this, I was working with some people in the media > > > group to split the G1 and G2 up in the imx8mq and add G1 and G2 > > > support in the imx8mm. I had inquired about the feasibility of using > > > the H1 encoder on the imx8mm, but I needed to read some registers from > > > the IP block to see which features were fused out. I tried several > > > different options to get the H1 to not hang when reading registers, > > > and that was the only solution I found that worked. I thought it odd > > > as well since the G1 and G2 decoders didn't appear to need this. > > > However, during the course of my investigation, I learned that the > > > JPEG encoder was fused out of the imx8mm, and there wasn't a plan to > > > add VP8 or H.264 encodering any time soon. Since it is, as you put > > > it, a no-op, I have no objections to reverting it. > > > > I do not quite follow. You claimed that the change fixes a system hang. > > Are we getting the hang back if we revert the change? > > It was hanging when I has trying to use the H1 VPU, and this did fix > it, but it seemed weird to me. Unfortunately, Hantro H1 driver that > is currently in Linux only supports JPEG, and the H1 VPU in the imx8mm > has JPEG fused out. As of right now, there is no H1 VPU consumer, so > there is nobody attempting to enable the H1 power domain, so it > remains a no-op. If it's reverted, we'll have to revisit the issue in > the future to prevent the hanging, but that will also require a new > Hantro driver. The H1 clock is not a bus clock, so there is nothing else that depends on this clock than the H1 encoder peripheral, which is why it should be handled by the future driver and not the power domain. Regards, Lucas