From: Robin Murphy <robin.murphy@arm.com>
To: Chaoyi Chen <chaoyi.chen@rock-chips.com>,
Francesco Saverio Pavone <pavone.lawyer@gmail.com>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Sandy Huang <hjc@rock-chips.com>, Andy Yan <andyshrk@163.com>
Cc: iommu@lists.linux.dev, dri-devel@lists.freedesktop.org,
Sebastian Reichel <sebastian.reichel@collabora.com>,
Lucas Tanure <tanure@linux.com>,
Damon Ding <damon.ding@rock-chips.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Jiaxing Hu <gahing@gahingwoo.com>,
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: Tue, 1 Dec 2026 11:56:00 +0000 [thread overview]
Message-ID: <2ea06ad1-779d-47fd-aa7a-20aba129d14e@arm.com> (raw)
In-Reply-To: <d8fb719b-c30f-45cb-9f20-4dece304d8ff@rock-chips.com>
On 2026-12-01 1:47 am, Chaoyi Chen wrote:
> 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/
Yup, that's the one. The common get_resv_regions helper should handle
that side of things; what needs a bit of care is the IOMMU driver's own
initial probe and reset to make sure that it doesn't inadvertently block
reserved region in the period before we get to the default domain setup
in iommu_device_register() or a subsequent device_add notifier. With RPM
we might also need to do something to prevent suspending the IOMMU until
we're properly linked to the RPM state of a reserved-region consumer -
I've not thought about that aspect before...
Thanks,
Robin.
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2026-12-01 11:56 UTC|newest]
Thread overview: 10+ 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
2026-12-01 3:11 ` Chaoyi Chen
2026-11-30 11:40 ` Robin Murphy
2026-12-01 1:47 ` Chaoyi Chen
2026-12-01 11:56 ` Robin Murphy [this message]
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=2ea06ad1-779d-47fd-aa7a-20aba129d14e@arm.com \
--to=robin.murphy@arm.com \
--cc=andyshrk@163.com \
--cc=chaoyi.chen@rock-chips.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=pavone.lawyer@gmail.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