From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=54.254.200.92 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795959744; b=tPGum1UNe3PAcAVxVpIdQCIeT78qLLXZHrfIN7Hsda3kOEluB7QLL6W8W8DCRkcRJ20t 9ZhyKp8Wax9TLaCzyhLMiw+d/2CIF9ejl3VidBJeVP3HoKfrI2cw+DAXIj5xa05ijyuaY 7iHPx6xoCO3D98o1/BCPmxZdI2Jk/mNYlqSLX8bqZxLc7jJwukejBzwEznnAbI+Yp4fz1 +Zc1Pjhag56M+KV/vOjSPm30Wp2sNUcLfdIUsLml+JElzgVi002pb5wGJBTJXF33wg2L7 DexlADvHlQcxYPYBDq/fNC+ZXuK6ivZh41h4mfb3uBpsXzqnbZVemnQurn7TZbnngTg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795959744; h=DMARC-Filter:DKIM-Signature:X-QQ-mid:X-QQ-Originating-IP:Received: X-QQ-SSF:X-QQ-GoodBg:X-BIZMAIL-ID:EX-QQ-RecipientCnt:Mime-Version: Content-Type:Date:Message-Id:Cc:Subject:From:To:X-Mailer:References: In-Reply-To:X-QQ-SENDSIZE:Feedback-ID:X-QQ-XMAILINFO:X-QQ-XMRINFO: X-QQ-RECHKSPAM; bh=AATlpRjuuUi0ETpL1iAvcFvbviLlIZF+JiakuhEe8Y0=; b=JqelwP2PRfm46F6DKEyjdgxsIjcH3ELK/Kg5lKznWqm24GOpQ1aY/FmkOCjRUPv5/Muy 46+HqZrmIrEdsu/s24g3CorvCLDilvBj5oRsLF6uD6bpqXArSH8d7HhGNDODKys2JzdC6 a0WoHGXOZGTu4hZAefXi6kQkJoCrYbSfatyTLlV2J/SkAwcd+d6Yotb2lGvfy2/LqLsAF 4zemMFOJg3BqKNjr/hOIPVStWPkFLLNoPT5FfabJNM3AL5rBL4Jh+ZYrAR1UWOt4NorRL UNnY5QQtJEzUEaBJVqrfpQ3C6wllI2y5gzz7VaYqDcrKeWuV93PVtNOA9u7hmPpu9Kw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=linux.spacemit.com; spf=none smtp.mailfrom=linux.spacemit.com; dkim=pass header.d=linux.spacemit.com header.i=@linux.spacemit.com header.a=rsa-sha256 header.s=mxsw2412 header.b=C9erBynP; arc=none smtp.remote-ip=54.254.200.92 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF552606A31C for ; Sun, 29 Nov 2026 13:42:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BF552606A31C Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux.spacemit.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.spacemit.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (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; 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Type: multipart/signed; boundary=cb9dbe2248c62c4ef2a97a73e0941cfa431a716e2961fbb22d6405517adf; micalg=pgp-sha512; protocol="application/pgp-signature" 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 --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--