Lines Matching refs:device_handle
45 static amdgpu_device_handle device_handle; variable
623 &minor_version, &device_handle)) in suite_basic_tests_enable()
626 asic_id = device_handle->info.asic_id; in suite_basic_tests_enable()
628 if (amdgpu_device_deinitialize(device_handle)) in suite_basic_tests_enable()
661 &minor_version, &device_handle); in suite_basic_tests_init()
671 r = amdgpu_query_gpu_info(device_handle, &gpu_info); in suite_basic_tests_init()
682 int r = amdgpu_device_deinitialize(device_handle); in suite_basic_tests_clean()
696 r = amdgpu_query_gpu_info(device_handle, &gpu_info); in amdgpu_query_info_test()
699 r = amdgpu_query_firmware_version(device_handle, AMDGPU_INFO_FW_VCE, 0, in amdgpu_query_info_test()
719 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_gfx_separate_ibs()
722 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_gfx_separate_ibs()
728 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_gfx_separate_ibs()
734 r = amdgpu_get_bo_list(device_handle, ib_result_handle, in amdgpu_command_submission_gfx_separate_ibs()
810 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_gfx_shared_ib()
813 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_gfx_shared_ib()
819 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, in amdgpu_command_submission_gfx_shared_ib()
915 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_bo_eviction_test()
922 r = amdgpu_query_heap_info(device_handle, AMDGPU_GEM_DOMAIN_VRAM, in amdgpu_bo_eviction_test()
926 r = amdgpu_bo_alloc_wrap(device_handle, vram_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
929 r = amdgpu_bo_alloc_wrap(device_handle, vram_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
933 r = amdgpu_query_heap_info(device_handle, AMDGPU_GEM_DOMAIN_GTT, in amdgpu_bo_eviction_test()
937 r = amdgpu_bo_alloc_wrap(device_handle, gtt_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
940 r = amdgpu_bo_alloc_wrap(device_handle, gtt_info.max_allocation, 4096, in amdgpu_bo_eviction_test()
951 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_bo_eviction_test()
963 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_bo_eviction_test()
1081 r = amdgpu_cs_ctx_create(device_handle, &context_handle[i]); in amdgpu_semaphore_test()
1084 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_semaphore_test()
1090 r = amdgpu_get_bo_list(device_handle, ib_result_handle[i], in amdgpu_semaphore_test()
1209 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_COMPUTE, 0, &info); in amdgpu_command_submission_compute_nop()
1212 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_compute_nop()
1216 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_compute_nop()
1222 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, in amdgpu_command_submission_compute_nop()
1302 amdgpu_test_exec_cs_helper_raw(amdgpu_device_handle device_handle, in amdgpu_test_exec_cs_helper_raw() argument
1329 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_test_exec_cs_helper_raw()
1353 r = amdgpu_bo_list_create(device_handle, res_cnt+1, all_res, in amdgpu_test_exec_cs_helper_raw()
1392 amdgpu_test_exec_cs_helper_raw(device_handle, context_handle, in amdgpu_test_exec_cs_helper()
1600 amdgpu_command_submission_write_linear_helper_with_secure(device_handle, in amdgpu_command_submission_write_linear_helper()
1636 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info); in amdgpu_command_submission_const_fill_helper()
1639 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_const_fill_helper()
1650 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_const_fill_helper()
1769 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info); in amdgpu_command_submission_copy_linear_helper()
1772 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_copy_linear_helper()
1785 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_copy_linear_helper()
1797 r = amdgpu_bo_alloc_and_map(device_handle, in amdgpu_command_submission_copy_linear_helper()
1924 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_command_submission_multi_fence_wait_all()
1927 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_multi_fence_wait_all()
1933 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096, in amdgpu_command_submission_multi_fence_wait_all()
1939 r = amdgpu_get_bo_list(device_handle, ib_result_handle, in amdgpu_command_submission_multi_fence_wait_all()
2032 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_userptr_test()
2039 r = amdgpu_create_bo_from_user_mem(device_handle, in amdgpu_userptr_test()
2043 r = amdgpu_va_range_alloc(device_handle, in amdgpu_userptr_test()
2120 r = amdgpu_cs_ctx_create(device_handle, &context_handle[0]); in amdgpu_sync_dependency_test()
2122 r = amdgpu_cs_ctx_create(device_handle, &context_handle[1]); in amdgpu_sync_dependency_test()
2125 r = amdgpu_bo_alloc_and_map(device_handle, 8192, 4096, in amdgpu_sync_dependency_test()
2131 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL, in amdgpu_sync_dependency_test()
2436 static void amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle, in amdgpu_memset_dispatch_test() argument
2457 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memset_dispatch_test()
2460 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memset_dispatch_test()
2467 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memset_dispatch_test()
2477 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memset_dispatch_test()
2527 r = amdgpu_bo_list_create(device_handle, 3, resources, NULL, &bo_list); in amdgpu_memset_dispatch_test()
2578 static void amdgpu_memcpy_dispatch_test(amdgpu_device_handle device_handle, in amdgpu_memcpy_dispatch_test() argument
2602 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memcpy_dispatch_test()
2605 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memcpy_dispatch_test()
2612 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_dispatch_test()
2623 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memcpy_dispatch_test()
2629 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memcpy_dispatch_test()
2682 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list); in amdgpu_memcpy_dispatch_test()
2747 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_COMPUTE, 0, &info); in amdgpu_compute_dispatch_test()
2753 amdgpu_memset_dispatch_test(device_handle, AMDGPU_HW_IP_COMPUTE, ring_id); in amdgpu_compute_dispatch_test()
2754 amdgpu_memcpy_dispatch_test(device_handle, AMDGPU_HW_IP_COMPUTE, ring_id, 0); in amdgpu_compute_dispatch_test()
2764 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info); in amdgpu_gfx_dispatch_test()
2770 amdgpu_memset_dispatch_test(device_handle, AMDGPU_HW_IP_GFX, ring_id); in amdgpu_gfx_dispatch_test()
2771 amdgpu_memcpy_dispatch_test(device_handle, AMDGPU_HW_IP_GFX, ring_id, 0); in amdgpu_gfx_dispatch_test()
2775 void amdgpu_dispatch_hang_helper(amdgpu_device_handle device_handle, uint32_t ip_type) in amdgpu_dispatch_hang_helper() argument
2781 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &info); in amdgpu_dispatch_hang_helper()
2787 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, 0); in amdgpu_dispatch_hang_helper()
2788 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, 1); in amdgpu_dispatch_hang_helper()
2789 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, 0); in amdgpu_dispatch_hang_helper()
2793 static void amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle, in amdgpu_memcpy_dispatch_hang_slow_test() argument
2815 r = amdgpu_query_gpu_info(device_handle, &gpu_info); in amdgpu_memcpy_dispatch_hang_slow_test()
2818 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memcpy_dispatch_hang_slow_test()
2821 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memcpy_dispatch_hang_slow_test()
2828 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_dispatch_hang_slow_test()
2838 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memcpy_dispatch_hang_slow_test()
2844 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memcpy_dispatch_hang_slow_test()
2897 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list); in amdgpu_memcpy_dispatch_hang_slow_test()
2944 void amdgpu_dispatch_hang_slow_helper(amdgpu_device_handle device_handle, uint32_t ip_type) in amdgpu_dispatch_hang_slow_helper() argument
2950 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &info); in amdgpu_dispatch_hang_slow_helper()
2956 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, 0); in amdgpu_dispatch_hang_slow_helper()
2957 amdgpu_memcpy_dispatch_hang_slow_test(device_handle, ip_type, ring_id); in amdgpu_dispatch_hang_slow_helper()
2958 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, 0); in amdgpu_dispatch_hang_slow_helper()
3320 void amdgpu_memset_draw(amdgpu_device_handle device_handle, in amdgpu_memset_draw() argument
3342 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memset_draw()
3345 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memset_draw()
3352 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096, in amdgpu_memset_draw()
3385 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list); in amdgpu_memset_draw()
3433 static void amdgpu_memset_draw_test(amdgpu_device_handle device_handle, in amdgpu_memset_draw_test() argument
3444 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memset_draw_test()
3451 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memset_draw_test()
3464 amdgpu_memset_draw(device_handle, bo_shader_ps, bo_shader_vs, in amdgpu_memset_draw_test()
3474 static void amdgpu_memcpy_draw(amdgpu_device_handle device_handle, in amdgpu_memcpy_draw() argument
3498 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memcpy_draw()
3501 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memcpy_draw()
3508 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096, in amdgpu_memcpy_draw()
3514 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096, in amdgpu_memcpy_draw()
3561 r = amdgpu_bo_list_create(device_handle, 5, resources, NULL, &bo_list); in amdgpu_memcpy_draw()
3616 void amdgpu_memcpy_draw_test(amdgpu_device_handle device_handle, uint32_t ring, in amdgpu_memcpy_draw_test() argument
3628 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_draw_test()
3635 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096, in amdgpu_memcpy_draw_test()
3648 amdgpu_memcpy_draw(device_handle, bo_shader_ps, bo_shader_vs, in amdgpu_memcpy_draw_test()
3664 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info); in amdgpu_draw_test()
3670 amdgpu_memset_draw_test(device_handle, ring_id); in amdgpu_draw_test()
3671 amdgpu_memcpy_draw_test(device_handle, ring_id, 0); in amdgpu_draw_test()
3675 void amdgpu_memcpy_draw_hang_slow_test(amdgpu_device_handle device_handle, uint32_t ring) in amdgpu_memcpy_draw_hang_slow_test() argument
3701 r = amdgpu_query_gpu_info(device_handle, &gpu_info); in amdgpu_memcpy_draw_hang_slow_test()
3704 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_memcpy_draw_hang_slow_test()
3707 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096, in amdgpu_memcpy_draw_hang_slow_test()
3714 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_ps_size, 4096, in amdgpu_memcpy_draw_hang_slow_test()
3721 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_vs_size, 4096, in amdgpu_memcpy_draw_hang_slow_test()
3734 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096, in amdgpu_memcpy_draw_hang_slow_test()
3740 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096, in amdgpu_memcpy_draw_hang_slow_test()
3788 r = amdgpu_bo_list_create(device_handle, 5, resources, NULL, &bo_list); in amdgpu_memcpy_draw_hang_slow_test()
3846 r = amdgpu_cs_ctx_create(device_handle, &context_handle); in amdgpu_gpu_reset_test()