Lines Matching refs:device_handle

45 static  amdgpu_device_handle device_handle;
762 &minor_version, &device_handle))
766 family_id = device_handle->info.family_id;
767 chip_id = device_handle->info.chip_external_rev;
768 chip_rev = device_handle->info.chip_rev;
770 if (amdgpu_device_deinitialize(device_handle))
803 &minor_version, &device_handle);
813 r = amdgpu_query_gpu_info(device_handle, &gpu_info);
824 int r = amdgpu_device_deinitialize(device_handle);
838 r = amdgpu_query_gpu_info(device_handle, &gpu_info);
841 r = amdgpu_query_firmware_version(device_handle, AMDGPU_INFO_FW_VCE, 0,
861 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
864 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
870 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
876 r = amdgpu_get_bo_list(device_handle, ib_result_handle,
952 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
955 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
961 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL,
1057 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
1064 r = amdgpu_query_heap_info(device_handle, AMDGPU_GEM_DOMAIN_VRAM,
1068 r = amdgpu_bo_alloc_wrap(device_handle, vram_info.max_allocation, 4096,
1071 r = amdgpu_bo_alloc_wrap(device_handle, vram_info.max_allocation, 4096,
1075 r = amdgpu_query_heap_info(device_handle, AMDGPU_GEM_DOMAIN_GTT,
1079 r = amdgpu_bo_alloc_wrap(device_handle, gtt_info.max_allocation, 4096,
1082 r = amdgpu_bo_alloc_wrap(device_handle, gtt_info.max_allocation, 4096,
1093 r = amdgpu_bo_alloc_and_map(device_handle,
1105 r = amdgpu_bo_alloc_and_map(device_handle,
1214 r = amdgpu_query_gpu_info(device_handle, &gpu_info);
1231 r = amdgpu_cs_ctx_create(device_handle, &context_handle[i]);
1234 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
1240 r = amdgpu_get_bo_list(device_handle, ib_result_handle[i],
1359 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_COMPUTE, 0, &info);
1362 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
1366 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
1372 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL,
1452 amdgpu_test_exec_cs_helper_raw(amdgpu_device_handle device_handle,
1479 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
1503 r = amdgpu_bo_list_create(device_handle, res_cnt+1, all_res,
1542 amdgpu_test_exec_cs_helper_raw(device_handle, context_handle,
1750 amdgpu_command_submission_write_linear_helper_with_secure(device_handle,
1786 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info);
1789 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
1800 r = amdgpu_bo_alloc_and_map(device_handle,
1919 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &hw_ip_info);
1922 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
1935 r = amdgpu_bo_alloc_and_map(device_handle,
1947 r = amdgpu_bo_alloc_and_map(device_handle,
2074 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
2077 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
2083 r = amdgpu_bo_alloc_and_map(device_handle, 4096, 4096,
2089 r = amdgpu_get_bo_list(device_handle, ib_result_handle,
2182 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
2189 r = amdgpu_create_bo_from_user_mem(device_handle,
2193 r = amdgpu_va_range_alloc(device_handle,
2270 r = amdgpu_cs_ctx_create(device_handle, &context_handle[0]);
2272 r = amdgpu_cs_ctx_create(device_handle, &context_handle[1]);
2275 r = amdgpu_bo_alloc_and_map(device_handle, 8192, 4096,
2281 r = amdgpu_get_bo_list(device_handle, ib_result_handle, NULL,
2635 static void amdgpu_memset_dispatch_test(amdgpu_device_handle device_handle,
2657 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
2660 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096,
2667 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
2677 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096,
2730 r = amdgpu_bo_list_create(device_handle, 3, resources, NULL, &bo_list);
2781 static void amdgpu_memcpy_dispatch_test(amdgpu_device_handle device_handle,
2806 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
2809 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096,
2816 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
2827 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096,
2833 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096,
2892 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list);
2957 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_COMPUTE, 0, &info);
2969 amdgpu_memset_dispatch_test(device_handle, AMDGPU_HW_IP_COMPUTE, ring_id, version);
2970 amdgpu_memcpy_dispatch_test(device_handle, AMDGPU_HW_IP_COMPUTE, ring_id, version, 0);
2980 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info);
2992 amdgpu_memset_dispatch_test(device_handle, AMDGPU_HW_IP_GFX, ring_id, version);
2993 amdgpu_memcpy_dispatch_test(device_handle, AMDGPU_HW_IP_GFX, ring_id, version, 0);
2997 void amdgpu_dispatch_hang_helper(amdgpu_device_handle device_handle, uint32_t ip_type)
3003 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &info);
3015 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, version, 0);
3016 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, version, 1);
3017 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, version, 0);
3021 static void amdgpu_memcpy_dispatch_hang_slow_test(amdgpu_device_handle device_handle,
3043 r = amdgpu_query_gpu_info(device_handle, &gpu_info);
3046 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
3049 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096,
3056 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
3066 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096,
3072 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096,
3131 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list);
3178 void amdgpu_dispatch_hang_slow_helper(amdgpu_device_handle device_handle, uint32_t ip_type)
3184 r = amdgpu_query_hw_ip_info(device_handle, ip_type, 0, &info);
3196 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, version, 0);
3197 amdgpu_memcpy_dispatch_hang_slow_test(device_handle, ip_type, ring_id, version);
3198 amdgpu_memcpy_dispatch_test(device_handle, ip_type, ring_id, version, 0);
3719 void amdgpu_memset_draw(amdgpu_device_handle device_handle,
3741 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
3744 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096,
3751 r = amdgpu_bo_alloc_and_map(device_handle, bo_dst_size, 4096,
3785 r = amdgpu_bo_list_create(device_handle, 4, resources, NULL, &bo_list);
3833 static void amdgpu_memset_draw_test(amdgpu_device_handle device_handle,
3844 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
3851 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
3864 amdgpu_memset_draw(device_handle, bo_shader_ps, bo_shader_vs,
3875 static void amdgpu_memcpy_draw(amdgpu_device_handle device_handle,
3899 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
3902 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096,
3909 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096,
3915 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096,
3974 r = amdgpu_bo_list_create(device_handle, 5, resources, NULL, &bo_list);
4029 void amdgpu_memcpy_draw_test(amdgpu_device_handle device_handle, uint32_t ring,
4041 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
4048 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_size, 4096,
4061 amdgpu_memcpy_draw(device_handle, bo_shader_ps, bo_shader_vs,
4078 r = amdgpu_query_hw_ip_info(device_handle, AMDGPU_HW_IP_GFX, 0, &info);
4090 amdgpu_memset_draw_test(device_handle, ring_id, version);
4091 amdgpu_memcpy_draw_test(device_handle, ring_id, version, 0);
4095 void amdgpu_memcpy_draw_hang_slow_test(amdgpu_device_handle device_handle, uint32_t ring, int version)
4121 r = amdgpu_query_gpu_info(device_handle, &gpu_info);
4124 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
4127 r = amdgpu_bo_alloc_and_map(device_handle, bo_cmd_size, 4096,
4134 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_ps_size, 4096,
4141 r = amdgpu_bo_alloc_and_map(device_handle, bo_shader_vs_size, 4096,
4154 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096,
4160 r = amdgpu_bo_alloc_and_map(device_handle, bo_size, 4096,
4218 r = amdgpu_bo_list_create(device_handle, 5, resources, NULL, &bo_list);
4276 r = amdgpu_cs_ctx_create(device_handle, &context_handle);
4307 r = amdgpu_cs_ctx_create(device_handle, &context_handle);