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 52E30606A32E for ; Mon, 30 Nov 2026 11:13:51 +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=xp4JUPSv; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=lytHLufc 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:References:Message-Id:Date: In-Reply-To:From:Subject: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=2ABoVblaVo9+58Kd6vMviWRyUhYgqhzqUawC6i0Tic0=; b=xp4JUPSvgi6lJpfE70PyOCOOFg aLAMtwxO7IriNVWM2s9m59HWL7JQ+uCzuvXdC5pPK6uEJpHZPcVDX7hkNSwrsz1546k5dQJYYBlTc Kt6O4GJN0eowIGoL5N5D8rJ0PU4cM5v27MqyDbXljv1gN5uFBp3dmWSz2dJsxl7pN6YQcy2I3Nfrc cZb54+mzp/Li4zMpoZpI63RzE7I0nS9cRu7HGHIMvR5swp68MxwxAAzej0h0uz/cJSEbQvDodJzEl FkzaO2lzbxdnGo5qpRlXCQ60DQiLdG4dZ7lNz5PsPpE1vn3J0mYfxxWqkULF9SgjR2aGdN3ExJWcn Qtn+JXzw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXzKN-00000004HhC-2NKw; Mon, 30 Nov 2026 11:13:47 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXzKK-00000004Hfs-02pi for linux-rockchip@lists.infradead.org; Mon, 30 Nov 2026 11:13:46 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-490c3ae81d3so6563112f8f.2 for ; Mon, 30 Nov 2026 03:13:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796037222; x=1796642022; darn=lists.infradead.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:from:to:cc :subject:date:message-id:reply-to:content-type; bh=Zz5icKJdSOg7K3/EAQbeXYNq8TynY/a0+TrFc4xiUZc=; b=lytHLufcUVPZ+SLH/zUDNWHbNp7jCW4k0M6e0FgsGwwrFSBkVL7z0Y8D1H9McvRueC As8/LNaFVnQFFGV0CeKxPLmnXGn5vp5mcQ9x4XrTZgr40iJMeotS7TE6oiUFuOMCDV0C aUOnKQjxgd6i9h78RGS4kQl5f5C94j60Zo9B5QvwXgefXFguI77K469OZvIIR9cDTyGJ vjukv/XvEkLM8mi5OxXtfizmJxjJPiCblxkGQaewiulctMGRweUvnQyfapy7DhJwE0xw yukhgnBs0/J02mxUnD8gs39sYrkj0ZaAQP8UsmKoSrLB4yEqiDk0ZLqIvfYBZNH/Rtb/ VAvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796037222; x=1796642022; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:content-type:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Zz5icKJdSOg7K3/EAQbeXYNq8TynY/a0+TrFc4xiUZc=; b=h+Gzy08YTa81wpryW92ZfI9rIYXY6S7VKmCSig4vufpKwJYjmH/w4hS1FbsXdgCycD /BFedY1S80ybxziIofg/YF4Pt2SKs5SL7iD2XTFiEHzX0VVfvWvmjEz34vfHxltJ+vUw F164YR68nHeS2X4BoCuLV1nfnYPL7W99NDsn78heGJvwHhymG/oih93ZF6JCwZmq0mN7 SeWeTHvjI3BGXVEEElb2AC8ySRiEIkbzhOHeSRereRvEB0rw4AEbJaiQxlYrQomV+nj4 tv6nldW3qPcByelaILN1vEennnysebKY50f33VjteZHcOTslkWjKJHsUlMGu1yq2cwUS k0Bw== X-Forwarded-Encrypted: i=1; AL+hErFSLVztXKrHaBm8lGk3b72YAXshONhuYYy0EZABKm36PpYE5BnPvzGZ/tIo8pYF5nAR0deDD/khMRU2LPAtJw==@lists.infradead.org X-Gm-Message-State: APuU4Z8eXqmYqJCooS8VkUWl/3ST0vgRebZ+cVxUhh3U3ZpytXVzm68b Ob8/w9QID/tBJwRvFvV6Qn3lYghb2eQ2BpZBX8IiQjEvUmzgc1E5Ex4= X-Gm-Gg: AZFdTZcgHYILqndVb/mqvDb+QMPp+Yp7jelyfZMtwaeid71WcTpd0NP+spUKrs8uBrn Xe/jkO54Du1WUF1EQE+VOH7jC56mvAr/AzoR514QQpKiZfbhbEgURsDaxQCZIX1BmCpeqzclsVs mGqAFiWez4cvftUJkqwYE74pt0vpK5GO3BfqJ9D9FAsQVJPYHtWJrRvbawTS1NYZPYvtuNJiu7f D2tyTlfbUJm2u6m/ppGGkDQdXbT4iiWuCJWL+P0i63j9VO1fUPLilqpuaJkoraEIsoekBEv1nZa ffo5puItrvKYP9KSe4kw9oCgfMm/JJ76QQbTkw2XBavXeC8Z4AaC+3OXtpHw6AKSXh/QhCpqX7v kNHDpvqGUIuoR21Z5fjOveSE3FsiVp1lF9exfo4y+K117vyQpx3V/wLejKrOTRPxIX7WS/x5egM ZcOG3bz1KwI8QbchWOZ1IouNblfHquRDf68KQdpk/cj5TF8oNiVHfhlu/XNS20lHtkdlxsiffhB kOEE1BOw8ogw/r68qGNixvipOPk8O71wWjFBdbDbTA4cJxGPl1M49ZzTgMcqdEjBHp9o3iLUzev YIavGhC6EvkJ47IV4ZVtWGbydoZtzOM63xOKV4RwFhEfH7KXc0MajqzUDC782P6iEIG0nKbLXah y3WPrbA== X-Received: by 2002:a05:6000:1a8f:b0:499:978:251a with SMTP id ffacd0b85a97d-4abb5db73d6mr67750701f8f.54.1796037222011; Mon, 30 Nov 2026 03:13:42 -0800 (PST) Received: from smtpclient.apple ([151.35.252.201]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6c61e53asm70131340f8f.59.2026.11.30.03.13.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Nov 2026 03:13:41 -0800 (PST) X-Archived-By: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3901.200.71.1.16\)) Subject: Re: rk3588: VOP IOMMU faults at boot while the firmware window is on From: Francesco Saverio Pavone In-Reply-To: <20261130020431.487169-1-gahing@gahingwoo.com> Date: Mon, 30 Nov 2026 12:13:29 +0100 Message-Id: <9FA73405-B940-488F-8070-8243C3FC012A@gmail.com> References: <16FDB47B-9986-417E-B081-89A381BE9411@gmail.com> <20261129100436.290926-1-gahing@gahingwoo.com> <47C82988-469A-4998-97EE-1D7E770C4EFB@gmail.com> <1c5a8286-d61f-4c7c-b2ff-33aac9018abe@rock-chips.com> <20261130020431.487169-1-gahing@gahingwoo.com> To: Jiaxing Hu , Chaoyi Chen X-Mailer: Apple Mail (2.3901.200.71.1.16) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261130_031344_758998_E78BFDE0 X-CRM114-Status: GOOD ( 23.93 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Heiko Stuebner , iommu@lists.linux.dev, Will Deacon , Joerg Roedel , Andy Yan , Lucas Tanure , Sandy Huang , linux-rockchip@lists.infradead.org, Damon Ding , Jagan Teki , Robin Murphy , Sebastian Reichel , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" X-Spam-Status: No, score=-0.8 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 Chaoyi, Jiaxing, Chaoyi wrote: > Why not just use iommu_map() to establish a 1:1 mapping? I tried that on the ROCK 5B+ with v7.4-rc4. It gets rid of the errors here, but it takes two mappings. The stall timeouts at 0.23 s come before the DRM driver has a domain. The VOP is in the default DMA domain by then. So there are two changes: 1. rockchip-iommu: .get_resv_regions = iommu_dma_get_resv_regions, so the core maps into the default domain a reserved-memory region that the VOP points at with memory-region and that names the VOP in iommu-addresses; 2. rockchip_drm_init_iommu(): map the same direct regions 1:1 in the DRM domain and reserve them in the drm_mm, before the first attach. To test them I added a node for the EDK2 buffer to the board DTS by hand (0xe6810000, 2560x1440x4). Boots with rk_iommu errors: fbdev client off fbdev client on plain v7.4-rc4 10 of 10 - 1+2, node removed 7 of 8 - 1 only, node 0 of 2 2 of 2 1+2, node 0 of 6 0 of 2 "Client off" is drm_client_lib.active=, where the first modeset is the compositor's. With the client on and only patch 1, the timeouts at 0.23 s are gone, but the VOP faults on the firmware buffer at the fbdev modeset, 0.39 to 0.40 s: rk_iommu fdd97e00.iommu: Page fault at 0x00000000e6810400 of type read and again at 14 to 15 s, together with the two timeouts. So the second mapping is needed, and the window is still being read long after the first modeset. I have not looked at why patch 1 alone is enough with the client off, and I do not know why one of the eight boots without the node was clean. With the node and both patches the picture stayed on the TV through the boot, with no black screen. Jiaxing wrote: > On EFI boots the address would have to come from screen_info As far as I can tell there is none to read on this board. It boots EDK2, then GRUB with a DTB loaded by GRUB, and no efifb or simpledrm comes up, with the TV on or off. I have not found out why. So here the node would have to be written by the firmware, and I only know the address for this one mode. > the 1:1 mapping has to outlive the initial modeset I keep it until the domain is freed. Still open: the VOP bindings do not allow memory-region; with IOMMU_DMA=n (32-bit ARM) both changes do nothing; and only the first VOP is asked for its regions, which is wrong for RK3399. If this is the direction you want, I can fix those and send the two as an RFC with a binding patch. I have not tested with the clk sync_state series. The two patches were written with Claude (Anthropic). I ran the boots above on my board and checked the logs quoted here. Francesco _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip