Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp963960pxb; Wed, 6 Apr 2022 05:28:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSr/9G6x+Icaurepe3RzqUzj2Xdt/WPi5iQEjE6vm/QS3z1oNDAasVII3R5o95FLAe4vtx X-Received: by 2002:a17:902:ccd0:b0:156:7ac2:5600 with SMTP id z16-20020a170902ccd000b001567ac25600mr8513976ple.156.1649248102431; Wed, 06 Apr 2022 05:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649248102; cv=none; d=google.com; s=arc-20160816; b=Qm30UQjaO6GwXwlbR8H5H1jds9VJN4KZCXxD9I9lXjUbCcSo2PoUD2lfu3Fd0THnyN 3GIptLhmQ1+QIbKMqTxMxzvoH9colsERIPREBU9iMoKgDzKu8DPRqQjialsB2LHX3VS4 TpBnLzPM8EC+X72rvfMfdjmGgV/sKMdqtiEjgQzdu9hCKA1ZQBOj3gqzosdYiMM2w3fr eRcupMiG2khw6/U1LhvwpqmekQDU2hSXsPjw7COGv9amN+jfVSRHVhj5QgZqBnetQI+t Y1QPMSiCWiKcI/FkZyEMIfMOIEDDxeTwM+CQzQBDja2uDGuVarpNoSY4lcqA8CfdRklg RFjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=c9bcsFTz7o1nm6T6sdAD3XwMAfi3610i3GxsLP1j6GY=; b=li18DMMkHIvUOoJwvoSR7HR6Get2mlusKSQFU514JMJtjJOr67ALe7EHb3a5bO2dyh msf0hbQwyTGhA/eB14D/Dfq/URJzvGKwya/VbI4s2tjSndsjpEg5//J4BO69/068SzIf NYTV9d1vdyU4jIJA8kAgd8bNMLV+j3KWRSTfoimpRjCWoiudQTgk++mGiqwO1wnwpTaW qht+7Wk2ssrtYXvCHpXTbrJQjyYF+Uw5d26Tc5RqapC1i9lFV1BReJF9Wez58adB+pAP 6zkZ9R5N8hz8ZGL92SF8U0fiCwr2O8fi/GEp/J6jAOOJrzK0GmWAQI6lARlxS8g8t/Vc wsUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bWkvwp9w; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k6-20020a654646000000b003816043eff9si16298874pgr.494.2022.04.06.05.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 05:28:22 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bWkvwp9w; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BEF3C578E89; Wed, 6 Apr 2022 04:38:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1453496AbiDEWdI (ORCPT + 99 others); Tue, 5 Apr 2022 18:33:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353614AbiDEKIe (ORCPT ); Tue, 5 Apr 2022 06:08:34 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EAB0C3358 for ; Tue, 5 Apr 2022 02:55:31 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id bh17so25558700ejb.8 for ; Tue, 05 Apr 2022 02:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c9bcsFTz7o1nm6T6sdAD3XwMAfi3610i3GxsLP1j6GY=; b=bWkvwp9wKo7oK0PWO7l+fyV9iJKA01a9CrDr8gPEZrRYTMyPiW7uH0PnKGKYi/V2qO 8+wfTV2QScMQCc3WMmmmqbhUsW3o0XiKVmUddIdgEiKvHaiQw8RYSHt4WKn11X/jFTUu ctH0fgMUoQ+98re9S7pbjyVRqKnlEY1uFtBFZLPfMszzjCJn8KgyCkYsa1NENh34dlPl /w80buM+JoFVZQvayAM0w0MsuGRoCKDl064zYloABRjlWZ5G5nQRGMCPBuJnibxV4Ceu Sj2s9pXXsj9PwGVlnRUxP2pE96TGF/O5f287B225fOlHhvR5u6BgXEJEy9c5Fn1/+Fep /Kzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c9bcsFTz7o1nm6T6sdAD3XwMAfi3610i3GxsLP1j6GY=; b=pJg88aOrClXaLoetQO2nLSFNSyH1jwfmn+Z7dLo0Z/IgOv66A7p3uBL/esvupYvu9/ IuccWqGSPf/rDBo2lRsxDxAP7IkX/CivyycobVjIBNfh/JOaPv3lHgdq4HO0MMUMOdhu Vu5wXRt6DP0taL3OX8m1wLEH/JbwD40cdzcuuhekWWMlidDO5Qlilw1bjUchqnNhXjOX RFP0GV4URZMpoQ3Rf9rktuWqsagWCfy+rqiD1v2Yd7HD8rW+zTQMOX0QO5Ev36QvVmp/ vYKYYjHaoh0t6Dta69TNTR02Qtvu0izY9rNibe+RxZCvA+Ia3/5tG+Q+tjjaglrnJD4y TJag== X-Gm-Message-State: AOAM532OsCud0HBXXz+B/7lhMB43GSbvfEtpKbRR0UvtI+ntXLeFOkMS ulicltMCN9WJFNuhGYl9o7ObFZPZ+P+7+/AaICg= X-Received: by 2002:a17:906:7714:b0:6ba:8a6a:b464 with SMTP id q20-20020a170906771400b006ba8a6ab464mr2587437ejm.613.1649152529642; Tue, 05 Apr 2022 02:55:29 -0700 (PDT) MIME-Version: 1.0 References: <20211120193916.1309236-1-aford173@gmail.com> <319e976acb0a686e596b88520dbcda59c78afe9e.camel@pengutronix.de> <20220405064458.GA129381@dragon> In-Reply-To: <20220405064458.GA129381@dragon> From: Adam Ford Date: Tue, 5 Apr 2022 04:55:18 -0500 Message-ID: Subject: Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active To: Shawn Guo Cc: Lucas Stach , arm-soc , Tim Harvey , Adam Ford-BE , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Peng Fan , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 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. adam > > Shawn