diff options
| author | Honglei Huang <honghuan@amd.com> | 2026-06-30 18:21:24 +0800 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2026-07-09 04:12:44 -0700 |
| commit | 1d0c4c15c2a62fc15bf69b9e72c30461b2e9346f (patch) | |
| tree | 6a4084934f9b99c0ffb6656ff8e8187d677f5e0e /tools/perf/scripts/python/bin | |
| parent | ba40db36971a59f197b41219e8ffc6ce9998df82 (diff) | |
drm/gpusvm: embed struct drm_device into drm_gpusvm_pages
drm_gpusvm_pages is the layer that actually represents physical
pages/mappings it owns the dma_addr array, the dma_iova_state...
With the previous patch, so drm_gpusvm_pages is now strictly about
physical pages and their DMA view.
Since now the drm_gpusvm_pages instance is inherently bound to one
specific drm_device, make that ownership explicit by giving
drm_gpusvm_pages its own drm_device handle, and drive all DMA through
it instead of through the gpusvm:
- Add drm to struct drm_gpusvm_pages and route all DMA in
drm_gpusvm_get_pages() / __drm_gpusvm_unmap_pages() through
svm_pages->drm instead of gpusvm->drm.
- Bind svm_pages->drm where the pages object is initialised
(drm_gpusvm_range_alloc() and the xe userptr setup) and require
it to be set on entry to drm_gpusvm_get_pages(); the dma device
is immutable for the lifetime of the pages instance. A later
patch introduces drm_gpusvm_init_pages() to centralise this.
Suggested-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Honglei Huang <honghuan@amd.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260630102127.392396-3-honghuan@amd.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
