From: Jianfeng Liu <liujianfeng1994@gmail.com>
To: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: "Rob Clark" <robin.clark@oss.qualcomm.com>,
freedreno@lists.freedesktop.org, iommu@lists.linux.dev,
"Dmitry Baryshkov" <lumag@kernel.org>,
"Christian König" <christian.koenig@amd.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
linux-media@vger.kernel.org,
"Bryan O'Donoghue" <bod.linux@nxsw.ie>,
"Jianfeng Liu" <liujianfeng1994@gmail.com>,
"Abhinav Kumar" <abhinav.kumar@linux.dev>,
"David Airlie" <airlied@gmail.com>,
"Jessica Zhang" <jesszhan0024@gmail.com>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
"Marijn Suijten" <marijn.suijten@somainline.org>,
"Robin Murphy" <robin.murphy@arm.com>,
"Sean Paul" <sean@poorly.run>, "Simona Vetter" <simona@ffwll.ch>,
"Will Deacon" <will@kernel.org>
Subject: [PATCH v1 0/2] drm/msm: followup - map page-less imported sg_tables
Date: Mon, 28 Sep 2026 13:38:49 +0800 [thread overview]
Message-ID: <20260928053901.7270-1-liujianfeng1994@gmail.com> (raw)
Hi Rob,
this is the follow-up I promised: it fixes the two remaining map
paths that still consume struct page/sg->length of imported
sg_tables, and therefore completes the DMABUF_DEBUG=y story when
applied on top of your series [1].
Test results on x1e78100 (Snapdragon X1E78100, DMABUF_DEBUG=y,
kernel v7.3-rc4 based), which is the machine that originally
reported the UCHE translation faults and the one hardware test
environment for imports of buffers not first exported by drm/msm:
- v7.3-rc4 stock: arm-smmu UCHE translation faults during hardware
video decode in clapper/chromium (bisected to 143755bdabaa9)
- your series alone: video plays via the userspace copy fallback,
zero GPU faults, but a WARN storm from __arm_lpae_unmap()
(472 traces within a minute of video playback) - every map of a
page-less sg_table silently maps nothing, so the matching unmap
finds no PTE and WARNs. This matches your cover letter saying
the map paths are not addressed by the series. Your patch 2
("mmap imported dma-bufs via the exporter") in particular works:
a test importing a linux,cma-heap buffer via
DRM_IOCTL_PRIME_FD_TO_HANDLE and mmaps it both through the heap
fd and through msm's GEM mmap sees the same memory through both
mappings, including writes visible in both directions.
- your series + this series: zero arm-smmu faults, zero io-pgtable
WARNs, and hardware video decode displays correctly in clapper
and chromium. The GPU per-process pagetable path is exercised
with real decoder capture buffers (videobuf2-dma-contig, 2MB
frames) and maps them from their DMA addresses.
Patch 1 exports iommu_get_dma_domain(), which msm needs to look up
the dma_addr -> phys mapping of imported buffers through the msm
drm device's DMA-API domain. On platforms where the drm device is
direct mapped (like mine: ae01000.display-controller is in no
iommu_group) the lookup degenerates to the identity; on platforms
where it sits behind a translated IOMMU the translation is needed.
Happy to rebase on whatever your tree looks like - and I can rerun
the full test matrix (WARN count, fault count, kmssink scanout of
real V4L2 frames, chromium/clapper hardware decode) on any revision.
[1] <20260926183051.25754-1-robin.clark@oss.qualcomm.com>
Jianfeng Liu (2):
iommu: export iommu_get_dma_domain()
drm/msm: map page-less imported sg_tables from their DMA addresses
drivers/gpu/drm/msm/msm_gem_vma.c | 9 ++++
drivers/gpu/drm/msm/msm_iommu.c | 90 ++++++++++++++++++++++++++++++-
drivers/gpu/drm/msm/msm_mmu.h | 13 +++++
drivers/iommu/iommu.c | 1 +
4 files changed, 111 insertions(+), 2 deletions(-)
---
base-commit: d6882ed4e5b3970a13d721a07d2737c4831cdced
branch: msm-map-followup-v1
--
2.47.3
next reply other threads:[~2026-09-28 5:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 5:38 Jianfeng Liu [this message]
2026-09-28 5:38 ` [PATCH v1 1/2] iommu: export iommu_get_dma_domain() Jianfeng Liu
2026-09-28 11:26 ` Robin Murphy
2026-09-29 3:28 ` Jianfeng Liu
2026-09-28 5:38 ` [PATCH v1 2/2] drm/msm: map page-less imported sg_tables from their DMA addresses Jianfeng Liu
2026-09-28 10:09 ` Christian König
2026-09-29 3:27 ` Jianfeng Liu
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=20260928053901.7270-1-liujianfeng1994@gmail.com \
--to=liujianfeng1994@gmail.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=bod.linux@nxsw.ie \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=iommu@lists.linux.dev \
--cc=jesszhan0024@gmail.com \
--cc=joro@8bytes.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=robin.murphy@arm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=sumit.semwal@linaro.org \
--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
all inboxes | Powered by JetHome®