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 9B4EA606A31A for ; Tue, 1 Dec 2026 01:48:29 +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=PU/sz1oQ; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.a=rsa-sha256 header.s=default header.b=L/cgjIP2 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:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID: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=Ja8nFbDex7cTNieKA7vZh6L/1V0zfUUv5QDQvF8ccv4=; b=PU/sz1oQmcxTlr Nncdfkq22+4jZrQXG2gMLF7+1fMQGI9D4AvO25pPfOe3lw3oCyd7R5/2fqYUpITD/q0yZ+dBQ4LP6 fPvLCOk3wMlqh7mvVjqmhwIDDyYEg2ue66cX1ESY1sGRAeTmnDcfoDnKMZzPUQ4ZC1seDaQ951MBd tAwmPW2SnLKq1t9OkyKCbnyj2IhsdNBDixczcz9XXJy+yDvYN/bF51EkHmL3Vf8CBR9pdbW52Ppv4 NPcs584O0uMZS/P2PFt8dzcQWdTJ3vAFVkTByEduzuAAxWleDXdcVTFmXUTcoUl9nWr0cp/tIz6GW djfWAsiC48YqHTttlWPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYCyg-00000006Cws-3MGs; Tue, 01 Dec 2026 01:48:18 +0000 Received: from mail-m128141.netease.com ([103.209.128.141]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYCyc-00000006CvG-0N5g; Tue, 01 Dec 2026 01:48:17 +0000 Received: from [172.16.12.90] (unknown [61.154.14.86]) by smtp.qiye.163.com (Hmail) with ESMTP id 56972792c; Tue, 1 Dec 2026 09:48:09 +0800 (GMT+08:00) Message-ID: Date: Tue, 1 Dec 2026 09:47:54 +0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: rk3588: VOP IOMMU faults at boot while the firmware window is on To: Robin Murphy , Francesco Saverio Pavone , Joerg Roedel , Will Deacon , Heiko Stuebner , Sandy Huang , Andy Yan Cc: Damon Ding , Jagan Teki , Lucas Tanure , Jiaxing Hu , Sebastian Reichel , Cristian Ciocaltea , iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <16FDB47B-9986-417E-B081-89A381BE9411@gmail.com> Content-Language: en-US From: Chaoyi Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-HM-Tid: 0aa22f49b41f03a7kunm35395d6b1463d36 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZGR5KVktCSkMeTU9OShpIH1YVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlNSlVKTk9VSk9VQ01ZV1kWGg8SFR0UWUFZT0tIVUpLSE pKQk1VSktLVUpCWQY+ DKIM-Signature: a=rsa-sha256; b=L/cgjIP2Ge53y+0eZG0/kHBMR6hXRM03r1l/JRDVmfKylUuLeEucJWWY6YNV47/7XK02UaY4qxmLwE2RhxvPCjN9OZuwuwyv88/A5qEbLaq39g06TetGM4qrgzkceD2qyXZkazm3/GpjW2JI7fYazyl9Vv3LZEMVqCCfDPjDRzc=; s=default; c=relaxed/relaxed; d=rock-chips.com; v=1; bh=Ja8nFbDex7cTNieKA7vZh6L/1V0zfUUv5QDQvF8ccv4=; h=date:mime-version:subject:message-id:from; X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_174815_891477_D7B63706 X-CRM114-Status: GOOD ( 20.09 ) 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=-7.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 Robin, On 11/30/2026 7:40 PM, Robin Murphy wrote: > On 2026-11-29 9:38 am, Francesco Saverio Pavone wrote: >> Hi, >> >> On a ROCK 5B+ (RK3588) booted from EDK2 with the display on, plain >> v7.4-rc4 logs this around the VOP bind: >> >>   platform fdd90000.vop: Adding to iommu group 7 >>   ... >>   rk_iommu fdd97e00.iommu: Enable stall request timed out, status: 0x00001d >>   rk_iommu fdd97e00.iommu: Enable stall request timed out, status: 0x00030b >>   rockchip-drm display-subsystem: bound fdd90000.vop (ops vop2_component_ops) >>   rk_iommu fdd97e00.iommu: Page fault at 0x00000000e6810000 of type read >> >> Bank 0 stalls. Bank 1 is paging with a page fault active, bus id 0xc, >> and never stalls. The stall lines and a page fault come once more >> about 13 s into the boot. >> >> This looks like what Jagan Teki reported for RK3328 in 2023 [1], where >> Robin pointed out that resetting the IOMMU while bootloader framebuffer >> traffic is still going through is a problem of its own. Lucas Tanure's >> PX30 patch from 14 Nov [2] deals with the same kind of master at reboot. >> >> What I traced here: the firmware leaves one window enabled (Esmart2 on >> VP2) and it keeps reading its framebuffer. Paging is first enabled from >> the IOMMU's runtime resume, the read faults because that address is not >> mapped, and the stall times out. b10d5920cafa acks the stale fault, but >> the window is still running and faults again at once. A 7.2-rc5 tree >> without that commit logs the same two lines. Jiaxing Hu's patch from >> 23 Nov [3] does not change them either: both banks report paging >> enabled, so its check does not trigger. >> >> As an experiment, on a tree with Collabora's rockchip-devel on top, I >> disabled that window, put VP2 in standby and waited for it before >> letting the IOMMU enable paging. That took 22 and 31 ms in two boots >> and the two lines were gone in both. The hack does it from >> rockchip-iommu.c by writing VOP registers, so it is not a patch. I can >> post it for reference. >> >> Where should this be handled? The driver has no get_resv_regions, so >> iommu-addresses on a firmware framebuffer node would not help today. >> The reset that Collabora's tree does in vop2_bind() comes after the >> first paging enable: with it the page fault line is gone, the two stall >> lines stay. Or is the firmware expected to turn the display >> off? > > Yes, strictly the boot protocol per Documentation/arch/arm64/booting.rst includes "Quiesce all DMA capable devices [...]". However if you do want to properly support live splash screen handover then someone needs to hook up all the relevant reserved region handling in the IOMMU driver. The difference since 2023 is that we do now have common DT bindings and core infrastructure to allow for doing that in a standard and fairly straightforward way. I think you mean this series? Thank you, that's very helpful. https://lore.kernel.org/all/20230120174251.4004100-3-thierry.reding@gmail.com/ > > Thanks, > Robin. > >> One board, one firmware (EDK2 v1.1.1 for the ROCK 5B+). The plain >> v7.4-rc4 log is from a single boot; the Collabora-based tree shows the >> two stall lines on every boot. >> >> LLM agents (OpenAI Codex and Hermes) wrote the instrumentation and ran >> the boots on my board, and Claude helped write this mail. I went >> through the traces quoted here. >> >> Francesco >> >> [1] https://lore.kernel.org/all/20230330131746.1475514-2-jagan@amarulasolutions.com/ >> [2] https://lore.kernel.org/all/20261114133738.52817-1-tanure@linux.com/ >> [3] https://lore.kernel.org/all/20261123235154.315460-1-gahing@gahingwoo.com/ > -- Best, Chaoyi