From: Francesco Saverio Pavone <pavone.lawyer@gmail.com>
To: Jiaxing Hu <gahing@gahingwoo.com>,
Chaoyi Chen <chaoyi.chen@rock-chips.com>
Cc: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Heiko Stuebner <heiko@sntech.de>,
Sandy Huang <hjc@rock-chips.com>, Andy Yan <andyshrk@163.com>,
Damon Ding <damon.ding@rock-chips.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Lucas Tanure <tanure@linux.com>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
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: Mon, 30 Nov 2026 12:13:29 +0100 [thread overview]
Message-ID: <9FA73405-B940-488F-8070-8243C3FC012A@gmail.com> (raw)
In-Reply-To: <20261130020431.487169-1-gahing@gahingwoo.com>
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
next prev parent reply other threads:[~2026-11-30 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 9:38 rk3588: VOP IOMMU faults at boot while the firmware window is on Francesco Saverio Pavone
2026-11-29 10:04 ` Jiaxing Hu
2026-11-29 16:40 ` Francesco Saverio Pavone
2026-11-30 1:48 ` Chaoyi Chen
2026-11-30 2:04 ` Jiaxing Hu
2026-11-30 11:13 ` Francesco Saverio Pavone [this message]
2026-11-30 11:40 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9FA73405-B940-488F-8070-8243C3FC012A@gmail.com \
--to=pavone.lawyer@gmail.com \
--cc=andyshrk@163.com \
--cc=chaoyi.chen@rock-chips.com \
--cc=cristian.ciocaltea@collabora.com \
--cc=damon.ding@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gahing@gahingwoo.com \
--cc=heiko@sntech.de \
--cc=hjc@rock-chips.com \
--cc=iommu@lists.linux.dev \
--cc=jagan@amarulasolutions.com \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robin.murphy@arm.com \
--cc=sebastian.reichel@collabora.com \
--cc=tanure@linux.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox