Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp661514lqo; Wed, 8 May 2024 10:45:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXWFNOVG8z2DXH2AmbALAY9tzTEGBd0JNsRT9KkGshNuxNymf5lAxKoBTVmNqRUJOHK42KYtjomGRtPBTPhNE72SNNh31oeI4dFNPDm1Q== X-Google-Smtp-Source: AGHT+IG8gde/uj0PGbtup0nNm2RE/SYomhD/RG90bRIM5MDRSPYHDWjPN/BEQUReaPPu3Fk3dRC7 X-Received: by 2002:a05:6808:3a91:b0:3c9:66bf:870b with SMTP id 5614622812f47-3c98532c585mr3313397b6e.55.1715190338067; Wed, 08 May 2024 10:45:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715190338; cv=pass; d=google.com; s=arc-20160816; b=NTlY21k+dSyeso+V/u8U0fnKVrVgYRStoYU/ba99n3nSjgUbIgec9D4pcuYdhRTE2S vnE2mPjZpvPqbIHka/8gN1LVdHoHYfAVj99ibchL9n9+sgyW17sKEEeaz6OQdYSzZWE+ H5j8WPiG4FDARXBv2wGyOVrJdcu8abCx0KsoS2QI239UQXHS+TsE5yv0a0bLgqvgHP+s gogEdbg5kpUoCZr8Ts5VUHxgCe8kQDqUEjUkg2h3hTyi5a+8ZidlR0fuWxM86BBn8rxP gge++pJHZI+zQ8aUgbAzSKg2LJ8LObXdlME6+PP0Q+BKIgUdrU+Payo+A+GjpldxXFhF yo6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id; bh=KVz/Z2qaI0PUDIirOSH52E0USqwXXHESV/LK/+bmG54=; fh=ozyLzOKInm8NC7HSoMPE26ZN/pnLJeI38++YPL78VuY=; b=S0T3xyEf15aMlCR/Tk4AeSBWVJ81Ayq5QcPRZJsOiY7soYYOFSefGCpCQ6rmw/f4BH ewXA7vUpqerc1j6lx2D7vY85Wu+7d3VW5Q3ujt98PZSczdaGWL7n+XNieXRkibwEQ4tj MUKHn8KS/TSfPHpEYCo3EGp+mBcqXuWk1s7pgTfI1f9OW8JhP/12+jCHbc5P1pE7n6Ep E0lwAlTpMFk4vAuuAfHt3jMYVo/yN2n0fxFERilLQ/8RjMyVfv5vJZLGcSxp9dQKBCLt jUwchqnhjdcC0254lqRbAEZANdtcO5sLZuxB208pi6k/MHLiWcdXo+VmiDVs0W9NbMED vKXw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-173658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173658-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iu14-20020ad45cce000000b006a0c7e65924si13649169qvb.513.2024.05.08.10.45.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 10:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-173658-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173658-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B96F51C2287C for ; Wed, 8 May 2024 17:45:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEC1812B154; Wed, 8 May 2024 17:45:33 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA69C79E1 for ; Wed, 8 May 2024 17:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715190333; cv=none; b=eUWmFfkeHqA8jEdVSDYkeUXxcHYAUL6LxG3SeazRK+jvcf59nmG8+B3delOBH1zwTvyRprXqESaOmcnGkcxW9Byxhms+FVqOAWJfMRHRzMwS316QMBdw1nBwS/x4efb4A/CgJdAx5AUIQRA1au2vYjIcwEgJ5EqW3qa/Ve5h7uE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715190333; c=relaxed/simple; bh=xixW1XrE6XUNfkUYsLnbxkjo7KyBQ68cdDDJ1LsQW7E=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=KcUbDSbW9hytNS00sIsb9RFdw9Y9wtMUYGWEGU5nbd5hx+XqO4R/ITVBEt3xZIMeuOobdCFXVAe6zmfE7EmkKbbWqGSR4EdPQFdbrAFcroEG8KszeFQNx5gC007hnCDQWUaovp7Yge7+MuYkdvN1j+IoYxvt+BHNlLxjkIz0pzs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[IPv6:::1]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s4lM3-0007bJ-Bb; Wed, 08 May 2024 19:45:23 +0200 Message-ID: <8636fb8d9809aaafbd8274ec0dbfc250e1113c73.camel@pengutronix.de> Subject: Re: iMX8M Mini suspend/resume hanging on imx8m_blk_ctrl_power_on() From: Lucas Stach To: Adam Ford , vitor Cc: linux-pm@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, vitor.soares@toradex.com, ulf.hansson@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, rafael@kernel.org, geert+renesas@glider.be, peng.fan@nxp.com, linus.walleij@linaro.org, u.kleine-koenig@pengutronix.de, marex@denx.de Date: Wed, 08 May 2024 19:45:22 +0200 In-Reply-To: References: <4e781d80fbec0db13555456ab8af6bdae6dee168.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Hi Adam, Am Mittwoch, dem 08.05.2024 um 12:30 -0500 schrieb Adam Ford: > On Fri, Apr 5, 2024 at 10:09=E2=80=AFAM vitor wrote: > >=20 > > Hi, > >=20 > > On Thu, 2024-04-04 at 16:53 +0100, vitor wrote: > > > Greetings, > > >=20 > > > I'm trying to suspend/resume our Verdin iMX8M Mini with VPU IP using > > > the latest 6.9.0-rc2 Kernel. While the system can suspend without > > > issues, it hangs on the resume routine. After some investigation, I > > > can > > > see the Kernel hanging on imx8m_blk_ctrl_power_on()[1] while resuming > > > the hantro-vpu power domain. > > >=20 > > > Any hint about that? > > >=20 > > > [1] > > > https://elixir.bootlin.com/linux/v6.9-rc2/source/drivers/pmdomain/imx > > > /imx8m-blk-ctrl.c#L101 > > >=20 > >=20 > + Lucas >=20 > > Looking at other child nodes of the pgc node, pgc_vpu_[g1|g2|h1] seems > > to be nested into pgc_vpumix. > >=20 >=20 > On the surface, that's how it appears and it would be consistent with > how the GPU's work with the GPC's for each GPU calling the gpumix. > However, the VPU's all reference the vpu_blk_ctrl which itself > references the vpumix. >=20 > Lucas, >=20 > You seem to know this driver pretty well. Do you expect the G1, G2, > and H1 PGC's to all reference the vpumix, or do you expect the > vpu_blk_ctrl to enable/disable the vpumix? >=20 Nope, that's incorrect, as discussed here: https://lore.kernel.org/all/9ce35b9bb5a15891f6bd01bd54b7dc84b3ba4021.camel@= pengutronix.de/ >=20 >=20 > > After applying the following changes to imx8mm.dtsi, the suspend/resume > > is working. > >=20 > >=20 > > @@ -739,16 +739,19 @@ pgc_vpumix: power-domain@6 { > > pgc_vpu_g1: power-domain@7 { > > #power-domain-cells =3D <0>; > > reg =3D ; > > + power-domains =3D <&pgc_vpumix>; > > }; > >=20 > > pgc_vpu_g2: power-domain@8 { > > #power-domain-cells =3D <0>; > > reg =3D ; > > + power-domains =3D <&pgc_vpumix>; > > }; > >=20 > > pgc_vpu_h1: power-domain@9 { > > #power-domain-cells =3D <0>; > > reg =3D ; > > + power-domains =3D <&pgc_vpumix>; > > }; > >=20 > >=20 > > I will prepare the patch to send in the next couple of days. >=20 > Please CC me when post the patch, and I can run some tests on my hardware= . The correct patch is already out: https://lore.kernel.org/all/20240418155151.355133-1-ivitro@gmail.com/ Regards, Lucas