• Home
  • Raw
  • Download

Lines Matching refs:item

72 	struct drm_i915_query_item item;  in test_query_garbage()  local
91 memset(&item, 0, sizeof(item)); in test_query_garbage()
92 i915_query_items_err(fd, &item, 1, EINVAL); in test_query_garbage()
201 struct drm_i915_query_item item; in test_query_topology_kernel_writes() local
206 memset(&item, 0, sizeof(item)); in test_query_topology_kernel_writes()
207 item.query_id = DRM_I915_QUERY_TOPOLOGY_INFO; in test_query_topology_kernel_writes()
208 i915_query_items(fd, &item, 1); in test_query_topology_kernel_writes()
209 igt_assert_lte(MIN_TOPOLOGY_ITEM_SIZE, item.length); in test_query_topology_kernel_writes()
211 total_size = item.length + 2 * sizeof(*_topo_info); in test_query_topology_kernel_writes()
215 memset(topo_info, 0, item.length); in test_query_topology_kernel_writes()
217 item.data_ptr = to_user_pointer(topo_info); in test_query_topology_kernel_writes()
218 i915_query_items(fd, &item, 1); in test_query_topology_kernel_writes()
222 igt_assert_eq(_topo_info[sizeof(*_topo_info) + item.length + b], 0xff); in test_query_topology_kernel_writes()
228 struct drm_i915_query_item item = { in query_topology_supported() local
232 return __i915_query_items(fd, &item, 1) == 0 && item.length > 0; in query_topology_supported()
237 struct drm_i915_query_item item = { in test_query_topology_unsupported() local
241 i915_query_items(fd, &item, 1); in test_query_topology_unsupported()
242 igt_assert_eq(item.length, -ENODEV); in test_query_topology_unsupported()
277 struct drm_i915_query_item item; in test_query_topology_coherent_slice_mask() local
293 memset(&item, 0, sizeof(item)); in test_query_topology_coherent_slice_mask()
294 item.query_id = DRM_I915_QUERY_TOPOLOGY_INFO; in test_query_topology_coherent_slice_mask()
295 i915_query_items(fd, &item, 1); in test_query_topology_coherent_slice_mask()
297 igt_assert_lte(MIN_TOPOLOGY_ITEM_SIZE, item.length); in test_query_topology_coherent_slice_mask()
298 first_query_length = item.length; in test_query_topology_coherent_slice_mask()
300 topo_info = calloc(1, item.length); in test_query_topology_coherent_slice_mask()
302 item.data_ptr = to_user_pointer(topo_info); in test_query_topology_coherent_slice_mask()
303 i915_query_items(fd, &item, 1); in test_query_topology_coherent_slice_mask()
305 igt_assert_eq(first_query_length, item.length); in test_query_topology_coherent_slice_mask()
307 igt_assert_lte(MIN_TOPOLOGY_ITEM_SIZE, item.length); in test_query_topology_coherent_slice_mask()
345 struct drm_i915_query_item item; in test_query_topology_matches_eu_total() local
355 memset(&item, 0, sizeof(item)); in test_query_topology_matches_eu_total()
356 item.query_id = DRM_I915_QUERY_TOPOLOGY_INFO; in test_query_topology_matches_eu_total()
357 i915_query_items(fd, &item, 1); in test_query_topology_matches_eu_total()
359 topo_info = calloc(1, item.length); in test_query_topology_matches_eu_total()
361 item.data_ptr = to_user_pointer(topo_info); in test_query_topology_matches_eu_total()
362 i915_query_items(fd, &item, 1); in test_query_topology_matches_eu_total()
426 struct drm_i915_query_item item; in test_query_topology_known_pci_ids() local
434 memset(&item, 0, sizeof(item)); in test_query_topology_known_pci_ids()
435 item.query_id = DRM_I915_QUERY_TOPOLOGY_INFO; in test_query_topology_known_pci_ids()
436 i915_query_items(fd, &item, 1); in test_query_topology_known_pci_ids()
438 topo_info = (struct drm_i915_query_topology_info *) calloc(1, item.length); in test_query_topology_known_pci_ids()
440 item.data_ptr = to_user_pointer(topo_info); in test_query_topology_known_pci_ids()
441 i915_query_items(fd, &item, 1); in test_query_topology_known_pci_ids()
488 struct drm_i915_query_item item = { in query_engine_info_supported() local
492 return __i915_query_items(fd, &item, 1) == 0 && item.length > 0; in query_engine_info_supported()
498 struct drm_i915_query_item item; in engines_invalid() local
502 memset(&item, 0, sizeof(item)); in engines_invalid()
503 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
504 item.flags = 1; in engines_invalid()
505 i915_query_items(fd, &item, 1); in engines_invalid()
506 igt_assert_eq(item.length, -EINVAL); in engines_invalid()
509 memset(&item, 0, sizeof(item)); in engines_invalid()
510 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
511 item.length = 1; in engines_invalid()
512 i915_query_items(fd, &item, 1); in engines_invalid()
513 igt_assert_eq(item.length, -EINVAL); in engines_invalid()
516 memset(&item, 0, sizeof(item)); in engines_invalid()
517 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
518 i915_query_items(fd, &item, 1); in engines_invalid()
519 igt_assert(item.length >= 0); in engines_invalid()
520 len = item.length; in engines_invalid()
526 memset(&item, 0, sizeof(item)); in engines_invalid()
527 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
528 item.length = len; in engines_invalid()
529 i915_query_items(fd, &item, 1); in engines_invalid()
530 igt_assert_eq(item.length, -EFAULT); in engines_invalid()
536 memset(&item, 0, sizeof(item)); in engines_invalid()
537 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
538 item.length = len; in engines_invalid()
539 item.data_ptr = to_user_pointer(engines); in engines_invalid()
540 i915_query_items(fd, &item, 1); in engines_invalid()
541 igt_assert_eq(item.length, -EINVAL); in engines_invalid()
545 memset(&item, 0, sizeof(item)); in engines_invalid()
546 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
547 item.length = len; in engines_invalid()
548 item.data_ptr = to_user_pointer(engines); in engines_invalid()
549 i915_query_items(fd, &item, 1); in engines_invalid()
550 igt_assert_eq(item.length, -EINVAL); in engines_invalid()
554 memset(&item, 0, sizeof(item)); in engines_invalid()
555 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
556 item.length = len; in engines_invalid()
557 item.data_ptr = to_user_pointer(engines); in engines_invalid()
558 i915_query_items(fd, &item, 1); in engines_invalid()
559 igt_assert_eq(item.length, -EINVAL); in engines_invalid()
563 memset(&item, 0, sizeof(item)); in engines_invalid()
564 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
565 item.length = len; in engines_invalid()
566 item.data_ptr = to_user_pointer(engines); in engines_invalid()
567 i915_query_items(fd, &item, 1); in engines_invalid()
568 igt_assert_eq(item.length, -EINVAL); in engines_invalid()
580 memset(&item, 0, sizeof(item)); in engines_invalid()
581 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
582 item.length = len; in engines_invalid()
583 item.data_ptr = to_user_pointer(engines); in engines_invalid()
584 i915_query_items(fd, &item, 1); in engines_invalid()
585 igt_assert_eq(item.length, -EFAULT); in engines_invalid()
591 memset(&item, 0, sizeof(item)); in engines_invalid()
592 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines_invalid()
593 item.length = len; in engines_invalid()
594 item.data_ptr = to_user_pointer(engines); in engines_invalid()
595 i915_query_items(fd, &item, 1); in engines_invalid()
596 igt_assert_eq(item.length, -EFAULT); in engines_invalid()
622 struct drm_i915_query_item item; in engines() local
630 memset(&item, 0, sizeof(item)); in engines()
631 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines()
632 item.data_ptr = to_user_pointer(engines); in engines()
633 i915_query_items(fd, &item, 1); in engines()
634 igt_assert(item.length >= 0); in engines()
635 igt_assert(item.length <= 4096); in engines()
636 len = item.length; in engines()
640 memset(&item, 0, sizeof(item)); in engines()
641 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines()
642 item.length = 4096; in engines()
643 item.data_ptr = to_user_pointer(engines); in engines()
644 i915_query_items(fd, &item, 1); in engines()
645 igt_assert_eq(item.length, len); in engines()
649 memset(&item, 0, sizeof(item)); in engines()
650 item.query_id = DRM_I915_QUERY_ENGINE_INFO; in engines()
651 item.length = len; in engines()
652 item.data_ptr = to_user_pointer(engines); in engines()
653 i915_query_items(fd, &item, 1); in engines()
654 igt_assert_eq(item.length, len); in engines()