Home
last modified time | relevance | path

Searched refs:mman (Results 1 – 25 of 44) sorted by relevance

12

/drivers/gpu/drm/amd/amdgpu/
Damdgpu_discovery.c140 adev->mman.discovery_tmr_size, false); in amdgpu_discovery_read_binary()
172 adev->mman.discovery_tmr_size = DISCOVERY_TMR_SIZE; in amdgpu_discovery_init()
173 adev->mman.discovery_bin = kzalloc(adev->mman.discovery_tmr_size, GFP_KERNEL); in amdgpu_discovery_init()
174 if (!adev->mman.discovery_bin) in amdgpu_discovery_init()
177 r = amdgpu_discovery_read_binary(adev, adev->mman.discovery_bin); in amdgpu_discovery_init()
183 bhdr = (struct binary_header *)adev->mman.discovery_bin; in amdgpu_discovery_init()
196 if (!amdgpu_discovery_verify_checksum(adev->mman.discovery_bin + offset, in amdgpu_discovery_init()
206 ihdr = (struct ip_discovery_header *)(adev->mman.discovery_bin + offset); in amdgpu_discovery_init()
214 if (!amdgpu_discovery_verify_checksum(adev->mman.discovery_bin + offset, in amdgpu_discovery_init()
224 ghdr = (struct gpu_info_header *)(adev->mman.discovery_bin + offset); in amdgpu_discovery_init()
[all …]
Damdgpu_ttm.c74 return ttm_range_man_init(&adev->mman.bdev, type, in amdgpu_ttm_init_on_chip()
139 if (!adev->mman.buffer_funcs_enabled) { in amdgpu_evict_flags()
204 BUG_ON(adev->mman.buffer_funcs->copy_max_bytes < in amdgpu_ttm_map_buffer()
220 num_dw = ALIGN(adev->mman.buffer_funcs->copy_num_dw, 8); in amdgpu_ttm_map_buffer()
269 r = amdgpu_job_submit(job, &adev->mman.entity, in amdgpu_ttm_map_buffer()
308 struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; in amdgpu_ttm_copy_mem_to_mem()
313 if (!adev->mman.buffer_funcs_enabled) { in amdgpu_ttm_copy_mem_to_mem()
321 mutex_lock(&adev->mman.gtt_window_lock); in amdgpu_ttm_copy_mem_to_mem()
361 mutex_unlock(&adev->mman.gtt_window_lock); in amdgpu_ttm_copy_mem_to_mem()
527 if (adev->mman.buffer_funcs_enabled) { in amdgpu_bo_move()
[all …]
Damdgpu_preempt_mgr.c50 man = ttm_manager_type(&adev->mman.bdev, AMDGPU_PL_PREEMPT); in mem_info_preempt_used_show()
148 struct amdgpu_preempt_mgr *mgr = &adev->mman.preempt_mgr; in amdgpu_preempt_mgr_init()
165 ttm_set_driver_manager(&adev->mman.bdev, AMDGPU_PL_PREEMPT, in amdgpu_preempt_mgr_init()
181 struct amdgpu_preempt_mgr *mgr = &adev->mman.preempt_mgr; in amdgpu_preempt_mgr_fini()
187 ret = ttm_resource_manager_evict_all(&adev->mman.bdev, man); in amdgpu_preempt_mgr_fini()
194 ttm_set_driver_manager(&adev->mman.bdev, AMDGPU_PL_PREEMPT, NULL); in amdgpu_preempt_mgr_fini()
Damdgpu_gtt_mgr.c62 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT); in amdgpu_mem_info_gtt_total_show()
82 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT); in amdgpu_mem_info_gtt_used_show()
235 adev = container_of(mgr, typeof(*adev), mman.gtt_mgr); in amdgpu_gtt_mgr_recover()
287 struct amdgpu_gtt_mgr *mgr = &adev->mman.gtt_mgr; in amdgpu_gtt_mgr_init()
302 ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_TT, &mgr->manager); in amdgpu_gtt_mgr_init()
317 struct amdgpu_gtt_mgr *mgr = &adev->mman.gtt_mgr; in amdgpu_gtt_mgr_fini()
323 ret = ttm_resource_manager_evict_all(&adev->mman.bdev, man); in amdgpu_gtt_mgr_fini()
332 ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_TT, NULL); in amdgpu_gtt_mgr_fini()
Damdgpu_gmc.c694 adev->mman.keep_stolen_vga_memory = true; in amdgpu_gmc_get_vbios_allocations()
697 adev->mman.keep_stolen_vga_memory = false; in amdgpu_gmc_get_vbios_allocations()
707 if (adev->mman.keep_stolen_vga_memory) in amdgpu_gmc_get_vbios_allocations()
716 adev->mman.stolen_vga_size = AMDGPU_VBIOS_VGA_ALLOCATION; in amdgpu_gmc_get_vbios_allocations()
717 adev->mman.stolen_extended_size = size - adev->mman.stolen_vga_size; in amdgpu_gmc_get_vbios_allocations()
719 adev->mman.stolen_vga_size = size; in amdgpu_gmc_get_vbios_allocations()
720 adev->mman.stolen_extended_size = 0; in amdgpu_gmc_get_vbios_allocations()
815 adev->mman.stolen_reserved_offset = 0; in amdgpu_gmc_get_reserved_allocation()
816 adev->mman.stolen_reserved_size = 0; in amdgpu_gmc_get_reserved_allocation()
821 adev->mman.stolen_reserved_offset = 0x1ffb0000; in amdgpu_gmc_get_reserved_allocation()
[all …]
Damdgpu_vram_mgr.c48 return container_of(mgr, struct amdgpu_device, mman.vram_mgr); in to_amdgpu_device()
101 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM); in amdgpu_mem_info_vram_used_show()
121 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM); in amdgpu_mem_info_vis_vram_used_show()
697 struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr; in amdgpu_vram_mgr_init()
709 ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, &mgr->manager); in amdgpu_vram_mgr_init()
724 struct amdgpu_vram_mgr *mgr = &adev->mman.vram_mgr; in amdgpu_vram_mgr_fini()
731 ret = ttm_resource_manager_evict_all(&adev->mman.bdev, man); in amdgpu_vram_mgr_fini()
747 ttm_set_driver_manager(&adev->mman.bdev, TTM_PL_VRAM, NULL); in amdgpu_vram_mgr_fini()
Damdgpu_sdma.h116 #define amdgpu_emit_copy_buffer(adev, ib, s, d, b, t) (adev)->mman.buffer_funcs->emit_copy_buffer((…
117 #define amdgpu_emit_fill_buffer(adev, ib, s, d, b) (adev)->mman.buffer_funcs->emit_fill_buffer((ib)…
Dgmc_v10_0.c317 struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; in gmc_v10_0_flush_gpu_tlb()
345 mutex_lock(&adev->mman.gtt_window_lock); in gmc_v10_0_flush_gpu_tlb()
349 mutex_unlock(&adev->mman.gtt_window_lock); in gmc_v10_0_flush_gpu_tlb()
355 if (!adev->mman.buffer_funcs_enabled || in gmc_v10_0_flush_gpu_tlb()
360 mutex_unlock(&adev->mman.gtt_window_lock); in gmc_v10_0_flush_gpu_tlb()
378 r = amdgpu_job_submit(job, &adev->mman.entity, in gmc_v10_0_flush_gpu_tlb()
383 mutex_unlock(&adev->mman.gtt_window_lock); in gmc_v10_0_flush_gpu_tlb()
394 mutex_unlock(&adev->mman.gtt_window_lock); in gmc_v10_0_flush_gpu_tlb()
Damdgpu_virt.c416 retired_page = *(uint64_t *)(adev->mman.fw_vram_usage_va + in amdgpu_virt_add_bad_page()
549 struct ttm_resource_manager *vram_man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM); in amdgpu_virt_write_vf2pf_data()
621 if (adev->mman.fw_vram_usage_va != NULL) { in amdgpu_virt_init_data_exchange()
644 if (adev->mman.fw_vram_usage_va != NULL) { in amdgpu_virt_exchange_data()
648 (adev->mman.fw_vram_usage_va + (AMD_SRIOV_MSG_PF2VF_OFFSET_KB << 10)); in amdgpu_virt_exchange_data()
651 (adev->mman.fw_vram_usage_va + (AMD_SRIOV_MSG_VF2PF_OFFSET_KB << 10)); in amdgpu_virt_exchange_data()
Damdgpu_benchmark.c41 struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; in amdgpu_benchmark_do_move()
129 if (adev->mman.buffer_funcs) { in amdgpu_benchmark_move()
Damdgpu_test.c34 struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; in amdgpu_do_test_moves()
248 if (adev->mman.buffer_funcs) in amdgpu_test_moves()
Dpsp_v11_0.c681 if (adev->gmc.visible_vram_size < sz || !adev->mman.aper_base_kaddr) { in psp_v11_0_memory_training()
684 adev->mman.aper_base_kaddr); in psp_v11_0_memory_training()
695 memcpy_fromio(buf, adev->mman.aper_base_kaddr, sz); in psp_v11_0_memory_training()
704 memcpy_toio(adev->mman.aper_base_kaddr, buf, sz); in psp_v11_0_memory_training()
Dsdma_v5_2.c481 if ((adev->mman.buffer_funcs_ring == sdma0) || in sdma_v5_2_gfx_stop()
482 (adev->mman.buffer_funcs_ring == sdma1) || in sdma_v5_2_gfx_stop()
483 (adev->mman.buffer_funcs_ring == sdma2) || in sdma_v5_2_gfx_stop()
484 (adev->mman.buffer_funcs_ring == sdma3)) in sdma_v5_2_gfx_stop()
745 if (adev->mman.buffer_funcs_ring == ring) in sdma_v5_2_gfx_resume()
1837 if (adev->mman.buffer_funcs == NULL) { in sdma_v5_2_set_buffer_funcs()
1838 adev->mman.buffer_funcs = &sdma_v5_2_buffer_funcs; in sdma_v5_2_set_buffer_funcs()
1839 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in sdma_v5_2_set_buffer_funcs()
Dsi_dma.c127 if (adev->mman.buffer_funcs_ring == ring) in si_dma_stop()
187 if (adev->mman.buffer_funcs_ring == ring) in si_dma_start()
830 adev->mman.buffer_funcs = &si_dma_buffer_funcs; in si_dma_set_buffer_funcs()
831 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in si_dma_set_buffer_funcs()
Dsdma_v2_4.c350 if ((adev->mman.buffer_funcs_ring == sdma0) || in sdma_v2_4_gfx_stop()
351 (adev->mman.buffer_funcs_ring == sdma1)) in sdma_v2_4_gfx_stop()
492 if (adev->mman.buffer_funcs_ring == ring) in sdma_v2_4_gfx_resume()
1256 adev->mman.buffer_funcs = &sdma_v2_4_buffer_funcs; in sdma_v2_4_set_buffer_funcs()
1257 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in sdma_v2_4_set_buffer_funcs()
Dcik_sdma.c317 if ((adev->mman.buffer_funcs_ring == sdma0) || in cik_sdma_gfx_stop()
318 (adev->mman.buffer_funcs_ring == sdma1)) in cik_sdma_gfx_stop()
514 if (adev->mman.buffer_funcs_ring == ring) in cik_sdma_gfx_resume()
1366 adev->mman.buffer_funcs = &cik_sdma_buffer_funcs; in cik_sdma_set_buffer_funcs()
1367 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in cik_sdma_set_buffer_funcs()
Damdgpu_object.c452 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT); in amdgpu_bo_validate_size()
461 man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM); in amdgpu_bo_validate_size()
578 bo->tbo.bdev = &adev->mman.bdev; in amdgpu_bo_create()
590 r = ttm_bo_init_reserved(&adev->mman.bdev, &bo->tbo, size, bp->type, in amdgpu_bo_create()
765 struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; in amdgpu_bo_restore_shadow()
Damdgpu_kms.c678 ui64 = amdgpu_vram_mgr_usage(ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM)); in amdgpu_info_ioctl()
681 ui64 = amdgpu_vram_mgr_vis_usage(ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM)); in amdgpu_info_ioctl()
684 ui64 = amdgpu_gtt_mgr_usage(ttm_manager_type(&adev->mman.bdev, TTM_PL_TT)); in amdgpu_info_ioctl()
707 vram_gtt.gtt_size = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT)->size; in amdgpu_info_ioctl()
716 ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM); in amdgpu_info_ioctl()
718 ttm_manager_type(&adev->mman.bdev, TTM_PL_TT); in amdgpu_info_ioctl()
Dsdma_v3_0.c524 if ((adev->mman.buffer_funcs_ring == sdma0) || in sdma_v3_0_gfx_stop()
525 (adev->mman.buffer_funcs_ring == sdma1)) in sdma_v3_0_gfx_stop()
764 if (adev->mman.buffer_funcs_ring == ring) in sdma_v3_0_gfx_resume()
1694 adev->mman.buffer_funcs = &sdma_v3_0_buffer_funcs; in sdma_v3_0_set_buffer_funcs()
1695 adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; in sdma_v3_0_set_buffer_funcs()
Damdgpu_device.c359 if (!adev->mman.aper_base_kaddr) in amdgpu_device_aper_access()
364 addr = adev->mman.aper_base_kaddr + pos; in amdgpu_device_aper_access()
1960 if (adev->mman.discovery_bin) { in amdgpu_device_parse_gpu_info_fw()
3536 adev->mman.buffer_funcs = NULL; in amdgpu_device_init()
3537 adev->mman.buffer_funcs_ring = NULL; in amdgpu_device_init()
3934 if (adev->mman.aper_base_kaddr) in amdgpu_device_unmap_mmio()
3935 iounmap(adev->mman.aper_base_kaddr); in amdgpu_device_unmap_mmio()
3936 adev->mman.aper_base_kaddr = NULL; in amdgpu_device_unmap_mmio()
3957 if (adev->mman.initialized) { in amdgpu_device_fini_hw()
3958 flush_delayed_work(&adev->mman.bdev.wq); in amdgpu_device_fini_hw()
[all …]
/drivers/gpu/drm/qxl/
Dqxl_ttm.c42 struct qxl_mman *mman; in qxl_get_qdev() local
45 mman = container_of(bdev, struct qxl_mman, bdev); in qxl_get_qdev()
46 qdev = container_of(mman, struct qxl_device, mman); in qxl_get_qdev()
179 return ttm_range_man_init(&qdev->mman.bdev, type, false, size); in qxl_ttm_init_mem_type()
188 r = ttm_device_init(&qdev->mman.bdev, &qxl_bo_driver, NULL, in qxl_ttm_init()
220 ttm_range_man_fini(&qdev->mman.bdev, TTM_PL_VRAM); in qxl_ttm_fini()
221 ttm_range_man_fini(&qdev->mman.bdev, TTM_PL_PRIV); in qxl_ttm_fini()
222 ttm_device_fini(&qdev->mman.bdev); in qxl_ttm_fini()
256 qxl_mem_types_list[i].data = ttm_manager_type(&qdev->mman.bdev, TTM_PL_VRAM); in qxl_ttm_debugfs_init()
258 qxl_mem_types_list[i].data = ttm_manager_type(&qdev->mman.bdev, TTM_PL_PRIV); in qxl_ttm_debugfs_init()
Dqxl_object.c144 r = ttm_bo_init_reserved(&qdev->mman.bdev, &bo->tbo, size, type, in qxl_bo_create()
404 man = ttm_manager_type(&qdev->mman.bdev, TTM_PL_PRIV); in qxl_surf_evict()
405 return ttm_resource_manager_evict_all(&qdev->mman.bdev, man); in qxl_surf_evict()
412 man = ttm_manager_type(&qdev->mman.bdev, TTM_PL_VRAM); in qxl_vram_evict()
413 return ttm_resource_manager_evict_all(&qdev->mman.bdev, man); in qxl_vram_evict()
/drivers/gpu/drm/radeon/
Dradeon_ttm.c62 struct radeon_mman *mman; in radeon_get_rdev() local
65 mman = container_of(bdev, struct radeon_mman, bdev); in radeon_get_rdev()
66 rdev = container_of(mman, struct radeon_device, mman); in radeon_get_rdev()
72 return ttm_range_man_init(&rdev->mman.bdev, TTM_PL_VRAM, in radeon_ttm_init_vram()
78 return ttm_range_man_init(&rdev->mman.bdev, TTM_PL_TT, in radeon_ttm_init_gtt()
568 return ttm_pool_alloc(&rdev->mman.bdev.pool, ttm, ctx); in radeon_ttm_tt_populate()
586 return ttm_pool_free(&rdev->mman.bdev.pool, ttm); in radeon_ttm_tt_unpopulate()
712 r = ttm_device_init(&rdev->mman.bdev, &radeon_bo_driver, rdev->dev, in radeon_ttm_init()
721 rdev->mman.initialized = true; in radeon_ttm_init()
766 if (!rdev->mman.initialized) in radeon_ttm_fini()
[all …]
/drivers/gpu/drm/amd/amdkfd/
Dkfd_migrate.c59 num_dw = ALIGN(adev->mman.buffer_funcs->copy_num_dw, 8); in svm_migrate_gart_map()
89 r = amdgpu_job_submit(job, &adev->mman.entity, in svm_migrate_gart_map()
133 struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring; in svm_migrate_copy_memory_gart()
139 mutex_lock(&adev->mman.gtt_window_lock); in svm_migrate_copy_memory_gart()
175 mutex_unlock(&adev->mman.gtt_window_lock); in svm_migrate_copy_memory_gart()
/drivers/gpu/drm/i915/selftests/
Di915_live_selftests.h32 selftest(mman, i915_gem_mman_live_selftests)

12