Re: [PATCH v1 2/2] drm/msm: map page-less imported sg_tables from their DMA addresses

From: Jianfeng Liu

Date: Mon Sep 28 2026 - 23:31:08 EST


Hi Christian,

On Mon, Sep 28, 2026 at 12:09 PM Christian König wrote:
> That is not in any way better than illegally using struct page. The
> point is we need to get away from using phys_addr at all here.

Agreed, I won't push this further. With your "import a shmemfd, not
a DMA-buf" remark in mind, the direction that makes sense to me is
the allocation model one: userspace allocates the decoder capture
buffers from msm GEM and the V4L2 device imports them, so msm stays
the exporter and never has to interpret memory it did not allocate.
Rob's series (drop the page array, mmap via the exporter) is the
prep work for that and is already in good shape. It is also how
panfrost/panthor already work - they program their own pagetables
from the sg_table's DMA addresses and never look at pages for
mapping.

I'll withdraw this series and come back once Rob has had time to
look at the msm side. Patch 1 is withdrawn too - Robin NAKed the
iommu_get_dma_domain() export, which is moot now anyway.

Thanks for the review, and for the earlier pointer to what msm is
doing wrong here.

Regards,
Jianfeng