Skip to content

drm/msm: fix dma-buf sharing on targets without per-process pgtables

Dmitry Baryshkov dri-devel linux-arm-msm linux-media lkml sashiko-reviews 1 version In review

Get series with b4
b4 am [email protected] change-id 20260822-msm-fix-export-c4a4cd9239fc

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/msm: factor out a locking put_iova_spaces() wrapperdrivers/gpu/drm/msm/msm_gem.c+18 -140 replies
2/2drm/msm: don't tear down shared VM mappings on handle closedrivers/gpu/drm/msm/msm_gem.c drivers/gpu/drm/msm/msm_gpu.c drivers/gpu/drm/msm/msm_gpu.h+18 -25 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchAlexey MinnekhanovJayden Milne
SeriesT-b
1/2
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] drm/msm: fix dma-buf sharing on targets without per-process pgtables

Targets without per-process pgtables -- everything pre-a6xx, plus a6xx parts where split pagetables are unavailable -- hand every DRM file the GPU's global VM. The rest of the driver still treats a context VM as private to that context, so closing a handle tears down mappings other files are still using, and frees the iova for immediate reuse.

A dma-buf shared between two clients therefore keeps sampling an address that the next allocation has taken over. On a530 this is every ext_image_dma_buf_import sampling test, reading back all zeros.

A VM shared between contexts needs the lazy, refcounted teardown the driver already implements for kms->vm. Rather than adding a second mechanism, the first patch makes that machinery reusable and the second one puts the shared GPU VM behind it.

---
Dmitry Baryshkov (2):
drm/msm: factor out a locking put_iova_spaces() wrapper drm/msm: don't tear down shared VM mappings on handle close

 drivers/gpu/drm/msm/msm_gem.c | 45 ++++++++++++++++++++++++++++---------------
 drivers/gpu/drm/msm/msm_gpu.c |  4 +++-
 drivers/gpu/drm/msm/msm_gpu.h |  3 +++
 3 files changed, 36 insertions(+), 16 deletions(-)

---
base-commit: 6b8c8af514d739d0335f5579b585e02babe8a727
change-id: 20260822-msm-fix-export-c4a4cd9239fc

Best regards,

Signature · 2 lines
With best wishes
Dmitry