diff options
| author | Matthew Brost <matthew.brost@intel.com> | 2024-11-26 09:46:09 -0800 |
|---|---|---|
| committer | Matthew Brost <matthew.brost@intel.com> | 2024-11-27 16:38:50 -0800 |
| commit | 7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8 (patch) | |
| tree | ee69b35b2f52c839544a87c96a3607687340592b /include/drm | |
| parent | drm/xe: Add xe_bo_vm_access (diff) | |
| download | linux-7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8.tar.gz linux-7d08df5d0bd3d12d14dcec773fcddbe3eed3a8e8.zip | |
drm/ttm: Add ttm_bo_access
Non-contiguous VRAM cannot easily be mapped in TTM nor can non-visible
VRAM easily be accessed. Add ttm_bo_access, which is similar to
ttm_bo_vm_access, to access such memory.
v4:
- Fix checkpatch warnings (CI)
v5:
- Fix checkpatch warnings (CI)
v6:
- Fix kernel doc (Auld)
v7:
- Move ttm_bo_access to ttm_bo_vm.c (Christian)
Cc: Christian König <christian.koenig@amd.com>
Reported-by: Christoph Manszewski <christoph.manszewski@intel.com>
Suggested-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Tested-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241126174615.2665852-3-matthew.brost@intel.com
Diffstat (limited to 'include/drm')
| -rw-r--r-- | include/drm/ttm/ttm_bo.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h index 5804408815be..8ea11cd8df39 100644 --- a/include/drm/ttm/ttm_bo.h +++ b/include/drm/ttm/ttm_bo.h @@ -421,6 +421,8 @@ void ttm_bo_unpin(struct ttm_buffer_object *bo); int ttm_bo_evict_first(struct ttm_device *bdev, struct ttm_resource_manager *man, struct ttm_operation_ctx *ctx); +int ttm_bo_access(struct ttm_buffer_object *bo, unsigned long offset, + void *buf, int len, int write); vm_fault_t ttm_bo_vm_reserve(struct ttm_buffer_object *bo, struct vm_fault *vmf); vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, |
