Lines Matching refs:device_handle
38 static amdgpu_device_handle device_handle; variable
526 &minor_version, &device_handle); in suite_basic_tests_init()
536 r = amdgpu_query_gpu_info(device_handle, &gpu_info); in suite_basic_tests_init()
547 int r = amdgpu_device_deinitialize(device_handle); in suite_basic_tests_clean()
561 r = amdgpu_query_gpu_info(device_handle, &gpu_info); in amdgpu_query_info_test()
564 r = amdgpu_query_firmware_version(device_handle, AMDGPU_INFO_FW_VCE, 0, in amdgpu_query_info_test()
584 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_gfx_separate_ibs()
587 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_gfx_separate_ibs()
593 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_gfx_separate_ibs()
599 r = amdgpu_get_bo_list(device_handle, ib_result_handle, in amdgpu_command_submission_gfx_separate_ibs()
675 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_gfx_shared_ib()
678 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_gfx_shared_ib()
684 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, in amdgpu_command_submission_gfx_shared_ib()
780 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_bo_eviction_test()
787 r = amdgpu_query_heap_info(device_handle, AMDGPU_GEM_DOMAIN_VRAM, in amdgpu_bo_eviction_test()
791 r = amdgpu_bo_alloc_wrap(device_handle, vram_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
794 r = amdgpu_bo_alloc_wrap(device_handle, vram_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
798 r = amdgpu_query_heap_info(device_handle, AMDGPU_GEM_DOMAIN_GTT, in amdgpu_bo_eviction_test()
802 r = amdgpu_bo_alloc_wrap(device_handle, gtt_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
805 r = amdgpu_bo_alloc_wrap(device_handle, gtt_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
816 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_bo_eviction_test()
828 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_bo_eviction_test()
946 r = amdgpu_cs_ctx_create(device_handle, &context_handle[i]); in amdgpu_semaphore_test()
949 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_semaphore_test()
955 r = amdgpu_get_bo_list(device_handle, ib_result_handle[i], in amdgpu_semaphore_test()
1074 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_COMPUTE, 0, &info); in amdgpu_command_submission_compute_nop()
1077 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_compute_nop()
1081 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_compute_nop()
1087 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, in amdgpu_command_submission_compute_nop()
1191 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_test_exec_cs_helper()
1213 r = amdgpu_bo_list_create(device_handle, res_cnt+1, all_res, in amdgpu_test_exec_cs_helper()
1270 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info); in amdgpu_command_submission_write_linear_helper()
1273 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_write_linear_helper()
1284 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_write_linear_helper()
1383 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info); in amdgpu_command_submission_const_fill_helper()
1386 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_const_fill_helper()
1397 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_const_fill_helper()
1516 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info); in amdgpu_command_submission_copy_linear_helper()
1519 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_copy_linear_helper()
1532 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_copy_linear_helper()
1544 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_copy_linear_helper()
1671 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_multi_fence_wait_all()
1674 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_multi_fence_wait_all()
1680 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_multi_fence_wait_all()
1686 r = amdgpu_get_bo_list(device_handle, ib_result_handle, in amdgpu_command_submission_multi_fence_wait_all()
1779 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_userptr_test()
1786 r = amdgpu_create_bo_from_user_mem(device_handle, in amdgpu_userptr_test()
1790 r = amdgpu_va_range_alloc(device_handle, in amdgpu_userptr_test()
1867 r = amdgpu_cs_ctx_create(device_handle, &context_handle[0]); in amdgpu_sync_dependency_test()
1869 r = amdgpu_cs_ctx_create(device_handle, &context_handle[1]); in amdgpu_sync_dependency_test()
1872 r = amdgpu_bo_alloc_and_map(device_handle, 8192, 4096, in amdgpu_sync_dependency_test()
1878 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, in amdgpu_sync_dependency_test()
2151 static void amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle, in amdgpu_memset_dispatch_test() argument
2172 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memset_dispatch_test()
2175 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memset_dispatch_test()
2182 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memset_dispatch_test()
2191 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memset_dispatch_test()
2236 r = amdgpu_bo_list_create(device_handle, 3, resources, NULL, &bo_list); in amdgpu_memset_dispatch_test()
2287 static void amdgpu_memcpy_dispatch_test(amdgpu_device_handle device_handle, in amdgpu_memcpy_dispatch_test() argument
2309 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memcpy_dispatch_test()
2312 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memcpy_dispatch_test()
2319 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_dispatch_test()
2328 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memcpy_dispatch_test()
2334 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memcpy_dispatch_test()
2382 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list); in amdgpu_memcpy_dispatch_test()
2439 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_COMPUTE, 0, &info); in amdgpu_dispatch_test()
2443 amdgpu_memset_dispatch_test(device_handle, AMDGPU_HW_IP_COMPUTE, ring_id); in amdgpu_dispatch_test()
2444 amdgpu_memcpy_dispatch_test(device_handle, AMDGPU_HW_IP_COMPUTE, ring_id); in amdgpu_dispatch_test()
2447 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info); in amdgpu_dispatch_test()
2451 amdgpu_memset_dispatch_test(device_handle, AMDGPU_HW_IP_GFX, ring_id); in amdgpu_dispatch_test()
2452 amdgpu_memcpy_dispatch_test(device_handle, AMDGPU_HW_IP_GFX, ring_id); in amdgpu_dispatch_test()
2775 void amdgpu_memset_draw(amdgpu_device_handle device_handle, in amdgpu_memset_draw() argument
2797 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memset_draw()
2800 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memset_draw()
2807 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memset_draw()
2840 r = amdgpu_bo_list_create(device_handle, 3, resources, NULL, &bo_list); in amdgpu_memset_draw()
2888 static void amdgpu_memset_draw_test(amdgpu_device_handle device_handle, in amdgpu_memset_draw_test() argument
2899 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memset_draw_test()
2905 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memset_draw_test()
2917 amdgpu_memset_draw(device_handle, bo_shader_ps, bo_shader_vs, in amdgpu_memset_draw_test()
2927 static void amdgpu_memcpy_draw(amdgpu_device_handle device_handle, in amdgpu_memcpy_draw() argument
2950 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memcpy_draw()
2953 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memcpy_draw()
2960 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096, in amdgpu_memcpy_draw()
2966 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096, in amdgpu_memcpy_draw()
3013 r = amdgpu_bo_list_create(device_handle, 5, resources, NULL, &bo_list); in amdgpu_memcpy_draw()
3062 static void amdgpu_memcpy_draw_test(amdgpu_device_handle device_handle, uint32_t ring) in amdgpu_memcpy_draw_test() argument
3072 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_draw_test()
3078 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_draw_test()
3090 amdgpu_memcpy_draw(device_handle, bo_shader_ps, bo_shader_vs, in amdgpu_memcpy_draw_test()
3106 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info); in amdgpu_draw_test()
3110 amdgpu_memset_draw_test(device_handle, ring_id); in amdgpu_draw_test()
3111 amdgpu_memcpy_draw_test(device_handle, ring_id); in amdgpu_draw_test()