Home
last modified time | relevance | path

Searched full:mem_type (Results 1 – 25 of 176) sorted by relevance

12345678

/linux-6.8/drivers/gpu/drm/xe/
Dxe_drm_client.c109 u32 mem_type; in bo_meminfo() local
112 mem_type = bo->placement.placement->mem_type; in bo_meminfo()
114 mem_type = XE_PL_TT; in bo_meminfo()
117 stats[mem_type].shared += sz; in bo_meminfo()
119 stats[mem_type].private += sz; in bo_meminfo()
122 stats[mem_type].resident += sz; in bo_meminfo()
126 stats[mem_type].active += sz; in bo_meminfo()
127 else if (mem_type == XE_PL_SYSTEM) in bo_meminfo()
128 stats[mem_type].purgeable += sz; in bo_meminfo()
142 u32 mem_type; in show_meminfo() local
[all …]
Dxe_bo.c42 .mem_type = XE_PL_SYSTEM,
56 .mem_type = XE_PL_TT,
67 bool mem_type_is_vram(u32 mem_type) in mem_type_is_vram() argument
69 return mem_type >= XE_PL_VRAM0 && mem_type != XE_PL_STOLEN; in mem_type_is_vram()
74 return res->mem_type == XE_PL_STOLEN && IS_DGFX(xe); in resource_is_stolen_vram()
79 return mem_type_is_vram(res->mem_type); in resource_is_vram()
90 return bo->ttm.resource->mem_type == XE_PL_STOLEN; in xe_bo_is_stolen()
114 mem_type_to_migrate(struct xe_device *xe, u32 mem_type) in mem_type_to_migrate() argument
118 xe_assert(xe, mem_type == XE_PL_STOLEN || mem_type_is_vram(mem_type)); in mem_type_to_migrate()
119 tile = &xe->tiles[mem_type == XE_PL_STOLEN ? 0 : (mem_type - XE_PL_VRAM0)]; in mem_type_to_migrate()
[all …]
Dxe_res_cursor.h46 u32 mem_type; member
55 mgr = ttm_manager_type(res->bo->bdev, res->mem_type); in xe_res_get_buddy()
79 cur->mem_type = res->mem_type; in xe_res_first()
81 switch (cur->mem_type) { in xe_res_first()
125 cur->mem_type = XE_PL_TT; in xe_res_first()
167 cur->mem_type = XE_PL_TT; in xe_res_first_sg()
203 switch (cur->mem_type) { in xe_res_next()
Dxe_debugfs.c113 u32 mem_type; in xe_debugfs_register() local
123 for (mem_type = XE_PL_VRAM0; mem_type <= XE_PL_VRAM1; ++mem_type) { in xe_debugfs_register()
124 man = ttm_manager_type(bdev, mem_type); in xe_debugfs_register()
129 sprintf(name, "vram%d_mm", mem_type - XE_PL_VRAM0); in xe_debugfs_register()
/linux-6.8/tools/testing/selftests/arm64/mte/
Dcheck_buffer_fill.c28 static int check_buffer_by_byte(int mem_type, int mode) in check_buffer_by_byte() argument
38 ptr = (char *)mte_allocate_memory(sizes[i], mem_type, 0, true); in check_buffer_by_byte()
39 if (check_allocated_memory(ptr, sizes[i], mem_type, true) != KSFT_PASS) in check_buffer_by_byte()
52 mte_free_memory((void *)ptr, sizes[i], mem_type, true); in check_buffer_by_byte()
63 static int check_buffer_underflow_by_byte(int mem_type, int mode, in check_buffer_underflow_by_byte() argument
74 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_underflow_by_byte()
76 if (check_allocated_memory_range(ptr, sizes[i], mem_type, in check_buffer_underflow_by_byte()
151 mte_free_memory_tag_range((void *)ptr, sizes[i], mem_type, underflow_range, 0); in check_buffer_underflow_by_byte()
158 static int check_buffer_overflow_by_byte(int mem_type, int mode, in check_buffer_overflow_by_byte() argument
170 ptr = (char *)mte_allocate_memory_tag_range(sizes[i], mem_type, 0, in check_buffer_overflow_by_byte()
[all …]
Dcheck_tags_inclusion.c49 static int check_single_included_tags(int mem_type, int mode) in check_single_included_tags() argument
54 ptr = mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_single_included_tags()
56 mem_type, false) != KSFT_PASS) in check_single_included_tags()
77 mte_free_memory_tag_range(ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_single_included_tags()
81 static int check_multiple_included_tags(int mem_type, int mode) in check_multiple_included_tags() argument
87 ptr = mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_multiple_included_tags()
89 mem_type, false) != KSFT_PASS) in check_multiple_included_tags()
109 mte_free_memory_tag_range(ptr, BUFFER_SIZE, mem_type, 0, MT_GRANULE_SIZE); in check_multiple_included_tags()
113 static int check_all_included_tags(int mem_type, int mode) in check_all_included_tags() argument
118 ptr = mte_allocate_memory(BUFFER_SIZE + MT_GRANULE_SIZE, mem_type, 0, false); in check_all_included_tags()
[all …]
Dmte_common_util.c123 static void *__mte_allocate_memory_range(size_t size, int mem_type, int mapping, in __mte_allocate_memory_range() argument
131 switch (mem_type) { in __mte_allocate_memory_range()
143 if (mem_type == USE_MMAP) in __mte_allocate_memory_range()
156 if (mem_type == USE_MPROTECT) { in __mte_allocate_memory_range()
168 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping, in mte_allocate_memory_tag_range() argument
171 return __mte_allocate_memory_range(size, mem_type, mapping, range_before, in mte_allocate_memory_tag_range()
175 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags) in mte_allocate_memory() argument
177 return __mte_allocate_memory_range(size, mem_type, mapping, 0, 0, tags, -1); in mte_allocate_memory()
180 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping, bool tags, int fd) in mte_allocate_file_memory() argument
185 if (mem_type != USE_MPROTECT && mem_type != USE_MMAP) { in mte_allocate_file_memory()
[all …]
Dmte_common_util.h45 void *mte_allocate_memory(size_t size, int mem_type, int mapping, bool tags);
46 void *mte_allocate_memory_tag_range(size_t size, int mem_type, int mapping,
48 void *mte_allocate_file_memory(size_t size, int mem_type, int mapping,
50 void *mte_allocate_file_memory_tag_range(size_t size, int mem_type, int mapping,
52 void mte_free_memory(void *ptr, size_t size, int mem_type, bool tags);
53 void mte_free_memory_tag_range(void *ptr, size_t size, int mem_type,
96 int mem_type, bool tags) in check_allocated_memory() argument
105 mte_free_memory((void *)ptr, size, mem_type, false); in check_allocated_memory()
112 static inline int check_allocated_memory_range(void *ptr, size_t size, int mem_type, in check_allocated_memory_range() argument
122 mte_free_memory_tag_range((void *)ptr, size, mem_type, range_before, in check_allocated_memory_range()
Dcheck_mmap_options.c60 static int check_anonymous_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_anonymous_memory_mapping() argument
69 map_ptr = (char *)mte_allocate_memory(map_size, mem_type, mapping, false); in check_anonymous_memory_mapping()
70 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) in check_anonymous_memory_mapping()
84 mte_free_memory((void *)map_ptr, map_size, mem_type, false); in check_anonymous_memory_mapping()
91 static int check_file_memory_mapping(int mem_type, int mode, int mapping, int tag_check) in check_file_memory_mapping() argument
105 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_file_memory_mapping()
106 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_file_memory_mapping()
130 static int check_clear_prot_mte_flag(int mem_type, int mode, int mapping) in check_clear_prot_mte_flag() argument
140 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_clear_prot_mte_flag()
142 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_clear_prot_mte_flag()
[all …]
Dcheck_child_memory.c84 static int check_child_memory_mapping(int mem_type, int mode, int mapping) in check_child_memory_mapping() argument
93 ptr = (char *)mte_allocate_memory_tag_range(sizes[run], mem_type, mapping, in check_child_memory_mapping()
95 if (check_allocated_memory_range(ptr, sizes[run], mem_type, in check_child_memory_mapping()
99 mte_free_memory_tag_range((void *)ptr, sizes[run], mem_type, UNDERFLOW, OVERFLOW); in check_child_memory_mapping()
106 static int check_child_file_mapping(int mem_type, int mode, int mapping) in check_child_file_mapping() argument
119 map_ptr = (char *)mte_allocate_file_memory(map_size, mem_type, mapping, false, fd); in check_child_file_mapping()
120 if (check_allocated_memory(map_ptr, map_size, mem_type, false) != KSFT_PASS) { in check_child_file_mapping()
/linux-6.8/drivers/gpu/drm/loongson/
Dlsdc_ttm.c15 const char *lsdc_mem_type_to_str(uint32_t mem_type) in lsdc_mem_type_to_str() argument
17 switch (mem_type) { in lsdc_mem_type_to_str()
60 lbo->placements[c].mem_type = TTM_PL_VRAM; in lsdc_bo_set_placement()
65 lbo->placements[c].mem_type = TTM_PL_TT; in lsdc_bo_set_placement()
70 lbo->placements[c].mem_type = TTM_PL_SYSTEM; in lsdc_bo_set_placement()
75 lbo->placements[c].mem_type = TTM_PL_SYSTEM; in lsdc_bo_set_placement()
147 switch (resource->mem_type) { in lsdc_bo_evict_flags()
182 lbo, lsdc_mem_type_to_str(new_mem->mem_type), in lsdc_bo_move()
188 if (old_mem->mem_type == TTM_PL_SYSTEM && !tbo->ttm) { in lsdc_bo_move()
195 if (old_mem->mem_type == TTM_PL_SYSTEM && in lsdc_bo_move()
[all …]
/linux-6.8/drivers/gpu/drm/nouveau/nvkm/falcon/
Dbase.c45 nvkm_falcon_dma(struct nvkm_falcon *falcon, enum nvkm_falcon_mem *mem_type, u32 *mem_base) in nvkm_falcon_dma() argument
47 switch (*mem_type) { in nvkm_falcon_dma()
57 enum nvkm_falcon_mem mem_type, u32 mem_base, int len, bool sec) in nvkm_falcon_dma_wr() argument
59 const struct nvkm_falcon_func_dma *dma = nvkm_falcon_dma(falcon, &mem_type, &mem_base); in nvkm_falcon_dma_wr()
60 const char *type = nvkm_falcon_mem(mem_type); in nvkm_falcon_dma_wr()
69 if (mem_type == DMEM) { in nvkm_falcon_dma_wr()
79 ret = dma->init(falcon, dma_addr, dmalen, mem_type, sec, &cmd); in nvkm_falcon_dma_wr()
121 nvkm_falcon_pio(struct nvkm_falcon *falcon, enum nvkm_falcon_mem *mem_type, u32 *mem_base) in nvkm_falcon_pio() argument
123 switch (*mem_type) { in nvkm_falcon_pio()
140 nvkm_falcon_pio_rd(struct nvkm_falcon *falcon, u8 port, enum nvkm_falcon_mem mem_type, u32 mem_base, in nvkm_falcon_pio_rd() argument
[all …]
/linux-6.8/arch/mips/loongson64/
Dinit.c51 u32 i, mem_type; in szmem() local
64 mem_type = loongson_memmap->map[i].mem_type; in szmem()
75 switch (mem_type) { in szmem()
79 pr_info("Node %d, mem_type:%d\t[%pa], %pa bytes usable\n", in szmem()
80 (u32)node_id, mem_type, &mem_start, &mem_size); in szmem()
89 pr_info("Node %d, mem_type:%d\t[%pa], %pa bytes reserved\n", in szmem()
90 (u32)node_id, mem_type, &mem_start, &mem_size); in szmem()
96 pr_info("Node %d, mem_type:%d\t[%pa], %pa bytes unhandled\n", in szmem()
97 (u32)node_id, mem_type, &mem_start, &mem_size); in szmem()
/linux-6.8/drivers/gpu/drm/vmwgfx/
Dvmwgfx_ttm_buffer.c35 .mem_type = TTM_PL_VRAM,
42 .mem_type = TTM_PL_SYSTEM,
49 .mem_type = VMW_PL_GMR,
64 .mem_type = TTM_PL_VRAM,
69 .mem_type = VMW_PL_GMR,
317 vmw_be->mem_type = bo_mem->mem_type; in vmw_ttm_bind()
319 switch (bo_mem->mem_type) { in vmw_ttm_bind()
355 switch (vmw_be->mem_type) { in vmw_ttm_unbind()
458 switch (mem->mem_type) { in vmw_ttm_io_mem_reserve()
507 static bool vmw_memtype_is_system(uint32_t mem_type) in vmw_memtype_is_system() argument
[all …]
Dvmwgfx_bo.c192 if (bo->resource->mem_type == TTM_PL_VRAM && in vmw_bo_pin_in_start_of_vram()
261 if (bo->resource->mem_type == TTM_PL_VRAM) { in vmw_bo_get_guest_ptr()
284 uint32_t old_mem_type = bo->resource->mem_type; in vmw_bo_pin_reserved()
294 pl.mem_type = bo->resource->mem_type; in vmw_bo_pin_reserved()
303 BUG_ON(ret != 0 || bo->resource->mem_type != old_mem_type); in vmw_bo_pin_reserved()
733 if (mem->mem_type == TTM_PL_VRAM || bo->resource->mem_type == TTM_PL_VRAM) in vmw_bo_move_notify()
741 if (mem->mem_type != VMW_PL_MOB && bo->resource->mem_type == VMW_PL_MOB) in vmw_bo_move_notify()
754 pl[n].mem_type = VMW_PL_MOB; in set_placement_list()
761 pl[n].mem_type = VMW_PL_GMR; in set_placement_list()
768 pl[n].mem_type = TTM_PL_VRAM; in set_placement_list()
[all …]
/linux-6.8/include/trace/events/
Dxdp.h330 __field(u32, mem_type)
337 __entry->mem_type = xa->mem.type;
341 TP_printk("mem_id=%d mem_type=%s allocator=%p",
343 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),
358 __field(u32, mem_type)
367 __entry->mem_type = xa->mem.type;
373 TP_printk("mem_id=%d mem_type=%s allocator=%p"
376 __print_symbolic(__entry->mem_type, __MEM_TYPE_SYM_TAB),
392 __field(u32, mem_type)
398 __entry->mem_type = mem->type;
[all …]
/linux-6.8/drivers/gpu/drm/amd/amdgpu/
Damdgpu_ttm.c98 .mem_type = TTM_PL_SYSTEM, in amdgpu_evict_flags()
125 switch (bo->resource->mem_type) { in amdgpu_evict_flags()
201 if (WARN_ON(mem->mem_type == AMDGPU_PL_PREEMPT)) in amdgpu_ttm_map_buffer()
206 *addr = amdgpu_ttm_domain_start(adev, mem->mem_type) + in amdgpu_ttm_map_buffer()
255 if (mem->mem_type == TTM_PL_TT) { in amdgpu_ttm_map_buffer()
382 if (old_mem->mem_type == TTM_PL_VRAM && in amdgpu_move_blit()
423 if (mem->mem_type == TTM_PL_SYSTEM || in amdgpu_mem_visible()
424 mem->mem_type == TTM_PL_TT) in amdgpu_mem_visible()
426 if (mem->mem_type != TTM_PL_VRAM) in amdgpu_mem_visible()
462 if (new_mem->mem_type == TTM_PL_TT || in amdgpu_bo_move()
[all …]
Damdgpu_atomfirmware.c304 u8 mem_type; in amdgpu_atomfirmware_get_vram_info() local
331 mem_type = igp_info->v11.memorytype; in amdgpu_atomfirmware_get_vram_info()
332 if (mem_type == LpDdr5MemType) in amdgpu_atomfirmware_get_vram_info()
339 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
352 mem_type = igp_info->v21.memorytype; in amdgpu_atomfirmware_get_vram_info()
353 if (mem_type == LpDdr5MemType) in amdgpu_atomfirmware_get_vram_info()
360 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
381 mem_type = vram_info->v30.memory_type; in amdgpu_atomfirmware_get_vram_info()
383 *vram_type = convert_atom_mem_type_to_vram_type(adev, mem_type); in amdgpu_atomfirmware_get_vram_info()
404 mem_type = vram_module->v9.memory_type; in amdgpu_atomfirmware_get_vram_info()
[all …]
Damdgpu_object.c148 places[c].mem_type = TTM_PL_VRAM; in amdgpu_bo_placement_from_domain()
164 places[c].mem_type = AMDGPU_PL_DOORBELL; in amdgpu_bo_placement_from_domain()
172 places[c].mem_type = in amdgpu_bo_placement_from_domain()
182 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
190 places[c].mem_type = AMDGPU_PL_GDS; in amdgpu_bo_placement_from_domain()
198 places[c].mem_type = AMDGPU_PL_GWS; in amdgpu_bo_placement_from_domain()
206 places[c].mem_type = AMDGPU_PL_OA; in amdgpu_bo_placement_from_domain()
214 places[c].mem_type = TTM_PL_SYSTEM; in amdgpu_bo_placement_from_domain()
623 bo->tbo.resource->mem_type == TTM_PL_VRAM && in amdgpu_bo_create()
631 bo->tbo.resource->mem_type == TTM_PL_VRAM) { in amdgpu_bo_create()
[all …]
/linux-6.8/drivers/i2c/busses/
Di2c-amd-mp2.h64 enum mem_type { enum
76 * @mem_type: bit 31 0-DRAM; 1-C2P msg o/p
86 enum mem_type mem_type : 1; member
119 * @mem_type: bit 7 0-DRAM; 1-C2P msg o/p
129 enum mem_type mem_type : 1; member
/linux-6.8/drivers/gpu/drm/radeon/
Dradeon_ttm.c87 .mem_type = TTM_PL_SYSTEM, in radeon_evict_flags()
101 switch (bo->resource->mem_type) { in radeon_evict_flags()
119 if (rbo->placements[i].mem_type == TTM_PL_VRAM) { in radeon_evict_flags()
154 switch (old_mem->mem_type) { in radeon_move_blit()
162 DRM_ERROR("Unknown placement %d\n", old_mem->mem_type); in radeon_move_blit()
165 switch (new_mem->mem_type) { in radeon_move_blit()
173 DRM_ERROR("Unknown placement %d\n", old_mem->mem_type); in radeon_move_blit()
202 if (new_mem->mem_type == TTM_PL_TT) { in radeon_bo_move()
213 if (!old_mem || (old_mem->mem_type == TTM_PL_SYSTEM && in radeon_bo_move()
218 if (old_mem->mem_type == TTM_PL_SYSTEM && in radeon_bo_move()
[all …]
Dradeon_object.h35 * radeon_mem_type_to_domain - return domain corresponding to mem_type
36 * @mem_type: ttm memory type
38 * Returns corresponding domain of the ttm mem_type
40 static inline unsigned radeon_mem_type_to_domain(u32 mem_type) in radeon_mem_type_to_domain() argument
42 switch (mem_type) { in radeon_mem_type_to_domain()
98 switch (bo->tbo.resource->mem_type) { in radeon_bo_gpu_offset()
/linux-6.8/drivers/gpu/drm/qxl/
Dqxl_object.c71 qbo->placements[c].mem_type = TTM_PL_VRAM; in qxl_ttm_placement_from_domain()
75 qbo->placements[c].mem_type = TTM_PL_PRIV; in qxl_ttm_placement_from_domain()
77 qbo->placements[c].mem_type = TTM_PL_VRAM; in qxl_ttm_placement_from_domain()
81 qbo->placements[c].mem_type = TTM_PL_SYSTEM; in qxl_ttm_placement_from_domain()
85 qbo->placements[c].mem_type = TTM_PL_SYSTEM; in qxl_ttm_placement_from_domain()
216 if (bo->tbo.resource->mem_type == TTM_PL_VRAM) in qxl_bo_kmap_atomic_page()
218 else if (bo->tbo.resource->mem_type == TTM_PL_PRIV) in qxl_bo_kmap_atomic_page()
270 if ((bo->tbo.resource->mem_type != TTM_PL_VRAM) && in qxl_bo_kunmap_atomic_page()
271 (bo->tbo.resource->mem_type != TTM_PL_PRIV)) in qxl_bo_kunmap_atomic_page()
/linux-6.8/drivers/gpu/drm/nouveau/
Dnouveau_bo.c413 pl[*n].mem_type = TTM_PL_VRAM; in set_placement_list()
418 pl[*n].mem_type = TTM_PL_TT; in set_placement_list()
423 pl[*n].mem_type = TTM_PL_SYSTEM; in set_placement_list()
502 switch (bo->resource->mem_type) { in nouveau_bo_pin()
516 bo->resource->mem_type, domain); in nouveau_bo_pin()
537 switch (bo->resource->mem_type) { in nouveau_bo_pin()
568 switch (bo->resource->mem_type) { in nouveau_bo_unpin()
807 switch (bo->resource->mem_type) { in nouveau_bo_evict_flags()
994 if (mem && new_reg->mem_type != TTM_PL_SYSTEM && in nouveau_bo_move_ntfy()
1026 if (new_reg->mem_type != TTM_PL_VRAM) in nouveau_bo_vm_bind()
[all …]
/linux-6.8/Documentation/devicetree/bindings/reserved-memory/
Dramoops.yaml106 Use mem_type instead. If present, and mem_type is not specified,
107 it is equivalent to mem_type = 1 and uses unbuffered mappings to map
108 the reserved region (defaults to buffered mappings mem_type = 0).
109 If both are specified -- "mem_type" overrides "unbuffered".

12345678