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 7AB6A606A320 for ; Tue, 1 Dec 2026 01:47:13 +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=ZIwAWXTU; 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=wOuRXsAz DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding: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-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=OPTOokv8joJ8W4DHipmborAhLIYXbpte7qkOLQZifAk=; b=ZIwAWXTU7o+vyeBFWLdIBV8TD4 HPWEov3RYjTGlx4a6ERKcfiAosYvW3CT/hvX5evQV8MDDCM/wmvmV3yvcww6c9/00XOHruHwGNkUY oJ4Y+NvwQPTpAm2GN4VfTA51pkvFZ5BJJ7Inq24IXxBDchdi9XO5R22Zo42fwuKeUV2G9BTWMUqsw G5whp/Cj346+okIIIxs9VsInhOTcpnyMvf3KX/8RCHNJuUqPYz8oZY/SCLE4rabHQtIoJrnullFxl iqf247nvCwmQBid5s5rixLfhyiGUx3ialI8jyuCTaE9cp5ZPqP0sxzZ7pK3rdMs+UvPE0lLuicUfo gaZWiRug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYCxW-00000006CnK-23VC; Tue, 01 Dec 2026 01:47:06 +0000 Received: from smtpbgbr1.qq.com ([54.207.19.206]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYCxQ-00000006Cmn-1X7z for linux-riscv@lists.infradead.org; Tue, 01 Dec 2026 01:47:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.spacemit.com; s=mxsw2412; t=1796089582; bh=7dMHK2a/9Uax4+pXKqMT4y3DWlUvrQQ5EGLRJsH/l9w=; h=Mime-Version:Date:Message-Id:Subject:From:To; b=wOuRXsAzfTBM7BF1Cq4gFk38ZmkJzBKZ0de/zHlxAPbCY8kfNZFBIcUI/ZgSjYF3V LM3t7K2uPbzrRpdmdiwDgLIhjQMHRfVolJ3OFOVsq/4ctFO0FgQazplWp6/G6KPLEN VTKGOgv+AGbirip7ZqhWsUm4Kw/JDQAEE/KAfSP0= X-QQ-mid: zesmtpgz6t1796089575td4350060 X-QQ-Originating-IP: tcFItvUw2yUTVu+nT6VqpXG1cUcZj0l+1Ef7S14zIhs= Received: from localhost ( [120.237.158.181]) by bizesmtp.qq.com (ESMTP) with id ; Tue, 01 Dec 2026 09:46:12 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 9981684194162239085 EX-QQ-RecipientCnt: 19 X-Archived-By: Mime-Version: 1.0 Date: Tue, 01 Dec 2026 09:46:12 +0800 Message-Id: Cc: "alessio.belle" , "luigi.santivetti" , "maarten.lankhorst" , "mripard" , "tzimmermann" , "airlied" , "simona" , "dlan" , "pjw" , "palmer" , "aou" , "alex" , "imagination" , "dri-devel" , "linux-kernel" , "linux-riscv" , "spacemit" Subject: Re: [PATCH v3] drm/imagination: re-check firmware idle state before runtime suspend From: "Baihui Liang" To: "Troy Mitchell" , "gye976" X-Mailer: aerc 0.17.0 References: <20261127-img-pm-autosuspend-v3-1-3a65ee22d9b2@linux.spacemit.com> In-Reply-To: X-QQ-SENDSIZE: 520 Feedback-ID: zesmtpgz:linux.spacemit.com:qybglogicsvrgz:qybglogicsvrgz6b-0 X-QQ-XMAILINFO: NvH2zBBgt3uTbHQBI0ANtSRwupee/uwac/ksp539uVSQMlQx6pxLatKi tP0ViUvthglO2HXmyB2DG5CHoL9E2ysBfs3tGR7UceVtrzHYlGmEpq14Xk9HGa7andIijh2 WwEXNh57I14JPTJtZTKHlnN14yh+nsEjFJaxqJURsEeAIz62IovLMEWFzAAtwiKomUUBcGH OhkxNhIKJZ/jVAy85lT1diwLWiDqfttMiFEavlOnICzX4XSe6y0Wo7xKb6dJm/SmIO3TfWO iVWeVNyBpYmDgMWMEOl1yIA8rn8czZ6deY7vAP92o8fggj74TISTDWtsvMfwXCrs1B+v/pP Cx/qJQYqQGnsL+62Ck0j8vnDUfQ5FdJI02oS8TRYpr+Z3mNyepmlH7uLKuSXDhL+7jD1wvB lhSGW9vxMynlHqf9Y2LCj8aP5j+xX8KiN2xDf+U7kiMnLZBzqApUBdqDYlMn6kDHNmJJL8Q vONr0VkI2HtA3JFQEgGyl3wvqLhN3FcmbKh8eRbQv3eJv2hked/wCaMeASncbpejXE6QVmO wfAhvssAkEVp1cqyV0ifmNXdMAAtsbk8BC/UwqYeoy7U11IeT6teOTKzXu4sYWic52GpxPf O6M9/pOwPyefLNSaZ4pCFXu/h6V3LMR+FvnmL6WvIVoasCCv4w86iNOWi1SVHu4/L+2qyNO SUjRRqF34yc7yK3wKCyE5USFbN0PGLjUT+C0zmEn6THqCEVTqCFssL2JxFl+xKzKv1eRg5P EFISCBL3NiYzXwMN8N7VbYOFkJDVNoyTdiBWH+kTskvkIRjNVzomOpsdrJ3mkneMRGneUVi 4zW4GeRrqgdxY8a+5ko4559dFrQkSliMHBQ8+C5Nr0b2XmCQ8SGMvPs2c9IPTJktMtZ4e7O mVlAdhN7CB5ouiBouWyrvrX1XfI5JU74Zr4k7n+wmlrmX47Pyh5iQIqosDt74ceiBfr4RGz 713ZcmwYaVbVV7BCDMj83PdZr2u+CPDmRKjnVqhbIboi1jkz7opT1vb4CoVld0URecWau8/ E32khiYWbI8PCAlVSLsZv8uegisHVKLukzOZZbetauIPHTuRQprIti4rVLXYuPWNT2fW/mf SCrnoV3Gsqb X-QQ-XMRINFO: NyFYKkN4Ny6FuXrnB5Ye7Aabb3ujjtK+gg== X-QQ-RECHKSPAM: 0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_174701_264983_F1AF0CD5 X-CRM114-Status: GOOD ( 29.20 ) 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 Hi Gyeyong and Troy, On Sun Nov 29, 2026 at 9:40 PM CST, Troy Mitchell wrote: > 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. Agreed with Troy and thanks for testing on J722S and catching that separate issue. I'll keep this patch standalone and leave the merge order to the maintainers. > > > > 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/ Thanks both for the testing and review! I'll add the Fixes tag and put the K3 reproduction steps back below the '---' line in v4. Since the maintainer also requested some code changes on this patch, I'll drop the Tested-by and Reviewed-by tags for v4 and CC you both once it's ready. Best regards, Baihui _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv