mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/6] drm/msm/gem: Drop use of pages for imported dma-bufs
@ 2026-10-02 15:29 Rob Clark
  2026-10-02 15:29 ` [PATCH v2 1/6] drm/msm/gem: Add helper to check if resident Rob Clark
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Rob Clark @ 2026-10-02 15:29 UTC (permalink / raw)
  To: dri-devel
  Cc: linux-arm-msm, freedreno, Jianfeng Liu, Christian König,
	Rob Clark, Abel Vesa, Abhinav Kumar, Andrei Kuchynski,
	Benson Leung, Chia-Lin Kao (AceLan),
	David Airlie, Dmitry Baryshkov, Greg Kroah-Hartman,
	Heikki Krogerus, Hsin-Te Yuan, Jessica Zhang, Johan Hovold,
	moderated list:DMA BUFFER SHARING
	FRAMEWORK:Keyword:bdma_(?:buf|fence|resv)b, open list,
	open list:DMA BUFFER SHARING
	FRAMEWORK:Keyword:bdma_(?:buf|fence|resv)b,
	open list:USB TYPEC CLASS, Marijn Suijten, Pooja Katiyar,
	Sean Paul, Simona Vetter, Sumit Semwal

The use of msm_obj->pages _mostly_ served to mark that the obj is
resident in memory.  Mapping to the GPU, etc, all works in terms of
the sgt.

The exception was the fault path.  Resolve this by using dma_buf_mmap()
for mmap'ing imported buffers, like we are supposed to.  With that and
a bit more cleanup we can drop the use of drm_prime_sg_to_page_array().

This doesn't solve the issues with DMABUF_DEBUG, mapping to the GPU,
either via iommu_map_sgtable() (display, and TTBR1 for GPU, aka the
kernel managed mappings), or msm_iommu_pagetable_map() (userspace
managed mappings), still requires pages under the hood.  That will
be harder to solve.  But this is a step along the way.

Changes in v2:
- Drop dead code spotted by sashiko in 4/6
- Collect tags
- Link to v1: https://lore.kernel.org/all/20260926183051.25754-1-robin.clark@oss.qualcomm.com/

Rob Clark (6):
  drm/msm/gem: Add helper to check if resident
  drm/msm/gem: Mmap imported dma-bufs via the exporter
  drm/msm/gem: Use get_pages() directly in vmap path
  drm/msm/gem: Stop exposing a page array
  drm/msm/gem: Stop calling get_pages() for imported dma-bufs
  drm/msm/gem: Drop use of drm_prime_sg_to_page_array()

 drivers/gpu/drm/msm/msm_gem.c       | 107 +++++++++++++++++-----------
 drivers/gpu/drm/msm/msm_gem.h       |  10 ++-
 drivers/gpu/drm/msm/msm_gem_prime.c |   9 +--
 drivers/gpu/drm/msm/msm_gem_vma.c   |   8 +--
 4 files changed, 78 insertions(+), 56 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-02 15:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 15:29 [PATCH v2 0/6] drm/msm/gem: Drop use of pages for imported dma-bufs Rob Clark
2026-10-02 15:29 ` [PATCH v2 1/6] drm/msm/gem: Add helper to check if resident Rob Clark
2026-10-02 15:29 ` [PATCH v2 2/6] drm/msm/gem: Mmap imported dma-bufs via the exporter Rob Clark
2026-10-02 15:29 ` [PATCH v2 3/6] drm/msm/gem: Use get_pages() directly in vmap path Rob Clark
2026-10-02 15:29 ` [PATCH v2 4/6] drm/msm/gem: Stop exposing a page array Rob Clark
2026-10-02 15:29 ` [PATCH v2 5/6] drm/msm/gem: Stop calling get_pages() for imported dma-bufs Rob Clark
2026-10-02 15:29 ` [PATCH v2 6/6] drm/msm/gem: Drop use of drm_prime_sg_to_page_array() Rob Clark

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®