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 70918606A327 for ; Sun, 29 Nov 2026 10:05: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=HJNoz1YR; dkim=pass (2048-bit key, unprotected) header.d=gahingwoo.com header.i=@gahingwoo.com header.a=rsa-sha256 header.s=fm2 header.b=mN+f+5sO; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=tZGQrODT DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From: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=1JHCpF0wmCvmD5xBxyBQBJRhN6JTKE0/iqBI+kMc/eY=; b=HJNoz1YRCfLdAD uQAO7urMglo90rOyksLPzQOjTUoxnbVhINd/j64/bPa2xin66txs0N/vAUmLis0Nu4LkJ0Cw2fE9C HIwnVG/qmG7TLPUDNy10LV0OT4TdXAFKvvDCzVGq3TqQwGrg3Nu6ToniqV86/vR0T73bAMKW7hk1x +DcV+2kzH7/NGdbKUZJxTd4k/IXkCA8xYZxDj+PfqLC4e9g5CL7ixT9U3iYRnjcadWM/ilEDtiI/b cmeReLNAc7p0aNWLQZ0ZBuhirQ2xaH8jU7VFcjlr+NL5nNj5t5K/kq50LZyuqF0artM2hucEqW7gE RE/Y5eeqqVXxD7a16jmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXbmA-00000001nmu-3O0I; Sun, 29 Nov 2026 10:04:54 +0000 Received: from fhigh-a4-smtp.messagingengine.com ([103.168.172.155]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXbm5-00000001nlM-2FRy for linux-arm-kernel@lists.infradead.org; Sun, 29 Nov 2026 10:04:52 +0000 Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 0150E14002EF for ; Sun, 29 Nov 2026 05:04:46 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Sun, 29 Nov 2026 05:04:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gahingwoo.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1795946685; x=1796033085; bh=1JHCpF0wmCvmD5xBxyBQBJRhN6JTKE0/ iqBI+kMc/eY=; b=mN+f+5sOzpaMDoUvBscVAW5HrRnFuJ0OEQcFNSvjPSIiqolQ gMenTrvlfKH+fYQ1v6SGbbHliTNLtv/Ea7vGs6CkMP2IVp0eCaTC07PMAo8U2ucA 2dw/wnvNcACrHoAIweR0THPqqfSCWxbUIQMbrL2GFlfU+F4vYroGRaebOyey5xeU +Bw/YqNgRwnxWyqN2TGJ1gCJp7YEF4qm54oSsN0MeXd/x+ngiS+t+751o7mOKrrx Lp+aLw7M7H7kHgT7xE9i07jPNqr6lFNnRDL6Ws54cBHtPV2fW1YZA2nwh+26ixeB 09ShyhHmUA8O6zbGvlLRuysDXxsnNOC9ltGYeQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1795946685; x= 1796033085; bh=1JHCpF0wmCvmD5xBxyBQBJRhN6JTKE0/iqBI+kMc/eY=; b=t ZGQrODT5hePrW72xkbuPwGuYihLe/eJn/18RBgRRV1KTW3BNsrzMfaw6KmFT8ouM KeuMUoCyy3UTf6j2M73Y4YsGrkl7T69yN9wo/E1mG6V0Ksa/RVHSHDGMZfnxyMPf x4tB/pub3/SSO7l7w+t0gALMu8Fn2YDz5QLLFeXwFvcybLU5bmmKK/vAIqiWnfDJ aMDnNlxB1LL9LHKyrO/2GUplDIB7aaMW9RrEukCgvxAkWxnWqDeeqt7CPpBf+VsK ZazNbwFfQw61txRQ6dAGIT64KO028fvg5NtnpsiG764tGG8Kti0PkFMwB+hgqEvk T6Bz7r5S4EbnV6VRKS/Zw== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=gahingwoo.com a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1795946685; d=gahingwoo.com; mf=PGdhaGluZ0BnYWhpbmd3b28uY29tPg==; rt=PGxpbnV4LWFybS1rZXJuZWxAbGlzdHMuaW5mcmFkZWFkLm9yZz4=; s=fm2:rsa-sha256:TGzdER7ZustmrENe7b3A2LPmcy+r7rUE5bEgsId0gHTwo6m Q+x8P5+s7PXvlh97uwzXudEu8PJeYFljhy2o0xbvhGkU9bzfIpRWT6U4R8GmL86r 4lFXYlZudgpB8Btps3cy0ny+9RtLwHMuM4RYy3CMuZfoOTxUQ5TaKvimqEuDrsFm 9UajjvJpp23m9xxE1sUBCP3PdNiictVPJDQYh4br5LVzwLpSXyhIKATr+6WvzEp1 xoufQ1SK3oTwASMX4YcA/WkAK84XkyNK7FpkEABT2pjpbUjBnTmcAssVzME+k1kp l3dHTd/p1/rO4qaA4mAOnvM/E2JhSaK2iioTu5w==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-transfer-encoding,content-type,date,feedback-id, from,in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:uN2LKgRcjdGn9KjD+mUXa/V0U99Dfr2Zt3By89vwTSo=:1JHCpF0wmCvmD5xBxyBQBJRhN6JTKE0/iqBI+kMc/eY=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEHM+rnMrhx1aPg1rsUFeAqSdTUz68VfzCEtfm6GvON9516IkStZTf4ndOL+XiyUR 3Tnvpt3qWmEY9u7GbHT/oMqs915101BFoSFYNrn4gBX69GGy7YzmFUgkuH0UvVh3CCRHtf LAWcZ6sVPqjCZUDohSwY/ATuW8yK9UzNMqA6QeBIGfJ+wEqgoiKoyog4Vo1v32bHlacn7M OJ49O3HhtWvTMqpp4x1DahS5bCeG1Q9TQqW57e4JZNXUNCGSwiTlvQhTo907R1EIoSeuGI VKKCfpFb+GO3RH1Bxp7PiPRfFB2898AzW6A+nznntsJQxyNb4C/tTErAXnYzPtHz1cqKgW JMR4+5Pbfu7aOhmZI2gFJhQgAJ1b6A/Ym+yHkSCSvnGq7s+jjxM6qCO8EYV2jONWpLK892 5FAaPoVPy+wBdcdL6Rqb0JLYpuHxl6DyOvxejeGzLs2XBP/4zY9FLGlJ3LwJ9nV8v7cyPl 5CSRpW9fLtRv1XNX2uyj1ymz4MGNi+pOOFf6P58aLDzS6fTakJgTXbcupTUAEQ9sKHGTfC Yyz0L6dEMYEg8LFmpwdzmP7P+iYdY3sWvkh6cp39v2ZS8bCt0TfhIvpXMROgzOKAJ/nG2g 86PXWhjnEhSrVeM86vqjFCQAcbMhC6L5+Dq3jEyqyWSTg4MhUEbA+mhCRDFw X-ME-Proxy: Feedback-ID: i7a5e4b5f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Nov 2026 05:04:38 -0500 (EST) From: Jiaxing Hu To: Francesco Saverio Pavone Cc: Joerg Roedel , Will Deacon , Robin Murphy , Heiko Stuebner , Sandy Huang , Andy Yan , Chaoyi Chen , Damon Ding , Jagan Teki , Lucas Tanure , Sebastian Reichel , Cristian Ciocaltea , iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: rk3588: VOP IOMMU faults at boot while the firmware window is on Date: Sun, 29 Nov 2026 23:04:36 +1300 Message-ID: <20261129100436.290926-1-gahing@gahingwoo.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <16FDB47B-9986-417E-B081-89A381BE9411@gmail.com> References: <16FDB47B-9986-417E-B081-89A381BE9411@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261129_020449_953478_548F4551 X-CRM114-Status: GOOD ( 14.93 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 Francesco, I am seeing the same behavior on RK3576 with my EDK2 port (edk2-rk3576, https://github.com/gahingwoo/edk2-rk3576). When booting Armbian 7.3.4-edge (with rockchipdrm built in) on a TaishanPi 3M, the firmware hands over control while Esmart0 on VP0 is still scanning out the HDMI framebuffer at 0xff190000. Shortly after the VOP binds, when it is first enabled, the kernel logs: rk_iommu 27d07e00.iommu: Enable stall request timed out, status: 0x00040b rk_iommu 27d07e00.iommu: Enable stall request timed out, status: 0x00001d rockchip-drm display-subsystem: [drm] *ERROR* POST_BUF_EMPTY irq err at vp0 This happened in 2 out of 3 HDMI boots where the VOP managed to bind. The 0x40b status matches your 0x30b (just with bus ID 0x10), meaning paging is enabled with an active page fault. On a DSI boot before my fix, the same pair of timeouts came on every DRM enable, and later a BUS_ERROR. To work around this on the DSI path, I added a quirk at ExitBootServices when booting Linux: it turns off the window, puts the VP into standby, and waits for DSP_HOLD_VALID. Essentially, it is your experiment implemented in the firmware. Across 32 DSI Linux boots since that change, I haven't seen a single rk_iommu error. Take that with a grain of salt, though, as most of those runs only captured partial serial logs. The HDMI path still hands over a live window for now, and I plan to quiesce it the same way. Regarding my IOMMU patch from Nov 23 [1]: that originated from an RK3576 NPU issue, where one bank kept paging after a core reset while the other didn't, causing the all-banks guards to skip the stall and breaking the force reset. You're right that it doesn't help here when both banks are paging. One data point from the OS side: my Windows display driver takes over the live window without tearing it down first. It avoids faulting by identity-mapping the firmware framebuffer in the VOP IOMMU right before enabling paging. Getting that seamless handover on Linux would need something like get_resv_regions in rockchip-iommu, so that iommu-addresses on the framebuffer node is honored. Quiescing in firmware works today without kernel changes, at the cost of blanking the screen until KMS sets a mode. A CM5-IO running Fedora (where rockchipdrm is built as a module) showed none of these faults across 16 boots in September (7.3.0-rc3-next). I suspect clk_disable_unused gates the VOP clocks before the module gets a chance to load, though I haven't verified that yet. Thanks, Jiaxing [1] https://lore.kernel.org/all/20261123235154.315460-1-gahing@gahingwoo.com/