Home
last modified time | relevance | path

Searched refs:bo (Results 1 – 25 of 255) sorted by relevance

1234567891011

/linux/drivers/gpu/drm/xe/
H A Dxe_bo.h118 void xe_bo_free(struct xe_bo *bo);
120 struct xe_bo *xe_bo_init_locked(struct xe_device *xe, struct xe_bo *bo,
148 void xe_managed_bo_unpin_map_no_vm(struct xe_bo *bo);
153 int xe_bo_placement_for_flags(struct xe_device *xe, struct xe_bo *bo,
156 static inline struct xe_bo *ttm_to_xe_bo(const struct ttm_buffer_object *bo)
158 return container_of(bo, struct xe_bo, ttm); in ttm_to_xe_bo()
166 #define xe_bo_device(bo) ttm_to_xe_device((bo)->ttm.bdev)
168 static inline struct xe_bo *xe_bo_get(struct xe_bo *bo)
170 if (bo) in xe_bo_get()
157 ttm_to_xe_bo(const struct ttm_buffer_object * bo) ttm_to_xe_bo() argument
167 xe_bo_device(bo) global() argument
169 xe_bo_get(struct xe_bo * bo) xe_bo_get() argument
193 xe_bo_get_unless_zero(struct xe_bo * bo) xe_bo_get_unless_zero() argument
201 __xe_bo_unset_bulk_move(struct xe_bo * bo) __xe_bo_unset_bulk_move() argument
207 xe_bo_assert_held(struct xe_bo * bo) xe_bo_assert_held() argument
217 xe_bo_unlock_vm_held(struct xe_bo * bo) xe_bo_unlock_vm_held() argument
237 xe_bo_is_pinned(struct xe_bo * bo) xe_bo_is_pinned() argument
242 xe_bo_is_protected(const struct xe_bo * bo) xe_bo_is_protected() argument
258 xe_bo_is_purged(struct xe_bo * bo) xe_bo_is_purged() argument
275 xe_bo_madv_is_dontneed(struct xe_bo * bo) xe_bo_madv_is_dontneed() argument
292 xe_bo_willneed_get_locked(struct xe_bo * bo) xe_bo_willneed_get_locked() argument
317 xe_bo_willneed_put_locked(struct xe_bo * bo) xe_bo_willneed_put_locked() argument
338 xe_bo_vma_count_inc_locked(struct xe_bo * bo) xe_bo_vma_count_inc_locked() argument
356 xe_bo_vma_count_dec_locked(struct xe_bo * bo) xe_bo_vma_count_dec_locked() argument
367 xe_bo_unpin_map_no_vm(struct xe_bo * bo) xe_bo_unpin_map_no_vm() argument
383 xe_bo_main_addr(struct xe_bo * bo,size_t page_size) xe_bo_main_addr() argument
396 xe_bo_size(struct xe_bo * bo) xe_bo_size() argument
402 __xe_bo_ggtt_addr(struct xe_bo * bo,u8 tile_id) __xe_bo_ggtt_addr() argument
416 xe_bo_ggtt_addr(struct xe_bo * bo) xe_bo_ggtt_addr() argument
466 xe_bo_ccs_pages_start(struct xe_bo * bo) xe_bo_ccs_pages_start() argument
480 xe_bo_has_valid_ccs_bb(struct xe_bo * bo) xe_bo_has_valid_ccs_bb() argument
486 xe_bo_has_pages(struct xe_bo * bo) xe_bo_has_pages() argument
521 xe_bo_put_deferred(struct xe_bo * bo,struct llist_head * deferred) xe_bo_put_deferred() argument
543 xe_bo_put_async(struct xe_bo * bo) xe_bo_put_async() argument
565 xe_bo_sg_is_contiguous(struct xe_bo * bo,size_t len) xe_bo_sg_is_contiguous() argument
633 xe_bo_is_mem_type(struct xe_bo * bo,u32 mem_type) xe_bo_is_mem_type() argument
[all...]
H A Dxe_bo.c106 bool xe_bo_is_vram(struct xe_bo *bo) in xe_bo_is_vram()
108 struct ttm_resource *res = bo->ttm.resource; in xe_bo_is_vram()
110 return res && (resource_is_vram(res) || resource_is_stolen_vram(xe_bo_device(bo), res));
113 bool xe_bo_is_stolen(struct xe_bo *bo) in xe_bo_is_stolen()
115 struct ttm_resource *res = bo->ttm.resource;
122 * @bo: The BO
129 bool xe_bo_has_single_placement(struct xe_bo *bo)
131 return bo->placement.num_placement == 1;
136 * @bo: The BO
143 bool xe_bo_is_stolen_devmem(struct xe_bo *bo) in xe_bo_is_stolen_devmem()
105 xe_bo_is_vram(struct xe_bo * bo) xe_bo_is_vram() argument
111 xe_bo_is_stolen(struct xe_bo * bo) xe_bo_is_stolen() argument
125 xe_bo_has_single_placement(struct xe_bo * bo) xe_bo_has_single_placement() argument
139 xe_bo_is_stolen_devmem(struct xe_bo * bo) xe_bo_is_stolen_devmem() argument
154 xe_bo_is_vm_bound(struct xe_bo * bo) xe_bo_is_vm_bound() argument
161 xe_bo_is_user(struct xe_bo * bo) xe_bo_is_user() argument
176 try_add_system(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,u32 * c) try_add_system() argument
230 add_vram(struct xe_device * xe,struct xe_bo * bo,struct ttm_place * places,u32 bo_flags,u32 mem_type,u32 * c) add_vram() argument
261 try_add_vram(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,enum ttm_bo_type type,u32 * c) try_add_vram() argument
273 try_add_stolen(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,u32 * c) try_add_stolen() argument
288 __xe_bo_placement_for_flags(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,enum ttm_bo_type type) __xe_bo_placement_for_flags() argument
308 xe_bo_placement_for_flags(struct xe_device * xe,struct xe_bo * bo,u32 bo_flags,enum ttm_bo_type type) xe_bo_placement_for_flags() argument
320 struct xe_bo *bo; xe_evict_flags() local
432 xe_bo_sg(struct xe_bo * bo) xe_bo_sg() argument
489 xe_bo_account_pin(struct xe_bo * bo) xe_bo_account_pin() argument
513 xe_bo_account_unpin(struct xe_bo * bo) xe_bo_account_unpin() argument
538 xe_bo_pin_account(struct xe_bo * bo) xe_bo_pin_account() argument
552 xe_bo_unpin_account(struct xe_bo * bo) xe_bo_unpin_account() argument
574 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_ttm_tt_create() local
724 xe_bo_is_visible_vram(struct xe_bo * bo) xe_bo_is_visible_vram() argument
769 xe_bo_trigger_rebind(struct xe_device * xe,struct xe_bo * bo,const struct ttm_operation_ctx * ctx) xe_bo_trigger_rebind() argument
905 xe_bo_move_notify(struct xe_bo * bo,const struct ttm_operation_ctx * ctx) xe_bo_move_notify() argument
956 xe_bo_set_purgeable_shrinker(struct xe_bo * bo,enum xe_madv_purgeable_state new_state) xe_bo_set_purgeable_shrinker() argument
995 xe_bo_set_purgeable_state(struct xe_bo * bo,enum xe_madv_purgeable_state new_state) xe_bo_set_purgeable_state() argument
1029 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_ttm_bo_purge() local
1071 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_bo_move() local
1313 xe_bo_shrink_purge(struct ttm_operation_ctx * ctx,struct ttm_buffer_object * bo,unsigned long * scanned) xe_bo_shrink_purge() argument
1351 xe_bo_eviction_valuable(struct ttm_buffer_object * bo,const struct ttm_place * place) xe_bo_eviction_valuable() argument
1387 xe_bo_shrink(struct ttm_operation_ctx * ctx,struct ttm_buffer_object * bo,const struct xe_bo_shrink_flags flags,unsigned long * scanned) xe_bo_shrink() argument
1455 xe_bo_notifier_prepare_pinned(struct xe_bo * bo) xe_bo_notifier_prepare_pinned() argument
1512 xe_bo_notifier_unprepare_pinned(struct xe_bo * bo) xe_bo_notifier_unprepare_pinned() argument
1525 xe_bo_evict_pinned_copy(struct xe_bo * bo,struct xe_bo * backup) xe_bo_evict_pinned_copy() argument
1593 xe_bo_evict_pinned(struct xe_bo * bo) xe_bo_evict_pinned() argument
1659 xe_bo_restore_pinned(struct xe_bo * bo) xe_bo_restore_pinned() argument
1737 xe_bo_dma_unmap_pinned(struct xe_bo * bo) xe_bo_dma_unmap_pinned() argument
1766 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_ttm_io_mem_pfn() local
1810 struct xe_bo *bo; xe_ttm_bo_release_notify() local
1847 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_ttm_bo_delete_mem_notify() local
1890 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_ttm_access_memory() local
1957 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_ttm_bo_destroy() local
2015 struct xe_bo *bo = gem_to_xe_bo(obj); xe_gem_object_close() local
2026 should_migrate_to_smem(struct xe_bo * bo) should_migrate_to_smem() argument
2038 xe_bo_wait_usage_kernel(struct xe_bo * bo,struct ttm_operation_ctx * ctx) xe_bo_wait_usage_kernel() argument
2057 xe_bo_fault_migrate(struct xe_bo * bo,struct ttm_operation_ctx * ctx,struct drm_exec * exec) xe_bo_fault_migrate() argument
2076 __xe_bo_cpu_fault(struct vm_fault * vmf,struct xe_device * xe,struct xe_bo * bo) __xe_bo_cpu_fault() argument
2120 xe_bo_cpu_fault_fastpath(struct vm_fault * vmf,struct xe_device * xe,struct xe_bo * bo,bool needs_rpm) xe_bo_cpu_fault_fastpath() argument
2190 struct xe_bo *bo = ttm_to_xe_bo(tbo); xe_bo_cpu_fault() local
2295 struct xe_bo *bo = ttm_to_xe_bo(ttm_bo); xe_bo_vm_access() local
2313 xe_bo_read(struct xe_bo * bo,u64 offset,void * dst,int size) xe_bo_read() argument
2335 struct xe_bo *bo = gem_to_xe_bo(obj); xe_gem_object_mmap() local
2381 struct xe_bo *bo = kzalloc_obj(*bo); xe_bo_alloc() local
2395 xe_bo_free(struct xe_bo * bo) xe_bo_free() argument
2423 xe_bo_init_locked(struct xe_device * xe,struct xe_bo * bo,struct xe_tile * tile,struct dma_resv * resv,struct ttm_lru_bulk_move * bulk,size_t size,u16 cpu_caching,enum ttm_bo_type type,u32 flags,struct dma_buf * dma_buf,struct drm_exec * exec) xe_bo_init_locked() argument
2583 __xe_bo_fixed_placement(struct xe_device * xe,struct xe_bo * bo,enum ttm_bo_type type,u32 flags,u64 start,u64 end,u64 size) __xe_bo_fixed_placement() argument
2630 struct xe_bo *bo = NULL; __xe_bo_create_locked() local
2738 struct xe_bo *bo; xe_bo_create_novm() local
2758 xe_bo_debug_mixed_mode_cur_index_advance(struct xe_device * xe,struct xe_bo * bo) xe_bo_debug_mixed_mode_cur_index_advance() argument
2891 xe_bo_debug_mixed_mode_cur_index_advance(struct xe_device * xe,struct xe_bo * bo) xe_bo_debug_mixed_mode_cur_index_advance() argument
2915 struct xe_bo *bo; xe_bo_create_user() local
2964 struct xe_bo *bo; xe_bo_create_pin_range_novm() local
2997 struct xe_bo *bo; xe_bo_create_pin_map_at_aligned() local
3058 struct xe_bo *bo; xe_bo_create_pin_map_at_novm() local
3136 struct xe_bo *bo; xe_managed_bo_create_pin_map() local
3151 xe_managed_bo_unpin_map_no_vm(struct xe_bo * bo) xe_managed_bo_unpin_map_no_vm() argument
3159 struct xe_bo *bo = xe_managed_bo_create_pin_map(xe, tile, ALIGN(size, PAGE_SIZE), flags); xe_managed_bo_create_from_data() local
3184 struct xe_bo *bo; xe_managed_bo_reinit_in_vram() local
3236 xe_bo_pin_external(struct xe_bo * bo,bool in_place,struct drm_exec * exec) xe_bo_pin_external() argument
3278 xe_bo_pin(struct xe_bo * bo,struct drm_exec * exec) xe_bo_pin() argument
3334 xe_bo_unpin_external(struct xe_bo * bo) xe_bo_unpin_external() argument
3351 xe_bo_unpin(struct xe_bo * bo) xe_bo_unpin() argument
3389 xe_bo_validate(struct xe_bo * bo,struct xe_vm * vm,bool allow_res_evict,struct drm_exec * exec) xe_bo_validate() argument
3419 xe_bo_is_xe_bo(struct ttm_buffer_object * bo) xe_bo_is_xe_bo() argument
3433 __xe_bo_addr(struct xe_bo * bo,u64 offset,size_t page_size) __xe_bo_addr() argument
3458 xe_bo_addr(struct xe_bo * bo,u64 offset,size_t page_size) xe_bo_addr() argument
3465 xe_bo_vmap(struct xe_bo * bo) xe_bo_vmap() argument
3501 __xe_bo_vunmap(struct xe_bo * bo) __xe_bo_vunmap() argument
3509 xe_bo_vunmap(struct xe_bo * bo) xe_bo_vunmap() argument
3515 gem_create_set_pxp_type(struct xe_device * xe,struct xe_bo * bo,u64 value) gem_create_set_pxp_type() argument
3536 gem_create_user_ext_set_property(struct xe_device * xe,struct xe_bo * bo,u64 extension) gem_create_user_ext_set_property() argument
3570 gem_create_user_extensions(struct xe_device * xe,struct xe_bo * bo,u64 extensions,int ext_number) gem_create_user_extensions() argument
3611 struct xe_bo *bo; xe_gem_create_ioctl() local
3801 xe_bo_decompress(struct xe_bo * bo) xe_bo_decompress() argument
3854 xe_bo_lock(struct xe_bo * bo,bool intr) xe_bo_lock() argument
3870 xe_bo_unlock(struct xe_bo * bo) xe_bo_unlock() argument
3890 xe_bo_can_migrate(struct xe_bo * bo,u32 mem_type) xe_bo_can_migrate() argument
3933 xe_bo_migrate(struct xe_bo * bo,u32 mem_type,struct ttm_operation_ctx * tctx,struct drm_exec * exec) xe_bo_migrate() argument
3988 xe_bo_evict(struct xe_bo * bo,struct drm_exec * exec) xe_bo_evict() argument
4016 xe_bo_needs_ccs_pages(struct xe_bo * bo) xe_bo_needs_ccs_pages() argument
4070 struct xe_bo *bo, *next; xe_bo_put_commit() local
4108 xe_bo_put(struct xe_bo * bo) xe_bo_put() argument
4141 struct xe_bo *bo; xe_bo_dumb_create() local
4167 xe_bo_runtime_pm_release_mmap_offset(struct xe_bo * bo) xe_bo_runtime_pm_release_mmap_offset() argument
[all...]
H A Dxe_drm_client.c125 * @bo: The xe BO ptr
133 struct xe_bo *bo) in xe_drm_client_add_bo() argument
135 XE_WARN_ON(bo->client); in xe_drm_client_add_bo()
136 XE_WARN_ON(!list_empty(&bo->client_link)); in xe_drm_client_add_bo()
138 bo->client = xe_drm_client_get(client); in xe_drm_client_add_bo()
140 list_add_tail(&bo->client_link, &client->bos_list); in xe_drm_client_add_bo()
146 * @bo: The xe BO ptr
153 void xe_drm_client_remove_bo(struct xe_bo *bo) in xe_drm_client_remove_bo() argument
155 struct xe_device *xe = ttm_to_xe_device(bo->ttm.bdev); in xe_drm_client_remove_bo()
156 struct xe_drm_client *client = bo in xe_drm_client_remove_bo()
167 bo_meminfo(struct xe_bo * bo,struct drm_memory_stats stats[TTM_NUM_MEM_TYPES]) bo_meminfo() argument
209 struct xe_bo *bo; show_meminfo() local
219 struct xe_bo *bo = gem_to_xe_bo(obj); show_meminfo() local
[all...]
H A Dxe_dma_buf.c70 struct xe_bo *bo = gem_to_xe_bo(obj); in xe_dma_buf_pin()
71 struct xe_device *xe = xe_bo_device(bo); in xe_dma_buf_pin()
83 if (xe_bo_is_pinned(bo) && !xe_bo_is_mem_type(bo, XE_PL_TT) && in xe_dma_buf_pin()
84 !(xe_bo_is_vram(bo) && allow_vram)) { in xe_dma_buf_pin()
85 drm_dbg(&xe->drm, "Can't migrate pinned bo for dma-buf pin.\n"); in xe_dma_buf_pin()
90 ret = xe_bo_migrate(bo, XE_PL_TT, NULL, exec); in xe_dma_buf_unpin()
100 ret = xe_bo_pin_external(bo, !allow_vram, exec); in xe_dma_buf_map()
109 struct xe_bo *bo = gem_to_xe_bo(obj); in xe_dma_buf_map()
111 xe_bo_unpin_external(bo); in xe_dma_buf_map()
53 struct xe_bo *bo = gem_to_xe_bo(obj); xe_dma_buf_pin() local
92 struct xe_bo *bo = gem_to_xe_bo(obj); xe_dma_buf_unpin() local
102 struct xe_bo *bo = gem_to_xe_bo(obj); xe_dma_buf_map() local
170 struct xe_bo *bo = gem_to_xe_bo(obj); xe_dma_buf_begin_cpu_access() local
199 struct xe_bo *bo = gem_to_xe_bo(obj); xe_dma_buf_release() local
224 struct xe_bo *bo = gem_to_xe_bo(obj); xe_gem_prime_export() local
289 struct xe_bo *bo; xe_dma_buf_create_obj() local
321 struct xe_bo *bo = gem_to_xe_bo(obj); xe_dma_buf_move_notify() local
[all...]
/linux/drivers/gpu/drm/ttm/
H A Dttm_bo.c55 static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo, in ttm_bo_mem_space_debug() argument
66 man = ttm_manager_type(bo->bdev, mem_type); in ttm_bo_mem_space_debug()
74 * @bo: The buffer object.
80 void ttm_bo_move_to_lru_tail(struct ttm_buffer_object *bo) in ttm_bo_move_to_lru_tail() argument
82 dma_resv_assert_held(bo->base.resv); in ttm_bo_move_to_lru_tail()
84 if (bo->resource) in ttm_bo_move_to_lru_tail()
85 ttm_resource_move_to_lru_tail(bo->resource); in ttm_bo_move_to_lru_tail()
92 * @bo: The buffer object.
103 void ttm_bo_set_bulk_move(struct ttm_buffer_object *bo, in ttm_bo_set_bulk_move() argument
106 dma_resv_assert_held(bo in ttm_bo_set_bulk_move()
121 ttm_bo_handle_move_mem(struct ttm_buffer_object * bo,struct ttm_resource * mem,bool evict,struct ttm_operation_ctx * ctx,struct ttm_place * hop) ttm_bo_handle_move_mem() argument
183 ttm_bo_cleanup_memtype_use(struct ttm_buffer_object * bo) ttm_bo_cleanup_memtype_use() argument
192 ttm_bo_individualize_resv(struct ttm_buffer_object * bo) ttm_bo_individualize_resv() argument
219 ttm_bo_flush_all_fences(struct ttm_buffer_object * bo) ttm_bo_flush_all_fences() argument
237 struct ttm_buffer_object *bo; ttm_bo_delayed_delete() local
251 struct ttm_buffer_object *bo = ttm_bo_release() local
323 ttm_bo_put(struct ttm_buffer_object * bo) ttm_bo_put() argument
328 ttm_bo_fini(struct ttm_buffer_object * bo) ttm_bo_fini() argument
334 ttm_bo_bounce_temp_buffer(struct ttm_buffer_object * bo,struct ttm_operation_ctx * ctx,struct ttm_place * hop) ttm_bo_bounce_temp_buffer() argument
358 ttm_bo_evict(struct ttm_buffer_object * bo,struct ttm_operation_ctx * ctx) ttm_bo_evict() argument
420 ttm_bo_eviction_valuable(struct ttm_buffer_object * bo,const struct ttm_place * place) ttm_bo_eviction_valuable() argument
449 struct ttm_buffer_object *bo; ttm_bo_evict_first() local
520 ttm_bo_alloc_at_place(struct ttm_buffer_object * bo,const struct ttm_place * place,bool force_space,struct ttm_resource ** res,struct ttm_bo_alloc_state * alloc_state) ttm_bo_alloc_at_place() argument
627 ttm_bo_evict_cb(struct ttm_lru_walk * walk,struct ttm_buffer_object * bo) ttm_bo_evict_cb() argument
876 ttm_bo_pin(struct ttm_buffer_object * bo) ttm_bo_pin() argument
895 ttm_bo_unpin(struct ttm_buffer_object * bo) ttm_bo_unpin() argument
915 ttm_bo_add_pipelined_eviction_fences(struct ttm_buffer_object * bo,struct ttm_resource_manager * man,bool no_wait_gpu) ttm_bo_add_pipelined_eviction_fences() argument
962 ttm_bo_alloc_resource(struct ttm_buffer_object * bo,struct ttm_placement * placement,struct ttm_operation_ctx * ctx,bool force_space,struct ttm_resource ** res) ttm_bo_alloc_resource() argument
1041 ttm_bo_mem_space(struct ttm_buffer_object * bo,struct ttm_placement * placement,struct ttm_resource ** res,struct ttm_operation_ctx * ctx) ttm_bo_mem_space() argument
1074 ttm_bo_validate(struct ttm_buffer_object * bo,struct ttm_placement * placement,struct ttm_operation_ctx * ctx) ttm_bo_validate() argument
1185 ttm_bo_init_reserved(struct ttm_device * bdev,struct ttm_buffer_object * bo,enum ttm_bo_type type,struct ttm_placement * placement,uint32_t alignment,struct ttm_operation_ctx * ctx,struct sg_table * sg,struct dma_resv * resv,void (* destroy)(struct ttm_buffer_object *)) ttm_bo_init_reserved() argument
1278 ttm_bo_init_validate(struct ttm_device * bdev,struct ttm_buffer_object * bo,enum ttm_bo_type type,struct ttm_placement * placement,uint32_t alignment,bool interruptible,struct sg_table * sg,struct dma_resv * resv,void (* destroy)(struct ttm_buffer_object *)) ttm_bo_init_validate() argument
1308 ttm_bo_unmap_virtual(struct ttm_buffer_object * bo) ttm_bo_unmap_virtual() argument
1327 ttm_bo_wait_ctx(struct ttm_buffer_object * bo,struct ttm_operation_ctx * ctx) ttm_bo_wait_ctx() argument
1363 ttm_bo_swapout_cb(struct ttm_lru_walk * walk,struct ttm_buffer_object * bo) ttm_bo_swapout_cb() argument
1488 ttm_bo_tt_destroy(struct ttm_buffer_object * bo) ttm_bo_tt_destroy() argument
1513 ttm_bo_populate(struct ttm_buffer_object * bo,struct ttm_operation_ctx * ctx) ttm_bo_populate() argument
1543 ttm_bo_setup_export(struct ttm_buffer_object * bo,struct ttm_operation_ctx * ctx) ttm_bo_setup_export() argument
[all...]
H A Dttm_bo_vm.c44 static vm_fault_t ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo, in ttm_bo_vm_fault_idle() argument
52 if (dma_resv_test_signaled(bo->base.resv, DMA_RESV_USAGE_KERNEL)) in ttm_bo_vm_fault_idle()
64 drm_gem_object_get(&bo->base); in ttm_bo_vm_fault_idle()
66 (void)dma_resv_wait_timeout(bo->base.resv, in ttm_bo_vm_fault_idle()
69 dma_resv_unlock(bo->base.resv); in ttm_bo_vm_fault_idle()
70 drm_gem_object_put(&bo->base); in ttm_bo_vm_fault_idle()
77 err = dma_resv_wait_timeout(bo->base.resv, DMA_RESV_USAGE_KERNEL, true, in ttm_bo_vm_fault_idle()
87 static unsigned long ttm_bo_io_mem_pfn(struct ttm_buffer_object *bo, in ttm_bo_io_mem_pfn() argument
90 struct ttm_device *bdev = bo->bdev; in ttm_bo_io_mem_pfn()
93 return bdev->funcs->io_mem_pfn(bo, page_offset); in ttm_bo_io_mem_pfn()
[all …]
/linux/drivers/gpu/drm/qxl/
H A Dqxl_object.c34 struct qxl_bo *bo; in qxl_ttm_bo_destroy() local
37 bo = to_qxl_bo(tbo); in qxl_ttm_bo_destroy()
38 qdev = to_qxl(bo->tbo.base.dev); in qxl_ttm_bo_destroy()
40 qxl_surface_evict(qdev, bo, false); in qxl_ttm_bo_destroy()
41 WARN_ON_ONCE(bo->map_count > 0); in qxl_ttm_bo_destroy()
43 list_del_init(&bo->list); in qxl_ttm_bo_destroy()
45 drm_gem_object_release(&bo->tbo.base); in qxl_ttm_bo_destroy()
46 kfree(bo); in qxl_ttm_bo_destroy()
49 bool qxl_ttm_bo_is_qxl_bo(struct ttm_buffer_object *bo) in qxl_ttm_bo_is_qxl_bo() argument
51 if (bo->destroy == &qxl_ttm_bo_destroy) in qxl_ttm_bo_is_qxl_bo()
[all …]
H A Dqxl_object.h30 static inline int qxl_bo_reserve(struct qxl_bo *bo) in qxl_bo_reserve() argument
34 r = ttm_bo_reserve(&bo->tbo, true, false, NULL); in qxl_bo_reserve()
37 struct drm_device *ddev = bo->tbo.base.dev; in qxl_bo_reserve()
39 dev_err(ddev->dev, "%p reserve failed\n", bo); in qxl_bo_reserve()
46 static inline void qxl_bo_unreserve(struct qxl_bo *bo) in qxl_bo_unreserve() argument
48 ttm_bo_unreserve(&bo->tbo); in qxl_bo_unreserve()
51 static inline unsigned long qxl_bo_size(struct qxl_bo *bo) in qxl_bo_size() argument
53 return bo->tbo.base.size; in qxl_bo_size()
62 int qxl_bo_pin_and_vmap(struct qxl_bo *bo, struct iosys_map *map);
63 int qxl_bo_vmap_locked(struct qxl_bo *bo, struct iosys_map *map);
[all …]
/linux/drivers/gpu/drm/panthor/
H A Dpanthor_gem.c46 static void panthor_gem_debugfs_bo_init(struct panthor_gem_object *bo) in panthor_gem_debugfs_bo_init() argument
48 INIT_LIST_HEAD(&bo->debugfs.node); in panthor_gem_debugfs_bo_init()
51 static void panthor_gem_debugfs_bo_add(struct panthor_gem_object *bo) in panthor_gem_debugfs_bo_add() argument
53 struct panthor_device *ptdev = container_of(bo->base.dev, in panthor_gem_debugfs_bo_add()
56 bo->debugfs.creator.tgid = current->tgid; in panthor_gem_debugfs_bo_add()
57 get_task_comm(bo->debugfs.creator.process_name, current->group_leader); in panthor_gem_debugfs_bo_add()
60 list_add_tail(&bo->debugfs.node, &ptdev->gems.node); in panthor_gem_debugfs_bo_add()
64 static void panthor_gem_debugfs_bo_rm(struct panthor_gem_object *bo) in panthor_gem_debugfs_bo_rm() argument
66 struct panthor_device *ptdev = container_of(bo->base.dev, in panthor_gem_debugfs_bo_rm()
69 if (list_empty(&bo in panthor_gem_debugfs_bo_rm()
77 panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object * bo,u32 usage_flags) panthor_gem_debugfs_set_usage_flags() argument
83 panthor_gem_debugfs_bo_rm(struct panthor_gem_object * bo) panthor_gem_debugfs_bo_rm() argument
84 panthor_gem_debugfs_set_usage_flags(struct panthor_gem_object * bo,u32 usage_flags) panthor_gem_debugfs_set_usage_flags() argument
85 panthor_gem_debugfs_bo_init(struct panthor_gem_object * bo) panthor_gem_debugfs_bo_init() argument
89 should_map_wc(struct panthor_gem_object * bo) should_map_wc() argument
121 is_gpu_mapped(struct panthor_gem_object * bo,enum panthor_gem_reclaim_state * state) is_gpu_mapped() argument
144 panthor_gem_evaluate_reclaim_state_locked(struct panthor_gem_object * bo) panthor_gem_evaluate_reclaim_state_locked() argument
168 panthor_gem_update_reclaim_state_locked(struct panthor_gem_object * bo,enum panthor_gem_reclaim_state * old_statep) panthor_gem_update_reclaim_state_locked() argument
218 bo_assert_locked_or_gone(struct panthor_gem_object * bo) bo_assert_locked_or_gone() argument
228 panthor_gem_backing_cleanup_locked(struct panthor_gem_object * bo) panthor_gem_backing_cleanup_locked() argument
240 panthor_gem_backing_get_pages_locked(struct panthor_gem_object * bo) panthor_gem_backing_get_pages_locked() argument
259 panthor_gem_backing_pin_locked(struct panthor_gem_object * bo) panthor_gem_backing_pin_locked() argument
280 panthor_gem_backing_unpin_locked(struct panthor_gem_object * bo) panthor_gem_backing_unpin_locked() argument
296 panthor_gem_dev_map_cleanup_locked(struct panthor_gem_object * bo) panthor_gem_dev_map_cleanup_locked() argument
310 panthor_gem_dev_map_get_sgt_locked(struct panthor_gem_object * bo) panthor_gem_dev_map_get_sgt_locked() argument
344 panthor_gem_get_dev_sgt(struct panthor_gem_object * bo) panthor_gem_get_dev_sgt() argument
356 panthor_gem_vmap_cleanup_locked(struct panthor_gem_object * bo) panthor_gem_vmap_cleanup_locked() argument
367 panthor_gem_prep_for_cpu_map_locked(struct panthor_gem_object * bo) panthor_gem_prep_for_cpu_map_locked() argument
381 panthor_gem_vmap_get_locked(struct panthor_gem_object * bo) panthor_gem_vmap_get_locked() argument
424 panthor_gem_vmap_put_locked(struct panthor_gem_object * bo) panthor_gem_vmap_put_locked() argument
437 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_free_object() local
501 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_prime_begin_cpu_access() local
528 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_prime_end_cpu_access() local
603 const struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_print_info() local
630 panthor_gem_pin(struct panthor_gem_object * bo) panthor_gem_pin() argument
647 panthor_gem_unpin(struct panthor_gem_object * bo) panthor_gem_unpin() argument
660 panthor_gem_swapin_locked(struct panthor_gem_object * bo) panthor_gem_swapin_locked() argument
676 panthor_gem_evict_locked(struct panthor_gem_object * bo) panthor_gem_evict_locked() argument
699 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_get_sg_table() local
711 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_vmap_locked() local
730 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_vunmap_locked() local
744 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_mmap() local
788 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_status() local
827 struct panthor_gem_object *bo = to_panthor_bo(vma->vm_private_data); nonblocking_page_setup() local
843 blocking_page_setup(struct vm_fault * vmf,unsigned int order,struct panthor_gem_object * bo,pgoff_t page_offset,bool mmap_lock_held) blocking_page_setup() argument
880 struct panthor_gem_object *bo = to_panthor_bo(vma->vm_private_data); panthor_gem_any_fault() local
929 struct panthor_gem_object *bo = to_panthor_bo(vma->vm_private_data); panthor_gem_vm_open() local
939 struct panthor_gem_object *bo = to_panthor_bo(vma->vm_private_data); panthor_gem_vm_close() local
985 struct panthor_gem_object *bo; panthor_gem_alloc_object() local
1003 struct panthor_gem_object *bo; panthor_gem_create() local
1047 struct panthor_gem_object *bo; panthor_gem_prime_import_sg_table() local
1086 struct panthor_gem_object *bo; panthor_gem_create_with_handle() local
1108 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_bo_set_label() local
1120 panthor_gem_kernel_bo_set_label(struct panthor_kernel_bo * bo,const char * label) panthor_gem_kernel_bo_set_label() argument
1145 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_sync() local
1247 panthor_kernel_bo_destroy(struct panthor_kernel_bo * bo) panthor_kernel_bo_destroy() argument
1291 struct panthor_gem_object *bo; panthor_kernel_bo_create() local
1420 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_try_evict_no_resv_wait() local
1503 struct panthor_gem_object *bo = to_panthor_bo(obj); panthor_gem_try_evict() local
1642 panthor_gem_debugfs_bo_print(struct panthor_gem_object * bo,struct seq_file * m,struct gem_size_totals * totals) panthor_gem_debugfs_bo_print() argument
1695 struct panthor_gem_object *bo; panthor_gem_debugfs_print_bos() local
[all...]
/linux/drivers/gpu/drm/radeon/
H A Dradeon_object.c45 static void radeon_bo_clear_surface_reg(struct radeon_bo *bo);
54 struct radeon_bo *bo; in radeon_ttm_bo_destroy() local
56 bo = container_of(tbo, struct radeon_bo, tbo); in radeon_ttm_bo_destroy()
58 mutex_lock(&bo->rdev->gem.mutex); in radeon_ttm_bo_destroy()
59 list_del_init(&bo->list); in radeon_ttm_bo_destroy()
60 mutex_unlock(&bo->rdev->gem.mutex); in radeon_ttm_bo_destroy()
61 radeon_bo_clear_surface_reg(bo); in radeon_ttm_bo_destroy()
62 WARN_ON_ONCE(!list_empty(&bo->va)); in radeon_ttm_bo_destroy()
63 if (bo->tbo.base.import_attach) in radeon_ttm_bo_destroy()
64 drm_prime_gem_destroy(&bo in radeon_ttm_bo_destroy()
69 radeon_ttm_bo_is_radeon_bo(struct ttm_buffer_object * bo) radeon_ttm_bo_is_radeon_bo() argument
134 struct radeon_bo *bo; radeon_bo_create() local
218 radeon_bo_kmap(struct radeon_bo * bo,void ** ptr) radeon_bo_kmap() argument
246 radeon_bo_kunmap(struct radeon_bo * bo) radeon_bo_kunmap() argument
255 radeon_bo_ref(struct radeon_bo * bo) radeon_bo_ref() argument
264 radeon_bo_unref(struct radeon_bo ** bo) radeon_bo_unref() argument
272 radeon_bo_pin_restricted(struct radeon_bo * bo,u32 domain,u64 max_offset,u64 * gpu_addr) radeon_bo_pin_restricted() argument
331 radeon_bo_pin(struct radeon_bo * bo,u32 domain,u64 * gpu_addr) radeon_bo_pin() argument
336 radeon_bo_unpin(struct radeon_bo * bo) radeon_bo_unpin() argument
368 struct radeon_bo *bo, *n; radeon_bo_force_delete() local
487 struct radeon_bo *bo = lobj->robj; radeon_bo_list_validate() local
535 radeon_bo_get_surface_reg(struct radeon_bo * bo) radeon_bo_get_surface_reg() argument
589 radeon_bo_clear_surface_reg(struct radeon_bo * bo) radeon_bo_clear_surface_reg() argument
604 radeon_bo_set_tiling_flags(struct radeon_bo * bo,uint32_t tiling_flags,uint32_t pitch) radeon_bo_set_tiling_flags() argument
664 radeon_bo_get_tiling_flags(struct radeon_bo * bo,uint32_t * tiling_flags,uint32_t * pitch) radeon_bo_get_tiling_flags() argument
676 radeon_bo_check_tiling(struct radeon_bo * bo,bool has_moved,bool force_drop) radeon_bo_check_tiling() argument
705 radeon_bo_move_notify(struct ttm_buffer_object * bo) radeon_bo_move_notify() argument
717 radeon_bo_fault_reserve_notify(struct ttm_buffer_object * bo) radeon_bo_fault_reserve_notify() argument
779 radeon_bo_fence(struct radeon_bo * bo,struct radeon_fence * fence,bool shared) radeon_bo_fence() argument
[all...]
H A Dradeon_object.h64 static inline int radeon_bo_reserve(struct radeon_bo *bo, bool no_intr) in radeon_bo_reserve() argument
68 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL); in radeon_bo_reserve()
71 dev_err(bo->rdev->dev, "%p reserve failed\n", bo); in radeon_bo_reserve()
77 static inline void radeon_bo_unreserve(struct radeon_bo *bo) in radeon_bo_unreserve() argument
79 ttm_bo_unreserve(&bo->tbo); in radeon_bo_unreserve()
91 static inline u64 radeon_bo_gpu_offset(struct radeon_bo *bo) in radeon_bo_gpu_offset() argument
96 rdev = radeon_get_rdev(bo->tbo.bdev); in radeon_bo_gpu_offset()
98 switch (bo->tbo.resource->mem_type) { in radeon_bo_gpu_offset()
107 return (bo->tbo.resource->start << PAGE_SHIFT) + start; in radeon_bo_gpu_offset()
110 static inline unsigned long radeon_bo_size(struct radeon_bo *bo) in radeon_bo_size() argument
[all …]
H A Dradeon_mn.c53 struct radeon_bo *bo = container_of(mn, struct radeon_bo, notifier); in radeon_mn_invalidate() local
57 if (!bo->tbo.ttm || !radeon_ttm_tt_is_bound(bo->tbo.bdev, bo->tbo.ttm)) in radeon_mn_invalidate()
63 r = radeon_bo_reserve(bo, true); in radeon_mn_invalidate()
69 r = dma_resv_wait_timeout(bo->tbo.base.resv, DMA_RESV_USAGE_BOOKKEEP, in radeon_mn_invalidate()
74 radeon_ttm_placement_from_domain(bo, RADEON_GEM_DOMAIN_CPU); in radeon_mn_invalidate()
75 r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); in radeon_mn_invalidate()
79 radeon_bo_unreserve(bo); in radeon_mn_invalidate()
96 int radeon_mn_register(struct radeon_bo *bo, unsigned long addr) in radeon_mn_register() argument
100 ret = mmu_interval_notifier_insert(&bo->notifier, current->mm, addr, in radeon_mn_register()
101 radeon_bo_size(bo), &radeon_mn_ops); in radeon_mn_register()
[all …]
H A Dradeon_prime.c39 struct radeon_bo *bo = gem_to_radeon_bo(obj); in radeon_gem_prime_get_sg_table() local
41 return drm_prime_pages_to_sg(obj->dev, bo->tbo.ttm->pages, in radeon_gem_prime_get_sg_table()
42 bo->tbo.ttm->num_pages); in radeon_gem_prime_get_sg_table()
51 struct radeon_bo *bo; in radeon_gem_prime_import_sg_table() local
56 RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); in radeon_gem_prime_import_sg_table()
61 bo->tbo.base.funcs = &radeon_gem_object_funcs; in radeon_gem_prime_import_sg_table()
64 list_add_tail(&bo->list, &rdev->gem.objects); in radeon_gem_prime_import_sg_table()
67 bo->prime_shared_count = 1; in radeon_gem_prime_import_sg_table()
68 return &bo->tbo.base; in radeon_gem_prime_import_sg_table()
73 struct radeon_bo *bo = gem_to_radeon_bo(obj); in radeon_gem_prime_pin() local
[all …]
/linux/drivers/gpu/drm/amd/amdgpu/
H A Damdgpu_object.c63 struct amdgpu_bo *bo = ttm_to_amdgpu_bo(tbo); in amdgpu_bo_destroy() local
65 amdgpu_bo_kunmap(bo); in amdgpu_bo_destroy()
67 if (drm_gem_is_imported(&bo->tbo.base)) in amdgpu_bo_destroy()
68 drm_prime_gem_destroy(&bo->tbo.base, bo->tbo.sg); in amdgpu_bo_destroy()
69 drm_gem_object_release(&bo->tbo.base); in amdgpu_bo_destroy()
70 amdgpu_bo_unref(&bo->parent); in amdgpu_bo_destroy()
71 kvfree(bo); in amdgpu_bo_destroy()
76 struct amdgpu_bo *bo = ttm_to_amdgpu_bo(tbo); in amdgpu_bo_user_destroy() local
79 ubo = to_amdgpu_bo_user(bo); in amdgpu_bo_user_destroy()
94 amdgpu_bo_is_amdgpu_bo(struct ttm_buffer_object * bo) amdgpu_bo_is_amdgpu_bo() argument
381 amdgpu_bo_create_isp_user(struct amdgpu_device * adev,struct dma_buf * dma_buf,u32 domain,struct amdgpu_bo ** bo,u64 * gpu_addr) amdgpu_bo_create_isp_user() argument
508 amdgpu_bo_free_kernel(struct amdgpu_bo ** bo,u64 * gpu_addr,void ** cpu_addr) amdgpu_bo_free_kernel() argument
542 amdgpu_bo_free_isp_user(struct amdgpu_bo * bo) amdgpu_bo_free_isp_user() argument
642 struct amdgpu_bo *bo; amdgpu_bo_create() local
827 amdgpu_bo_kmap(struct amdgpu_bo * bo,void ** ptr) amdgpu_bo_kmap() argument
866 amdgpu_bo_kptr(struct amdgpu_bo * bo) amdgpu_bo_kptr() argument
879 amdgpu_bo_kunmap(struct amdgpu_bo * bo) amdgpu_bo_kunmap() argument
894 amdgpu_bo_ref(struct amdgpu_bo * bo) amdgpu_bo_ref() argument
909 amdgpu_bo_unref(struct amdgpu_bo ** bo) amdgpu_bo_unref() argument
934 amdgpu_bo_pin(struct amdgpu_bo * bo,u32 domain) amdgpu_bo_pin() argument
1019 amdgpu_bo_unpin(struct amdgpu_bo * bo) amdgpu_bo_unpin() argument
1125 amdgpu_bo_set_tiling_flags(struct amdgpu_bo * bo,u64 tiling_flags) amdgpu_bo_set_tiling_flags() argument
1152 amdgpu_bo_get_tiling_flags(struct amdgpu_bo * bo,u64 * tiling_flags) amdgpu_bo_get_tiling_flags() argument
1184 amdgpu_bo_set_metadata(struct amdgpu_bo * bo,void * metadata,u32 metadata_size,uint64_t flags) amdgpu_bo_set_metadata() argument
1231 amdgpu_bo_get_metadata(struct amdgpu_bo * bo,void * buffer,size_t buffer_size,uint32_t * metadata_size,uint64_t * flags) amdgpu_bo_get_metadata() argument
1269 amdgpu_bo_move_notify(struct ttm_buffer_object * bo,bool evict,struct ttm_resource * new_mem) amdgpu_bo_move_notify() argument
1300 amdgpu_bo_release_notify(struct ttm_buffer_object * bo) amdgpu_bo_release_notify() argument
1362 amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object * bo) amdgpu_bo_fault_reserve_notify() argument
1410 amdgpu_bo_fence(struct amdgpu_bo * bo,struct dma_fence * fence,bool shared) amdgpu_bo_fence() argument
1465 amdgpu_bo_sync_wait(struct amdgpu_bo * bo,void * owner,bool intr) amdgpu_bo_sync_wait() argument
1483 amdgpu_bo_gpu_offset(struct amdgpu_bo * bo) amdgpu_bo_gpu_offset() argument
1502 amdgpu_bo_fb_aper_addr(struct amdgpu_bo * bo) amdgpu_bo_fb_aper_addr() argument
1522 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo * bo) amdgpu_bo_gpu_offset_no_check() argument
1549 amdgpu_bo_mem_stats_placement(struct amdgpu_bo * bo) amdgpu_bo_mem_stats_placement() argument
1606 amdgpu_bo_print_flag(m,bo,flag) global() argument
1625 amdgpu_bo_print_info(int id,struct amdgpu_bo * bo,struct seq_file * m) amdgpu_bo_print_info() argument
[all...]
H A Damdgpu_dma_buf.c63 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); in dma_buf_attach_adev() local
65 return amdgpu_ttm_adev(bo->tbo.bdev); in dma_buf_attach_adev()
84 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); in amdgpu_dma_buf_attach() local
85 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); in amdgpu_dma_buf_attach()
97 bo->flags & AMDGPU_GEM_CREATE_GFX12_DCC) in amdgpu_dma_buf_attach()
100 if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) && in amdgpu_dma_buf_attach()
119 r = dma_resv_lock(bo->tbo.base.resv, NULL); in amdgpu_dma_buf_attach()
123 amdgpu_vm_bo_update_shared(bo); in amdgpu_dma_buf_attach()
125 dma_resv_unlock(bo->tbo.base.resv); in amdgpu_dma_buf_attach()
147 struct amdgpu_bo *bo in amdgpu_dma_buf_detach() local
164 struct amdgpu_bo *bo = gem_to_amdgpu_bo(dmabuf->priv); amdgpu_dma_buf_pin() local
200 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_dma_buf_unpin() local
223 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_dma_buf_map() local
303 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_dma_buf_unmap() local
335 struct amdgpu_bo *bo = gem_to_amdgpu_bo(dma_buf->priv); amdgpu_dma_buf_begin_cpu_access() local
364 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_dma_buf_vmap() local
385 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_dma_buf_vunmap() local
418 struct amdgpu_bo *bo = gem_to_amdgpu_bo(gobj); amdgpu_gem_prime_export() local
462 struct amdgpu_bo *bo; amdgpu_dma_buf_create_obj() local
508 struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj); amdgpu_dma_buf_move_notify() local
631 amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device * adev,struct amdgpu_bo * bo) amdgpu_dmabuf_is_xgmi_accessible() argument
[all...]
H A Damdgpu_amdkfd_gpuvm.c296 void amdgpu_amdkfd_release_notify(struct amdgpu_bo *bo) in amdgpu_amdkfd_unreserve_mem_limit()
298 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); in amdgpu_amdkfd_unreserve_mem_limit()
299 u32 alloc_flags = bo->kfd_bo->alloc_flags; in amdgpu_amdkfd_unreserve_mem_limit()
300 u64 size = amdgpu_bo_size(bo); in amdgpu_amdkfd_unreserve_mem_limit()
303 bo->xcp_id); in amdgpu_amdkfd_unreserve_mem_limit()
305 kfree(bo->kfd_bo); in amdgpu_amdkfd_unreserve_mem_limit()
308 void amdgpu_amdkfd_account_vram_pin(struct amdgpu_bo *bo, int xcp_id)
310 if (!bo->kfd_bo) in amdgpu_amdkfd_release_notify()
316 atomic64_add(amdgpu_bo_size(bo), in amdgpu_amdkfd_release_notify()
317 &amdgpu_ttm_adev(bo in amdgpu_amdkfd_release_notify()
309 amdgpu_amdkfd_release_notify(struct amdgpu_bo * bo) amdgpu_amdkfd_release_notify() argument
371 amdgpu_amdkfd_remove_eviction_fence(struct amdgpu_bo * bo,struct amdgpu_amdkfd_fence * ef) amdgpu_amdkfd_remove_eviction_fence() argument
398 amdgpu_amdkfd_remove_all_eviction_fences(struct amdgpu_bo * bo) amdgpu_amdkfd_remove_all_eviction_fences() argument
417 amdgpu_amdkfd_bo_validate(struct amdgpu_bo * bo,uint32_t domain,bool wait) amdgpu_amdkfd_bo_validate() argument
443 amdgpu_amdkfd_bo_validate_and_fence(struct amdgpu_bo * bo,uint32_t domain,struct dma_fence * fence) amdgpu_amdkfd_bo_validate_and_fence() argument
469 amdgpu_amdkfd_validate_vm_bo(void * _unused,struct amdgpu_bo * bo) amdgpu_amdkfd_validate_vm_bo() argument
567 struct amdgpu_bo *bo = attachment->bo_va->base.bo; kfd_mem_dmamap_userptr() local
614 struct amdgpu_bo *bo = attachment->bo_va->base.bo; kfd_mem_dmamap_dmabuf() local
651 struct amdgpu_bo *bo = attachment->bo_va->base.bo; kfd_mem_dmamap_sg_bo() local
728 struct amdgpu_bo *bo = attachment->bo_va->base.bo; kfd_mem_dmaunmap_userptr() local
774 struct amdgpu_bo *bo = attachment->bo_va->base.bo; kfd_mem_dmaunmap_sg_bo() local
839 kfd_mem_attach_dmabuf(struct amdgpu_device * adev,struct kgd_mem * mem,struct amdgpu_bo ** bo) kfd_mem_attach_dmabuf() argument
878 struct amdgpu_bo *bo[2] = {NULL, NULL}; kfd_mem_attach() local
1017 struct amdgpu_bo *bo = attachment->bo_va->base.bo; kfd_mem_detach() local
1065 struct amdgpu_bo *bo = mem->bo; init_user_pages() local
1169 struct amdgpu_bo *bo = mem->bo; reserve_bo_and_vm() local
1211 struct amdgpu_bo *bo = mem->bo; reserve_bo_and_cond_vms() local
1509 amdgpu_amdkfd_gpuvm_pin_bo(struct amdgpu_bo * bo,u32 domain) amdgpu_amdkfd_gpuvm_pin_bo() argument
1552 amdgpu_amdkfd_gpuvm_unpin_bo(struct amdgpu_bo * bo) amdgpu_amdkfd_gpuvm_unpin_bo() argument
1719 struct amdgpu_bo *bo; amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu() local
2031 struct amdgpu_bo *bo; amdgpu_amdkfd_gpuvm_map_memory_to_gpu() local
2241 amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_bo * bo,struct amdgpu_bo ** bo_gart) amdgpu_amdkfd_map_gtt_bo_to_gart() argument
2301 struct amdgpu_bo *bo = mem->bo; amdgpu_amdkfd_gpuvm_map_bo_to_kernel() local
2364 struct amdgpu_bo *bo = mem->bo; amdgpu_amdkfd_gpuvm_unmap_bo_from_kernel() local
2390 struct amdgpu_bo *bo; import_obj_create() local
2561 struct amdgpu_bo *bo; update_invalid_user_pages() local
2687 struct amdgpu_bo *bo; validate_invalid_user_pages() local
2985 struct amdgpu_bo *bo = mem->bo; amdgpu_amdkfd_gpuvm_restore_process_bos() local
3130 struct amdgpu_bo *bo = peer_vm->root.bo; amdgpu_amdkfd_gpuvm_restore_process_bos() local
[all...]
/linux/drivers/gpu/drm/vc4/
H A Dvc4_bo.c135 struct vc4_bo *bo = to_vc4_bo(gem_obj); in vc4_bo_set_label()
145 vc4->bo_labels[bo->label].num_allocated--; in vc4_bo_set_label()
146 vc4->bo_labels[bo->label].size_allocated -= gem_obj->size; in vc4_bo_set_label()
148 if (vc4->bo_labels[bo->label].num_allocated == 0 && in vc4_bo_set_label()
149 is_user_label(bo->label)) { in vc4_bo_set_label()
155 kfree(vc4->bo_labels[bo->label].name); in vc4_bo_set_label()
156 vc4->bo_labels[bo->label].name = NULL; in vc4_bo_set_label()
159 bo->label = label; in vc4_bo_set_label()
167 static void vc4_bo_destroy(struct vc4_bo *bo) in vc4_bo_destroy()
169 struct drm_gem_object *obj = &bo in vc4_bo_destroy()
134 struct vc4_bo *bo = to_vc4_bo(gem_obj); vc4_bo_set_label() local
166 vc4_bo_destroy(struct vc4_bo * bo) vc4_bo_destroy() argument
186 vc4_bo_remove_from_cache(struct vc4_bo * bo) vc4_bo_remove_from_cache() argument
241 struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list, vc4_bo_cache_purge() local
249 vc4_bo_add_to_purgeable_pool(struct vc4_bo * bo) vc4_bo_add_to_purgeable_pool() argument
263 vc4_bo_remove_from_purgeable_pool_locked(struct vc4_bo * bo) vc4_bo_remove_from_purgeable_pool_locked() argument
287 vc4_bo_remove_from_purgeable_pool(struct vc4_bo * bo) vc4_bo_remove_from_purgeable_pool() argument
298 struct vc4_bo *bo = to_vc4_bo(obj); vc4_bo_purge() local
317 struct vc4_bo *bo = list_first_entry(&vc4->purgeable.list, vc4_bo_userspace_cache_purge() local
364 struct vc4_bo *bo = NULL; vc4_bo_get_from_cache() local
396 struct vc4_bo *bo; vc4_create_object() local
427 struct vc4_bo *bo; vc4_bo_create() local
495 struct vc4_bo *bo = NULL; vc4_bo_dumb_create() local
525 struct vc4_bo *bo = list_last_entry(&vc4->bo_cache.time_list, vc4_bo_cache_free_old() local
546 struct vc4_bo *bo = to_vc4_bo(gem_bo); vc4_free_object() local
619 vc4_bo_inc_usecnt(struct vc4_bo * bo) vc4_bo_inc_usecnt() argument
659 vc4_bo_dec_usecnt(struct vc4_bo * bo) vc4_bo_dec_usecnt() argument
688 struct vc4_bo *bo = to_vc4_bo(obj); vc4_prime_export() local
719 struct vc4_bo *bo = to_vc4_bo(obj); vc4_fault() local
733 struct vc4_bo *bo = to_vc4_bo(obj); vc4_gem_object_mmap() local
789 struct vc4_bo *bo = NULL; vc4_create_bo_ioctl() local
845 struct vc4_bo *bo = NULL; vc4_create_shader_bo_ioctl() local
924 struct vc4_bo *bo; vc4_set_tiling_ioctl() local
971 struct vc4_bo *bo; vc4_get_tiling_ioctl() local
[all...]
/linux/drivers/gpu/drm/virtio/
H A Dvirtgpu_object.c66 void virtio_gpu_remove_from_restore_list(struct virtio_gpu_object *bo) in virtio_gpu_remove_from_restore_list() argument
68 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_remove_from_restore_list()
71 list_del_init(&bo->restore_node); in virtio_gpu_remove_from_restore_list()
75 void virtio_gpu_cleanup_object(struct virtio_gpu_object *bo) in virtio_gpu_cleanup_object() argument
77 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_cleanup_object()
79 virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle); in virtio_gpu_cleanup_object()
80 if (virtio_gpu_is_shmem(bo)) { in virtio_gpu_cleanup_object()
81 drm_gem_shmem_free(&bo->base); in virtio_gpu_cleanup_object()
82 } else if (virtio_gpu_is_vram(bo)) { in virtio_gpu_cleanup_object()
83 struct virtio_gpu_object_vram *vram = to_virtio_gpu_vram(bo); in virtio_gpu_cleanup_object()
[all …]
H A Dvirtgpu_prime.c37 struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); in virtgpu_virtio_get_uuid() local
40 wait_event(vgdev->resp_wq, bo->uuid_state != STATE_INITIALIZING); in virtgpu_virtio_get_uuid()
41 if (bo->uuid_state != STATE_OK) in virtgpu_virtio_get_uuid()
44 uuid_copy(uuid, &bo->uuid); in virtgpu_virtio_get_uuid()
54 struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); in virtgpu_gem_map_dma_buf() local
56 if (virtio_gpu_is_vram(bo)) in virtgpu_gem_map_dma_buf()
57 return virtio_gpu_vram_map_dma_buf(bo, attach->dev, dir); in virtgpu_gem_map_dma_buf()
67 struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); in virtgpu_gem_unmap_dma_buf() local
69 if (virtio_gpu_is_vram(bo)) { in virtgpu_gem_unmap_dma_buf()
93 struct virtio_gpu_object *bo) in virtio_gpu_resource_assign_uuid() argument
[all …]
/linux/drivers/gpu/drm/lima/
H A Dlima_gem.c21 int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm) in lima_heap_alloc() argument
24 struct address_space *mapping = bo->base.base.filp->f_mapping; in lima_heap_alloc()
25 struct device *dev = bo->base.base.dev->dev; in lima_heap_alloc()
26 size_t old_size = bo->heap_size; in lima_heap_alloc()
27 size_t new_size = bo->heap_size ? bo->heap_size * 2 : in lima_heap_alloc()
32 if (bo->heap_size >= bo->base.base.size) in lima_heap_alloc()
35 new_size = min(new_size, bo->base.base.size); in lima_heap_alloc()
37 dma_resv_lock(bo in lima_heap_alloc()
115 struct lima_bo *bo; lima_gem_create_handle() local
155 struct lima_bo *bo = to_lima_bo(obj); lima_gem_free_object() local
165 struct lima_bo *bo = to_lima_bo(obj); lima_gem_object_open() local
174 struct lima_bo *bo = to_lima_bo(obj); lima_gem_object_close() local
183 struct lima_bo *bo = to_lima_bo(obj); lima_gem_pin() local
193 struct lima_bo *bo = to_lima_bo(obj); lima_gem_vmap() local
203 struct lima_bo *bo = to_lima_bo(obj); lima_gem_mmap() local
227 struct lima_bo *bo; lima_gem_create_object() local
244 struct lima_bo *bo; lima_gem_get_info() local
262 lima_gem_sync_bo(struct lima_sched_task * task,struct lima_bo * bo,bool write,bool explicit) lima_gem_sync_bo() argument
315 struct lima_bo *bo; lima_gem_submit() local
[all...]
/linux/drivers/gpu/drm/ttm/tests/
H A Dttm_bo_test.c62 struct ttm_buffer_object *bo; in ttm_bo_reserve_optimistic_no_ticket() local
65 bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL); in ttm_bo_reserve_optimistic_no_ticket()
67 err = ttm_bo_reserve(bo, params->interruptible, params->no_wait, NULL); in ttm_bo_reserve_optimistic_no_ticket()
70 dma_resv_unlock(bo->base.resv); in ttm_bo_reserve_optimistic_no_ticket()
75 struct ttm_buffer_object *bo; in ttm_bo_reserve_locked_no_sleep() local
80 bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL); in ttm_bo_reserve_locked_no_sleep()
83 dma_resv_lock(bo->base.resv, NULL); in ttm_bo_reserve_locked_no_sleep()
85 err = ttm_bo_reserve(bo, interruptible, no_wait, NULL); in ttm_bo_reserve_locked_no_sleep()
86 dma_resv_unlock(bo->base.resv); in ttm_bo_reserve_locked_no_sleep()
93 struct ttm_buffer_object *bo; in ttm_bo_reserve_no_wait_ticket() local
[all …]
H A Dttm_tt_test.c42 struct ttm_buffer_object *bo; in ttm_tt_init_basic() local
53 bo = ttm_bo_kunit_init(test, test->priv, params->size, NULL); in ttm_tt_init_basic()
55 err = ttm_tt_init(tt, bo, page_flags, caching, extra_pages); in ttm_tt_init_basic()
69 struct ttm_buffer_object *bo; in ttm_tt_init_misaligned() local
79 bo = ttm_bo_kunit_init(test, test->priv, size, NULL); in ttm_tt_init_misaligned()
82 bo->base.size += 1; in ttm_tt_init_misaligned()
84 err = ttm_tt_init(tt, bo, 0, caching, 0); in ttm_tt_init_misaligned()
92 struct ttm_buffer_object *bo; in ttm_tt_fini_basic() local
100 bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL); in ttm_tt_fini_basic()
102 err = ttm_tt_init(tt, bo, 0, caching, 0); in ttm_tt_fini_basic()
[all …]
/linux/drivers/accel/ivpu/
H A Divpu_gem.h27 int ivpu_bo_bind(struct ivpu_bo *bo);
36 void ivpu_bo_free(struct ivpu_bo *bo);
52 static inline void *ivpu_bo_vaddr(struct ivpu_bo *bo) in ivpu_bo_vaddr() argument
54 return bo->base.vaddr; in ivpu_bo_vaddr()
57 static inline size_t ivpu_bo_size(struct ivpu_bo *bo) in ivpu_bo_size() argument
59 return bo->base.base.size; in ivpu_bo_size()
62 static inline u32 ivpu_bo_cache_mode(struct ivpu_bo *bo) in ivpu_bo_cache_mode() argument
64 return bo->flags & DRM_IVPU_BO_CACHE_MASK; in ivpu_bo_cache_mode()
67 static inline struct ivpu_device *ivpu_bo_to_vdev(struct ivpu_bo *bo) in ivpu_bo_to_vdev() argument
69 return to_ivpu_device(bo->base.base.dev); in ivpu_bo_to_vdev()
[all …]
/linux/drivers/gpu/drm/v3d/
H A Dv3d_bo.c29 struct v3d_bo *bo = to_v3d_bo(obj); in v3d_gem_status()
32 if (bo->base.pages) in v3d_gem_status()
44 struct v3d_bo *bo = to_v3d_bo(obj); in v3d_free_object()
46 if (bo->vaddr) in v3d_free_object()
47 v3d_put_bo_vaddr(bo); in v3d_free_object()
49 v3d_mmu_remove_ptes(bo); in v3d_free_object()
57 drm_mm_remove_node(&bo->node); in v3d_free_object()
61 bo->base.pages_mark_dirty_on_put = true; in v3d_free_object()
63 drm_gem_shmem_free(&bo->base); in v3d_free_object()
84 struct v3d_bo *bo; in v3d_create_object()
28 struct v3d_bo *bo = to_v3d_bo(obj); v3d_gem_status() local
43 struct v3d_bo *bo = to_v3d_bo(obj); v3d_free_object() local
83 struct v3d_bo *bo; v3d_create_object() local
105 struct v3d_bo *bo = to_v3d_bo(obj); v3d_bo_create_finish() local
153 struct v3d_bo *bo; v3d_bo_create() local
194 v3d_get_bo_vaddr(struct v3d_bo * bo) v3d_get_bo_vaddr() argument
202 v3d_put_bo_vaddr(struct v3d_bo * bo) v3d_put_bo_vaddr() argument
212 struct v3d_bo *bo = NULL; v3d_create_bo_ioctl() local
260 struct v3d_bo *bo; v3d_get_bo_offset_ioctl() local
[all...]
/linux/drivers/gpu/drm/vmwgfx/
H A Dvmwgfx_bo.c38 * @bo: Pointer to the embedded struct ttm_buffer_object
40 static void vmw_bo_free(struct ttm_buffer_object *bo) in vmw_bo_free() argument
43 struct vmw_bo *vbo = to_vmw_bo(&bo->base); in vmw_bo_free()
59 dma_resv_lock(bo->base.resv, NULL); in vmw_bo_free()
67 dma_resv_unlock(bo->base.resv); in vmw_bo_free()
96 struct ttm_buffer_object *bo = &buf->tbo; in vmw_bo_pin_in_placement()
101 ret = ttm_bo_reserve(bo, interruptible, false, NULL); in vmw_bo_pin_in_placement()
105 ret = ttm_bo_validate(bo, placement, &ctx); in vmw_bo_pin_in_placement()
109 ttm_bo_unreserve(bo); in vmw_bo_pin_in_placement()
119 * Flushes and unpins the query bo t
93 struct ttm_buffer_object *bo = &buf->tbo; vmw_bo_pin_in_placement() local
129 struct ttm_buffer_object *bo = &buf->tbo; vmw_bo_pin_in_vram_or_gmr() local
198 struct ttm_buffer_object *bo = &buf->tbo; vmw_bo_pin_in_start_of_vram() local
255 struct ttm_buffer_object *bo = &buf->tbo; vmw_bo_unpin() local
277 vmw_bo_get_guest_ptr(const struct ttm_buffer_object * bo,SVGAGuestPtr * ptr) vmw_bo_get_guest_ptr() argument
302 struct ttm_buffer_object *bo = &vbo->tbo; vmw_bo_pin_reserved() local
352 struct ttm_buffer_object *bo = &vbo->tbo; vmw_bo_map_and_cache_size() local
490 struct ttm_buffer_object *bo = &vmw_bo->tbo; vmw_user_bo_synccpu_grab() local
671 vmw_bo_fence_single(struct ttm_buffer_object * bo,struct vmw_fence_obj * fence) vmw_bo_fence_single() argument
698 vmw_bo_swap_notify(struct ttm_buffer_object * bo) vmw_bo_swap_notify() argument
715 vmw_bo_move_notify(struct ttm_buffer_object * bo,struct ttm_resource * mem) vmw_bo_move_notify() argument
809 vmw_bo_placement_set(struct vmw_bo * bo,u32 domain,u32 busy_domain) vmw_bo_placement_set() argument
835 vmw_bo_placement_set_default_accelerated(struct vmw_bo * bo) vmw_bo_placement_set_default_accelerated() argument
[all...]

1234567891011