Skip to content

Change userptr so it can be unified with hmmptr

Oak Zeng intel-xe 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4drm/xe: Introduce helper to populate userptrdrivers/gpu/drm/xe/Kconfig drivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/xe_hmm.c +1 more+244 -00 replies
2/4drm/xe: Introduce a helper to free sg tabledrivers/gpu/drm/xe/xe_hmm.c drivers/gpu/drm/xe/xe_hmm.h+31 -00 replies
3/4drm/xe: Use hmm_range_fault to populate user pagesdrivers/gpu/drm/xe/xe_vm.c+12 -1100 replies
4/4drm/xe: destroy userptr vma on UNMAP eventdrivers/gpu/drm/xe/xe_vm.c+7 -16 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Change userptr so it can be unified with hmmptr

This is an effort to modify userptr code so it can be unified with hmmptr.

A helper xe_userptr_populate_range is created to populate a user page using hmm_range_fault, instead of using get_user_pages_fast. This helper is then used to replace some userptr codes.

The same help will be used later for hmmptr.

The userptr invalidation code is also changed to match the hmmptr behavior. We now destroy vma when userptr is munmapped from CPU.

This is part of the hmmptr (system allocator) codes. Since this part can be merged separately, send it out for CI and review first. It will be followed by other hmmptr codes.

Oak Zeng (4):
drm/xe: Introduce helper to populate userptr drm/xe: Introduce a helper to free sg table drm/xe: Use hmm_range_fault to populate user pages drm/xe: destroy userptr vma on UNMAP event

 drivers/gpu/drm/xe/Kconfig  |   1 +
 drivers/gpu/drm/xe/Makefile |   2 +
 drivers/gpu/drm/xe/xe_hmm.c | 254 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_hmm.h |  18 +++
 drivers/gpu/drm/xe/xe_vm.c  | 130 +++---------------
 5 files changed, 294 insertions(+), 111 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_hmm.c
 create mode 100644 drivers/gpu/drm/xe/xe_hmm.h
Signature · 1 line
2.26.3