Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oak Zeng <oak.zeng@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: thomas.hellstrom@intel.com, matthew.brost@intel.com,
	brian.welty@intel.com, himal.prasad.ghimiray@intel.com
Subject: [PATCH 0/8] Use hmm_range_fault to populate user page
Date: Mon, 18 Mar 2024 22:55:03 -0400	[thread overview]
Message-ID: <20240319025511.1598354-1-oak.zeng@intel.com> (raw)

This is an effort to unify hmmptr (system allocator) and userptr.
A helper xe_hmm_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.

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 (8):
  drm/xe/svm: Remap and provide memmap backing for GPU vram
  drm/xe/svm: Add DRM_XE_SVM kernel config entry
  drm/xe: Helper to get tile from memory region
  drm/xe: Introduce a helper to get dpa from pfn
  drm/xe/svm: Get xe memory region from page
  drm/xe: Helper to populate a userptr or hmmptr
  drm/xe: Introduce a helper to free sg table
  drm/xe: Use hmm_range_fault to populate user pages

 drivers/gpu/drm/xe/Kconfig           |  21 ++
 drivers/gpu/drm/xe/Makefile          |   2 +
 drivers/gpu/drm/xe/xe_device.h       |   5 +
 drivers/gpu/drm/xe/xe_device_types.h |   8 +
 drivers/gpu/drm/xe/xe_hmm.c          | 282 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_hmm.h          |  25 +++
 drivers/gpu/drm/xe/xe_mmio.c         |   6 +
 drivers/gpu/drm/xe/xe_svm.h          |  49 +++++
 drivers/gpu/drm/xe/xe_svm_devmem.c   |  89 +++++++++
 drivers/gpu/drm/xe/xe_tile.c         |   8 +
 drivers/gpu/drm/xe/xe_vm.c           | 122 ++----------
 11 files changed, 507 insertions(+), 110 deletions(-)
 create mode 100644 drivers/gpu/drm/xe/xe_hmm.c
 create mode 100644 drivers/gpu/drm/xe/xe_hmm.h
 create mode 100644 drivers/gpu/drm/xe/xe_svm.h
 create mode 100644 drivers/gpu/drm/xe/xe_svm_devmem.c

-- 
2.26.3


             reply	other threads:[~2024-03-19  2:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19  2:55 Oak Zeng [this message]
2024-03-19  2:55 ` [PATCH 1/8] drm/xe/svm: Remap and provide memmap backing for GPU vram Oak Zeng
2024-03-19  2:55 ` [PATCH 2/8] drm/xe/svm: Add DRM_XE_SVM kernel config entry Oak Zeng
2024-03-19  9:25   ` Hellstrom, Thomas
2024-03-19 18:27     ` Zeng, Oak
2024-03-19  2:55 ` [PATCH 3/8] drm/xe: Helper to get tile from memory region Oak Zeng
2024-03-19  9:28   ` Hellstrom, Thomas
2024-03-19  2:55 ` [PATCH 4/8] drm/xe: Introduce a helper to get dpa from pfn Oak Zeng
2024-03-19  2:55 ` [PATCH 5/8] drm/xe/svm: Get xe memory region from page Oak Zeng
2024-03-19  2:55 ` [PATCH 6/8] drm/xe: Helper to populate a userptr or hmmptr Oak Zeng
2024-03-19 10:33   ` Hellstrom, Thomas
2024-03-19 10:45     ` Hellstrom, Thomas
2024-03-19 20:56       ` Zeng, Oak
2024-03-19 16:48     ` Matthew Brost
2024-03-19 17:59       ` Zeng, Oak
2024-03-19 20:45     ` Zeng, Oak
2024-03-19  2:55 ` [PATCH 7/8] drm/xe: Introduce a helper to free sg table Oak Zeng
2024-03-19  2:55 ` [PATCH 8/8] drm/xe: Use hmm_range_fault to populate user pages Oak Zeng
2024-03-19  4:09 ` ✓ CI.Patch_applied: success for Use hmm_range_fault to populate user page (rev2) Patchwork
2024-03-19  4:09 ` ✗ CI.checkpatch: warning " Patchwork
2024-03-19  4:10 ` ✗ CI.KUnit: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-03-20  3:24 [PATCH 0/8] Use hmm_range_fault to populate user page Oak Zeng
2024-03-20  3:44 Oak Zeng

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=20240319025511.1598354-1-oak.zeng@intel.com \
    --to=oak.zeng@intel.com \
    --cc=brian.welty@intel.com \
    --cc=himal.prasad.ghimiray@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=thomas.hellstrom@intel.com \
    /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