mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/gpusvm: Add devmem callback to get_pages
Add an optional drm_gpusvm_ctx.devmem_fn, invoked for each device-memory allocation backing the range's faulted pages. It runs under the notifier lock and independently of the DMA map, so it also fires with no_dma_map. Adjacent pages of one allocation are coalesced, so the callback must be idempotent. v2 Reset last to NULL for non-devmem pages(Sashiko/Matt) v3 Run drm_gpusvm_pages_valid_unlocked() on the map_dma path even when devmem_fn is set, so an invalidated range's stale inline mapping is reset. Suggested-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/20261001033602.3166274-8-himal.prasad.ghimiray@intel.com Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
parent
2069eeb76a
commit
927a6ab619
2 changed files with 86 additions and 25 deletions
Loading…
Add table
Add a link
Reference in a new issue