From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F013606A332 for ; Sun, 29 Nov 2026 13:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=DlYEuVWe; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux.spacemit.com header.i=@linux.spacemit.com header.a=rsa-sha256 header.s=mxsw2412 header.b=C9erBynP DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:References:To:From:Subject:Cc:Message-Id:Date:Mime-Version: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=KajploFUUO++DU0sCx8L5Pji3AKTCURgjT8D6fXDEUI=; b=DlYEuVWe/MIXb+xOOgrExV9CF6 15HRbPGia4LxY5iJXEZjdkTK1/AXtsExDuyU3A+3jj19RvS0lebxyvvKMf8g8xC/4cq3LIQsEcVPR Qa/D/YRq/qdImPUTU0UutOHKVQV+SSWYNWkT+QSMexs5iPysCK8Wnzfgb1kutsMs0qQjfHfGaLF/k 58StdcQOhgLU3GAmEURET0KNO5YbN0sSHAztA1NmE6aBQvZzepHwd4yfyVdfUQ0iQmHk0xzHCPJPH io8aJmQtQ6ChrpNZ7WbOAODN/E68CKudr2TFqQfNpSDRZokG/4jIHBzqtEDCXGnmS0QQYH7efGbNX /KsNoVVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXfAD-000000023pn-0Y54; Sun, 29 Nov 2026 13:41:57 +0000 Received: from smtpbgeu2.qq.com ([18.194.254.142]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXfA5-000000023pN-09qC for linux-riscv@lists.infradead.org; Sun, 29 Nov 2026 13:41:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.spacemit.com; s=mxsw2412; t=1795959644; bh=AATlpRjuuUi0ETpL1iAvcFvbviLlIZF+JiakuhEe8Y0=; h=Mime-Version:Date:Message-Id:Subject:From:To; b=C9erBynPcmVpch02SJTxXmy1IlcOuGoxuhaC5gyOR3lFyLCWzw7VtyYul32PhEzml FseMsmwQ5itI/aR5fjcv99gUkfgarGbYkO8bsORpWXhbXv0rsLTZ0FV4j9Gl5ITyiH yZlxfIlK+eMfWusrqQnV+AfuKq4HcQgtLikKLrH4= X-QQ-mid: esmtpgz13t1795959636t2dab1ac3 X-QQ-Originating-IP: 6szGsY5Q9GZlubcf4z3N7EZnyNDHrwrCv1zUjXRc8BU= Received: from = ( [120.237.158.181]) by bizesmtp.qq.com (ESMTP) with id ; Sun, 29 Nov 2026 21:40:34 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 9297754955585051613 EX-QQ-RecipientCnt: 20 X-Archived-By: Mime-Version: 1.0 Date: Sun, 29 Nov 2026 13:40:33 +0000 Message-Id: Cc: "Alessio Belle" , "Luigi Santivetti" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Yixun Lan" , "Troy Mitchell" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , "Alexandre Ghiti" , , , , , Subject: Re: [PATCH v3] drm/imagination: re-check firmware idle state before runtime suspend From: "Troy Mitchell" To: "Gyeyoung Baek" , "Baihui Liang" X-Mailer: aerc 0.21.0-reader-ipc4 References: <20261127-img-pm-autosuspend-v3-1-3a65ee22d9b2@linux.spacemit.com> In-Reply-To: X-QQ-SENDSIZE: 520 Feedback-ID: esmtpgz:linux.spacemit.com:qybglogicsvrgz:qybglogicsvrgz3a-0 X-QQ-XMAILINFO: MLceTDIDNsx6PsDbQqW18W94/KbN3Vl0Q1PPr/J3InNvGmwR3WAAFkBs 5PR1Vv6Em5OagraLaCEGgsQz00SJU6rSp0iHC1z50Hb4FynctaI+oHHMB/bCjGmIGD8x4MA m2ToW/fZwTmDbSkb64tIL2F+DFyqCC2I3mJBUBR2nNBz+sECIIS9g0xmYudATSiRNkT10hH XKyAWAELDrCwB06GvXaVMjZJR6l++/da00h6RMr7G4uGSpbXuO5gM5EltW5zzkts05Yxbpc 6GltV40Jm0r7u3QEv8cLLy0+kA6CU30ahGLKCl//MAR3DGZhMtJlAs31r/l5RFsuFzVxEIp 2BmEgrkGDVLDg3/wZ8RC/NFlCHyNWGcPt2askgeidJnF3h0vmIpBK1NmO5ahjas0W/iBVM0 Ry86L8F6WYBswezIZ3vxibRy2rNqHBPclK1z6B8HN+TpjzBZtsbB6Z93fG6IxaziyuOTGHZ YhD0/jrg1bKRxU41s7i1mL0puwGU+AweZ2sWsOMZ4gDXzuWUZDq4NzlPZ1Z29t4oZX+Q+lz Eq5k/7MRMyirGucB/T3s6JkoVwmeJhq4sAVoRXR/XIF/qKUHRKITOjHbyYyWAt8jk5VT2e4 1usSdoXIttJ1LVO+kHxlccagXXV5Zg/fG9zhlFtwzuMiszjFlJ8mtEu/hRCrBKJxgp8ikUR 6NUX6s1N5Mdq33Ok2a0uM0OiBI/a84cWrEqclAOLr7Q911MGxiegG4By3E/VWn3XTNoIUkQ TAwVtCV08IH/eyAUtyyNEv8zFGt0J5BXDj6JXHBsIWZZ5GXruoIGHqMGdlQRrLjTi+5tJP6 eXE0Q48o80kAvDjrjZigCTTx6nj/WrVlGCzpGhKfDHa0fHOBnMeea9P+FYyztejH4EgZFdZ K2L4/vRxR0TYYQ7XICo6UVnAH9B+JDeaUyYoT151TOtGE8+V85NlHz1iCmJnD7pzsy6Ytvr B0FkEAvReUtbi9Bm/J3tsm1ZYIQscaHKlIjpLupCCM9aSZDzw30Xwfj5sjU8d0DWMYp/49s yW5FuLaneEb3DdlPcRC5fgNyh5WFTnxKB7ZlS2yY6ujVYGOVmV0CmG6Pcg3wZUcgba8pAoq z9gS8wY+35kXJQgA5f9U5Gzyd1oyxLo+U1+Df4rdLX4/pNJbfPmjBy0odk1zeBBnyFaRZAS J/Et X-QQ-XMRINFO: NI4Ajvh11aEjEMj13RCX7UuhPEoou2bs1g== X-QQ-RECHKSPAM: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261129_054150_042190_A9801F83 X-CRM114-Status: GOOD ( 21.43 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============3501179175658096951==" Sender: "linux-riscv" X-Spam-Status: No, score=-8.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 --===============3501179175658096951== Content-Type: multipart/signed; boundary=cb9dbe2248c62c4ef2a97a73e0941cfa431a716e2961fbb22d6405517adf; micalg=pgp-sha512; protocol="application/pgp-signature" --cb9dbe2248c62c4ef2a97a73e0941cfa431a716e2961fbb22d6405517adf Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Hi Gyeyoung and Baihui, On Sun Nov 29, 2026 at 6:27 AM GMT, Gyeyoung Baek wrote: > Hi Baihui, > > On Fri, Nov 27, 2026 at 12:41 PM Baihui Liang > wrote: >> >> pvr_power_device_idle() rejects runtime suspend while the firmware >> hasn't reached ROGUE_FWIF_POW_IDLE. The PM core doesn't reschedule >> idle notification after rejection, so no further pm_runtime_put() >> arrives on an idle GPU and the device stays powered indefinitely. >> >> Move the idle check into pvr_power_device_suspend() and return -EBUSY >> after pm_runtime_mark_last_busy() so the PM core reschedules the >> autosuspend timer and retries until the firmware is idle. >> >> Factor the power-off sequence into a helper and call it from the >> removal path with runtime PM disabled, bypassing the idle check. >> Power off before destroying the job and free-list ID arrays, since >> the IRQ handler can still process firmware commands during shutdown >> and look up free-list IDs. >> > > This looks like the right fix to me. However, testing it on J722S > exposed a separate, pre-existing issue: > - The firmware doesn't seem to report ROGUE_FWIF_POW_IDLE after boot > until it has processed a command. > - Without this patch the GPU just stays active after probe; with it, > runtime suspend is retried indefinitely. > > I've sent a fix for that separately [1]. I think that one should be > applied before this patch. With both, it works fine on J722S. Thanks for testing on J722S. I don't think this patch depends on [1], though. The post-boot idle report is a separate, pre-existing issue. So I'd leave the order to the maintainers, and Baihui doesn't need to mention the dependency. > > Two minor things: > - The Fixes tag seems to be missing (as sashiko suggested) Agreed. > - The reproduction steps from v1 (repeated vulkaninfo on K3) are no > longer in the commit message. It would be good to add them back, so > it's clear when the issue occurs. Yes, below the --- line. With these addressed: Reviewed-by: Troy Mitchell > [1] https://lore.kernel.org/dri-devel/20261129-pvr-fw-idle-after-boot-v1-= 1-f56572cc8f4c@gmail.com/ --=20 Troy Mitchell --cb9dbe2248c62c4ef2a97a73e0941cfa431a716e2961fbb22d6405517adf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJcEABYKAD8WIQSL4Ay2cExaPXAQcU2YCe+A+TM0LwUCawwrUSEcdHJveS5taXRj aGVsbEBsaW51eC5zcGFjZW1pdC5jb20ACgkQmAnvgPkzNC+DOQEAlu4B7Imqs7Iy jPCjabDoHPwD+wUb1tOXO341Y5FkufwBANZmmLcfgeI7dwmBpBon9BaB3EFbtgfk 79CTleJ6KpEH =KUNn -----END PGP SIGNATURE----- --cb9dbe2248c62c4ef2a97a73e0941cfa431a716e2961fbb22d6405517adf-- --===============3501179175658096951== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv --===============3501179175658096951==--