Lines Matching refs:engines
497 struct drm_i915_query_engine_info *engines; in engines_invalid() local
522 engines = malloc(len); in engines_invalid()
523 igt_assert(engines); in engines_invalid()
534 memset(engines, 0, len); in engines_invalid()
535 engines->num_engines = 1; in engines_invalid()
539 item.data_ptr = to_user_pointer(engines); in engines_invalid()
543 memset(engines, 0, len); in engines_invalid()
544 engines->rsvd[0] = 1; in engines_invalid()
548 item.data_ptr = to_user_pointer(engines); in engines_invalid()
552 memset(engines, 0, len); in engines_invalid()
553 engines->rsvd[1] = 1; in engines_invalid()
557 item.data_ptr = to_user_pointer(engines); in engines_invalid()
561 memset(engines, 0, len); in engines_invalid()
562 engines->rsvd[2] = 1; in engines_invalid()
566 item.data_ptr = to_user_pointer(engines); in engines_invalid()
570 free(engines); in engines_invalid()
573 engines = mmap(0, 4096, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, in engines_invalid()
575 igt_assert(engines != MAP_FAILED); in engines_invalid()
578 memset(engines, 0, len); in engines_invalid()
579 igt_assert_eq(mprotect(engines, len, PROT_NONE), 0); in engines_invalid()
583 item.data_ptr = to_user_pointer(engines); in engines_invalid()
586 igt_assert_eq(mprotect(engines, len, PROT_WRITE), 0); in engines_invalid()
589 memset(engines, 0, len); in engines_invalid()
590 igt_assert_eq(mprotect(engines, len, PROT_READ), 0); in engines_invalid()
594 item.data_ptr = to_user_pointer(engines); in engines_invalid()
598 munmap(engines, 4096); in engines_invalid()
602 has_engine(struct drm_i915_query_engine_info *engines, in has_engine() argument
607 for (i = 0; i < engines->num_engines; i++) { in has_engine()
609 (struct drm_i915_engine_info *)&engines->engines[i]; in has_engine()
619 static void engines(int fd) in engines() function
621 struct drm_i915_query_engine_info *engines; in engines() local
625 engines = malloc(4096); in engines()
626 igt_assert(engines); in engines()
629 memset(engines, 0, 4096); in engines()
632 item.data_ptr = to_user_pointer(engines); in engines()
639 memset(engines, 0, 4096); in engines()
643 item.data_ptr = to_user_pointer(engines); in engines()
648 memset(engines, 0, 4096); in engines()
652 item.data_ptr = to_user_pointer(engines); in engines()
657 igt_assert(engines->num_engines > 0); in engines()
660 igt_assert_eq(engines->rsvd[0], 0); in engines()
661 igt_assert_eq(engines->rsvd[1], 0); in engines()
662 igt_assert_eq(engines->rsvd[2], 0); in engines()
665 for (i = 0; i < engines->num_engines; i++) { in engines()
667 (struct drm_i915_engine_info *)&engines->engines[i]; in engines()
707 igt_assert(has_engine(engines, I915_ENGINE_CLASS_RENDER, 0)); in engines()
709 igt_assert(has_engine(engines, I915_ENGINE_CLASS_COPY, 0)); in engines()
711 igt_assert(has_engine(engines, I915_ENGINE_CLASS_VIDEO, 0)); in engines()
713 igt_assert(has_engine(engines, I915_ENGINE_CLASS_VIDEO, 1)); in engines()
715 igt_assert(has_engine(engines, I915_ENGINE_CLASS_VIDEO_ENHANCE, in engines()
718 free(engines); in engines()
777 engines(fd);