• Home
  • Raw
  • Download

Lines Matching +full:cairo +full:- +full:tests

29 #include <cairo.h>
146 return tv->tv_sec + tv->tv_usec / 1000000.0f; in timeval_float()
160 es->name, in dump_event_state()
161 timeval_float(&es->last_ts), in dump_event_state()
162 timeval_float(&es->last_received_ts), in dump_event_state()
163 es->last_seq, in dump_event_state()
164 timeval_float(&es->current_ts), in dump_event_state()
165 timeval_float(&es->current_received_ts), in dump_event_state()
166 es->current_seq, in dump_event_state()
167 es->count, in dump_event_state()
168 es->seq_step); in dump_event_state()
212 struct igt_fb *fb_info = &o->fb_info[o->current_fb_id]; in emit_fence_stress()
223 for (i = 0; i < num_fences - 1; i++) { in emit_fence_stress()
229 exec[i].handle = bo[i]->handle; in emit_fence_stress()
232 exec[i].handle = fb_info->gem_handle; in emit_fence_stress()
247 for (i = 0; i < num_fences - 1; i++) in emit_fence_stress()
259 for (i = 0; i < resources->count_connectors; i++) { in dpms_off_other_outputs()
260 connector_id = resources->connectors[i]; in dpms_off_other_outputs()
262 for (n = 0; n < o->count; n++) { in dpms_off_other_outputs()
263 if (connector_id == o->kconnector[n]->connector_id) in dpms_off_other_outputs()
280 for (int n = 0; n < o->count; n++) in set_dpms()
281 kmstest_set_connector_dpms(drm_fd, o->kconnector[n], mode); in set_dpms()
300 o->flip_count = 0; in do_page_flip()
302 for (n = 0; ret == 0 && n < o->count; n++) in do_page_flip()
303 ret = drmModePageFlip(drm_fd, o->_crtc[n], fb_id, in do_page_flip()
308 set_flag(&o->pending_events, EVENT_FLIP); in do_page_flip()
344 reply->ts.tv_sec = wait_vbl.reply.tval_sec; in __wait_for_vblank()
345 reply->ts.tv_usec = wait_vbl.reply.tval_usec; in __wait_for_vblank()
346 reply->sequence = wait_vbl.reply.sequence; in __wait_for_vblank()
348 ret = -errno; in __wait_for_vblank()
357 unsigned flags = o->flags; in do_wait_for_vblank()
360 if (!(o->vblank_state.count > 0)) in do_wait_for_vblank()
365 if (ret == 0 && !(o->flags & TEST_VBLANK_BLOCK)) in do_wait_for_vblank()
366 set_flag(&o->pending_events, EVENT_VBLANK); in do_wait_for_vblank()
374 uint32_t connector_type = o->kconnector[0]->connector_type; in analog_tv_connector()
396 es->current_received_ts = now; in event_handler()
398 es->current_ts.tv_sec = sec; in event_handler()
399 es->current_ts.tv_usec = usec; in event_handler()
400 es->current_seq = frame; in event_handler()
409 if (++o->flip_count == o->count) in page_flip_handler()
410 clear_flag(&o->pending_events, EVENT_FLIP); in page_flip_handler()
412 event_handler(&o->flip_state, frame, sec, usec); in page_flip_handler()
417 return 1000.0 * o->kmode[0].htotal * o->kmode[0].vtotal / o->kmode[0].clock; in mode_frame_time()
422 igt_assert(o->flags & TEST_CHECK_TS); in actual_frame_time()
423 return o->vblank_interval; in actual_frame_time()
434 __wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 20, (unsigned long)o, &reply); in vblank_wait_thread_func()
435 if (gettime_us() - start > 2 * mode_frame_time(o)) in vblank_wait_thread_func()
458 * wait-for-vblank event the kernel will return a wf-vblank event with in fixup_premature_vblank_ts()
459 * a zeroed-out timestamp. In order that check_state() doesn't in fixup_premature_vblank_ts()
465 if (!(o->flags & (TEST_DPMS | TEST_MODESET))) in fixup_premature_vblank_ts()
468 if (o->vblank_state.current_ts.tv_sec != 0 || in fixup_premature_vblank_ts()
469 o->vblank_state.current_ts.tv_usec != 0) in fixup_premature_vblank_ts()
474 timersub(&es->current_received_ts, &tv, &es->current_ts); in fixup_premature_vblank_ts()
482 clear_flag(&o->pending_events, EVENT_VBLANK); in vblank_handler()
483 event_handler(&o->vblank_state, frame, sec, usec); in vblank_handler()
484 fixup_premature_vblank_ts(o, &o->vblank_state); in vblank_handler()
493 timersub(&es->current_ts, &es->current_received_ts, &diff); in check_state()
497 es->name, timeval_float(&diff)); in check_state()
500 if (es->count == 0) in check_state()
503 timersub(&es->current_ts, &es->last_received_ts, &diff); in check_state()
504 igt_assert_f(timercmp(&es->last_received_ts, &es->current_ts, <), in check_state()
507 es->name, es->name, timeval_float(&diff)); in check_state()
512 if (!(o->flags & (TEST_DPMS | TEST_MODESET | TEST_NO_VBLANK))) in check_state()
513 igt_assert_f(es->current_seq - (es->last_seq + o->seq_step) <= 1UL << 23, in check_state()
515 es->name, es->current_seq, es->last_seq + o->seq_step); in check_state()
517 if (o->flags & TEST_CHECK_TS) { in check_state()
520 timersub(&es->current_ts, &es->last_ts, &diff); in check_state()
522 expected = (es->current_seq - es->last_seq) * actual_frame_time(o); in check_state()
524 …igt_debug("%s ts/seq: last %.06f/%u, current %.06f/%u: elapsed=%.1fus expected=%.1fus +- %.1fus, e… in check_state()
525 es->name, timeval_float(&es->last_ts), es->last_seq, in check_state()
526 timeval_float(&es->current_ts), es->current_seq, in check_state()
528 fabs((elapsed - expected) / expected) * 100); in check_state()
530 igt_assert_f(fabs((elapsed - expected) / expected) <= 0.005, in check_state()
532 es->name, timeval_float(&es->last_ts), es->last_seq, in check_state()
533 timeval_float(&es->current_ts), es->current_seq, in check_state()
536 igt_assert_f(es->current_seq == es->last_seq + o->seq_step, in check_state()
538 es->name, es->current_seq, in check_state()
539 es->last_seq + o->seq_step); in check_state()
552 if (es1->count == 0 || es2->count == 0) in check_state_correlation()
555 timersub(&es2->current_ts, &es1->current_ts, &tv_diff); in check_state_correlation()
558 seq_diff = es2->current_seq - es1->current_seq; in check_state_correlation()
560 usec_diff -= seq_diff * ftime; in check_state_correlation()
564 es1->name, es2->name, usec_diff / USEC_PER_SEC); in check_state_correlation()
576 check_state(o, &o->flip_state); in check_all_state()
578 check_state(o, &o->vblank_state); in check_all_state()
582 check_state_correlation(o, &o->flip_state, &o->vblank_state); in check_all_state()
588 struct igt_fb *fb_info = &o->fb_info[o->current_fb_id]; in recreate_fb()
592 r = drmModeGetFB(drm_fd, fb_info->fb_id); in recreate_fb()
595 do_or_die(drmModeAddFB(drm_fd, o->fb_width, o->fb_height, o->depth, in recreate_fb()
596 o->bpp, fb_info->strides[0], in recreate_fb()
597 r->handle, &new_fb_id)); in recreate_fb()
599 gem_close(drm_fd, r->handle); in recreate_fb()
601 do_or_die(drmModeRmFB(drm_fd, fb_info->fb_id)); in recreate_fb()
603 o->fb_ids[o->current_fb_id] = new_fb_id; in recreate_fb()
604 o->fb_info[o->current_fb_id].fb_id = new_fb_id; in recreate_fb()
636 for (n = o->count - 1; n >= 0; n--) { in set_mode()
638 uint32_t *conn = &o->_connector[n]; in set_mode()
640 drmModeModeInfoPtr mode = &o->kmode[n]; in set_mode()
647 ret = drmModeSetCrtc(drm_fd, o->_crtc[n], in set_mode()
661 /* for funny reasons page_flip returns -EBUSY on disabled crtcs ... */ in run_test_step()
662 int expected_einval = o->flags & TEST_MODESET ? -EBUSY : -EINVAL; in run_test_step()
670 target_seq = o->vblank_state.seq_step; in run_test_step()
672 if (o->flags & TEST_VBLANK_ABSOLUTE && o->vblank_state.count > 0) in run_test_step()
673 target_seq += o->vblank_state.last_seq; in run_test_step()
677 * wf-vblank and flip were scheduled and the wf-vblank event was in run_test_step()
680 do_flip = (o->flags & TEST_FLIP) && !(o->pending_events & EVENT_FLIP); in run_test_step()
681 do_vblank = (o->flags & TEST_VBLANK) && in run_test_step()
682 !(o->pending_events & EVENT_VBLANK); in run_test_step()
684 if (o->flags & TEST_DPMS_OFF_OTHERS) in run_test_step()
687 if (!(o->flags & TEST_SINGLE_BUFFER)) in run_test_step()
688 o->current_fb_id = !o->current_fb_id; in run_test_step()
690 if (o->flags & TEST_FB_RECREATE) in run_test_step()
692 new_fb_id = o->fb_ids[o->current_fb_id]; in run_test_step()
694 if ((o->flags & TEST_VBLANK_EXPIRED_SEQ) && in run_test_step()
695 !(o->pending_events & EVENT_VBLANK) && o->flip_state.count > 0) { in run_test_step()
700 exp_seq = o->flip_state.current_seq; in run_test_step()
703 TEST_VBLANK_BLOCK, o->pipe, exp_seq, in run_test_step()
706 igt_debug("Vblank took %luus\n", end - start); in run_test_step()
707 igt_assert(end - start < 500); in run_test_step()
709 igt_assert(timercmp(&reply.ts, &o->flip_state.last_ts, ==)); in run_test_step()
712 if (o->flags & TEST_ENOENT) { in run_test_step()
714 igt_assert_eq(do_page_flip(o, 0xfffffff0, false), -ENOENT); in run_test_step()
715 igt_assert_eq(set_mode(o, 0xfffffff0, 0, 0), -ENOENT); in run_test_step()
718 if (do_flip && (o->flags & TEST_EINVAL) && o->flip_state.count > 0) in run_test_step()
721 if (do_vblank && (o->flags & TEST_EINVAL) && o->vblank_state.count > 0) in run_test_step()
722 igt_assert_eq(do_wait_for_vblank(o, o->pipe, target_seq, &vbl_reply), -EINVAL); in run_test_step()
724 if (o->flags & TEST_VBLANK_RACE) { in run_test_step()
727 if (o->flags & TEST_MODESET) in run_test_step()
733 if (o->flags & TEST_DPMS_OFF) in run_test_step()
736 if (o->flags & TEST_MODESET) in run_test_step()
737 igt_assert(set_mode(o, o->fb_ids[o->current_fb_id], 0, 0) == 0); in run_test_step()
739 if (o->flags & TEST_DPMS) in run_test_step()
742 if (o->flags & TEST_VBLANK_RACE) { in run_test_step()
748 igt_assert(__wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 2, 0, &reply) == 0); in run_test_step()
752 * we were blocked for ~1-2 frames. in run_test_step()
754 igt_assert_f(end - start > 0.9 * mode_frame_time(o) && in run_test_step()
755 end - start < 2.1 * mode_frame_time(o), in run_test_step()
757 end - start, mode_frame_time(o)); in run_test_step()
764 if (do_flip && (o->flags & TEST_HANG)) in run_test_step()
768 if (do_flip && (o->flags & TEST_EBUSY)) { in run_test_step()
770 igt_assert(__wait_for_vblank(TEST_VBLANK_BLOCK, o->pipe, 1, 0, &reply) == 0); in run_test_step()
774 do_or_die(do_page_flip(o, new_fb_id, !(o->flags & TEST_NOEVENT))); in run_test_step()
776 if (o->flags & TEST_FENCE_STRESS) in run_test_step()
780 do_or_die(do_wait_for_vblank(o, o->pipe, target_seq, in run_test_step()
782 if (o->flags & TEST_VBLANK_BLOCK) { in run_test_step()
783 event_handler(&o->vblank_state, vbl_reply.sequence, in run_test_step()
790 if (do_flip && (o->flags & TEST_EBUSY)) in run_test_step()
791 igt_assert_eq(do_page_flip(o, new_fb_id, false), -EBUSY); in run_test_step()
793 if (do_flip && (o->flags & TEST_RMFB)) in run_test_step()
797 if (o->flags & TEST_PAN) { in run_test_step()
799 o->flip_state.count : o->vblank_state.count; in run_test_step()
800 int width = o->fb_width - o->kmode[0].hdisplay; in run_test_step()
803 x_ofs = 2 * width - x_ofs; in run_test_step()
806 if (o->flags & TEST_HANG) in run_test_step()
807 o->current_fb_id = !o->current_fb_id; in run_test_step()
809 igt_assert_f(set_mode(o, o->fb_ids[o->current_fb_id], x_ofs, 0) == 0, in run_test_step()
811 o->kmode[0].hdisplay, o->kmode[0].vdisplay, o->kmode[0].vrefresh, in run_test_step()
815 if (o->flags & TEST_DPMS) in run_test_step()
818 if (o->flags & TEST_MODESET && !(o->flags & TEST_RMFB) && !(o->flags & TEST_VBLANK_RACE)) in run_test_step()
823 if (o->flags & TEST_SUSPEND) in run_test_step()
827 if (do_vblank && (o->flags & TEST_EINVAL) && o->vblank_state.count > 0) in run_test_step()
828 igt_assert(do_wait_for_vblank(o, o->pipe, target_seq, &vbl_reply) in run_test_step()
829 == -EINVAL); in run_test_step()
831 if (do_flip && (o->flags & TEST_EINVAL)) in run_test_step()
841 es->last_received_ts = es->current_received_ts; in update_state()
842 es->last_ts = es->current_ts; in update_state()
843 es->last_seq = es->current_seq; in update_state()
844 es->count++; in update_state()
851 update_state(&o->flip_state); in update_all_state()
854 update_state(&o->vblank_state); in update_all_state()
864 o->mode_valid = 0; in connector_find_preferred_mode()
868 o->pipe = config.pipe; in connector_find_preferred_mode()
869 o->kconnector[0] = config.connector; in connector_find_preferred_mode()
870 o->kencoder[0] = config.encoder; in connector_find_preferred_mode()
871 o->_crtc[0] = config.crtc->crtc_id; in connector_find_preferred_mode()
872 o->_pipe[0] = config.pipe; in connector_find_preferred_mode()
873 o->kmode[0] = config.default_mode; in connector_find_preferred_mode()
874 o->mode_valid = 1; in connector_find_preferred_mode()
876 o->fb_width = o->kmode[0].hdisplay; in connector_find_preferred_mode()
877 o->fb_height = o->kmode[0].vdisplay; in connector_find_preferred_mode()
886 if (a->hdisplay != b->hdisplay) in mode_compatible()
889 if (a->vdisplay != b->vdisplay) in mode_compatible()
892 d_refresh = a->vrefresh - b->vrefresh; in mode_compatible()
893 if (d_refresh < -1 || d_refresh > 1) in mode_compatible()
906 if (!kmstest_get_connector_config(drm_fd, o->_connector[0], in connector_find_compatible_mode()
910 if (!kmstest_get_connector_config(drm_fd, o->_connector[1], in connector_find_compatible_mode()
919 for (n = 0; n < config[0].connector->count_modes; n++) { in connector_find_compatible_mode()
920 mode[0] = &config[0].connector->modes[n]; in connector_find_compatible_mode()
921 for (m = 0; m < config[1].connector->count_modes; m++) { in connector_find_compatible_mode()
922 mode[1] = &config[1].connector->modes[m]; in connector_find_compatible_mode()
933 o->pipe = config[0].pipe; in connector_find_compatible_mode()
934 o->fb_width = mode[0]->hdisplay; in connector_find_compatible_mode()
935 o->fb_height = mode[0]->vdisplay; in connector_find_compatible_mode()
936 o->mode_valid = 1; in connector_find_compatible_mode()
938 o->kconnector[0] = config[0].connector; in connector_find_compatible_mode()
939 o->kencoder[0] = config[0].encoder; in connector_find_compatible_mode()
940 o->_crtc[0] = config[0].crtc->crtc_id; in connector_find_compatible_mode()
941 o->_pipe[0] = config[0].pipe; in connector_find_compatible_mode()
942 o->kmode[0] = *mode[0]; in connector_find_compatible_mode()
944 o->kconnector[1] = config[1].connector; in connector_find_compatible_mode()
945 o->kencoder[1] = config[1].encoder; in connector_find_compatible_mode()
946 o->_crtc[1] = config[1].crtc->crtc_id; in connector_find_compatible_mode()
947 o->_pipe[1] = config[1].pipe; in connector_find_compatible_mode()
948 o->kmode[1] = *mode[1]; in connector_find_compatible_mode()
956 /* TODO (b/145293089) resolve Cairo/Pixman dependencies */ in paint_flip_mode()
959 int width = fb->width; in paint_flip_mode()
960 int height = fb->height; in paint_flip_mode()
980 for (n = 0; n < o->count; n++) { in fb_is_bound()
982 .crtc_id = o->_crtc[n] in fb_is_bound()
999 igt_assert_f(es->count > 0, in check_final_state()
1000 "no %s event received\n", es->name); in check_final_state()
1004 if (o->flags & TEST_CHECK_TS) { in check_final_state()
1005 int count = es->count * o->seq_step; in check_final_state()
1006 unsigned int min = actual_frame_time(o) * (count - 1); in check_final_state()
1011 o->kencoder[0]->encoder_type); in check_final_state()
1015 o->kencoder[0]->encoder_type); in check_final_state()
1031 event_mask = o->pending_events; in wait_for_events()
1054 } while (o->pending_events); in wait_for_events()
1056 event_mask ^= o->pending_events; in wait_for_events()
1074 if (o->pending_events) in event_loop()
1079 if (count && (gettime_us() - start) / 1000 >= duration_ms) in event_loop()
1088 if (o->pending_events) in event_loop()
1091 return end - start; in event_loop()
1098 for (i = 0; i < o->count; i++) { in free_test_output()
1099 drmModeFreeEncoder(o->kencoder[i]); in free_test_output()
1100 drmModeFreeConnector(o->kconnector[i]); in free_test_output()
1152 * In case of the interruptible tests, this poll may in calibrate_ts()
1153 * be interrupted with -EINTR, handle this by restarting in calibrate_ts()
1156 poll_ret = poll(&(struct pollfd){drm_fd, POLLIN}, 1, -1); in calibrate_ts()
1171 igt_stats_push(&stats, now - last_timestamp); in calibrate_ts()
1182 igt_info("Expected frametime: %.0fus; measured %.1fus +- %.3fus accuracy %.2f%%\n", in calibrate_ts()
1189 if (fabs(mean - expected) > 2*stddev) { in calibrate_ts()
1190 …igt_info("vblank interval differs from modeline! expected %.1fus, measured %1.fus +- %.3fus, diffe… in calibrate_ts()
1192 fabs(mean - expected), fabs(mean - expected) / stddev); in calibrate_ts()
1195 o->vblank_interval = mean; in calibrate_ts()
1210 connector_find_preferred_mode(o->_connector[0], crtc_idxs[0], o); in run_test_on_crtc_set()
1211 if (!o->mode_valid) in run_test_on_crtc_set()
1214 "%s on pipe %s, connector %s-%d", in run_test_on_crtc_set()
1216 kmstest_pipe_name(o->_pipe[0]), in run_test_on_crtc_set()
1217 kmstest_connector_type_str(o->kconnector[0]->connector_type), in run_test_on_crtc_set()
1218 o->kconnector[0]->connector_type_id); in run_test_on_crtc_set()
1222 if (!o->mode_valid) in run_test_on_crtc_set()
1225 "%s on pipe %s:%s, connector %s-%d:%s-%d", in run_test_on_crtc_set()
1227 kmstest_pipe_name(o->_pipe[0]), in run_test_on_crtc_set()
1228 kmstest_pipe_name(o->_pipe[1]), in run_test_on_crtc_set()
1229 kmstest_connector_type_str(o->kconnector[0]->connector_type), in run_test_on_crtc_set()
1230 o->kconnector[0]->connector_type_id, in run_test_on_crtc_set()
1231 kmstest_connector_type_str(o->kconnector[1]->connector_type), in run_test_on_crtc_set()
1232 o->kconnector[1]->connector_type_id); in run_test_on_crtc_set()
1238 igt_assert_eq(o->count, crtc_count); in run_test_on_crtc_set()
1240 last_connector = o->kconnector[0]; in run_test_on_crtc_set()
1244 if (o->flags & TEST_PAN) in run_test_on_crtc_set()
1245 o->fb_width *= 2; in run_test_on_crtc_set()
1248 if (o->flags & TEST_FENCE_STRESS) in run_test_on_crtc_set()
1253 if (o->flags & TEST_BO_TOOBIG) { in run_test_on_crtc_set()
1258 o->fb_ids[0] = igt_create_fb(drm_fd, o->fb_width, o->fb_height, in run_test_on_crtc_set()
1259 igt_bpp_depth_to_drm_format(o->bpp, o->depth), in run_test_on_crtc_set()
1260 tiling, &o->fb_info[0]); in run_test_on_crtc_set()
1261 o->fb_ids[1] = igt_create_fb_with_bo_size(drm_fd, o->fb_width, o->fb_height, in run_test_on_crtc_set()
1262 igt_bpp_depth_to_drm_format(o->bpp, o->depth), in run_test_on_crtc_set()
1265 &o->fb_info[1], bo_size, 0); in run_test_on_crtc_set()
1267 igt_assert(o->fb_ids[0]); in run_test_on_crtc_set()
1268 igt_assert(o->fb_ids[1]); in run_test_on_crtc_set()
1270 paint_flip_mode(&o->fb_info[0], false); in run_test_on_crtc_set()
1271 if (!(o->flags & TEST_BO_TOOBIG)) in run_test_on_crtc_set()
1272 paint_flip_mode(&o->fb_info[1], true); in run_test_on_crtc_set()
1273 if (o->fb_ids[2]) in run_test_on_crtc_set()
1274 paint_flip_mode(&o->fb_info[2], true); in run_test_on_crtc_set()
1276 for (i = 0; i < o->count; i++) in run_test_on_crtc_set()
1277 kmstest_dump_mode(&o->kmode[i]); in run_test_on_crtc_set()
1281 if (set_mode(o, o->fb_ids[0], 0, 0)) { in run_test_on_crtc_set()
1286 "set_mode may only fail on the 3rd pipe or in multiple crtc tests\n"); in run_test_on_crtc_set()
1290 igt_assert(fb_is_bound(o, o->fb_ids[0])); in run_test_on_crtc_set()
1294 if (vblank_dependence(o->flags)) in run_test_on_crtc_set()
1297 o->flags |= TEST_NO_VBLANK; in run_test_on_crtc_set()
1301 if (o->flags & TEST_CHECK_TS) in run_test_on_crtc_set()
1304 if (o->flags & TEST_BO_TOOBIG) { in run_test_on_crtc_set()
1305 int err = do_page_flip(o, o->fb_ids[1], true); in run_test_on_crtc_set()
1306 igt_assert(err == 0 || err == -E2BIG); in run_test_on_crtc_set()
1310 igt_assert_eq(do_page_flip(o, o->fb_ids[1], true), 0); in run_test_on_crtc_set()
1314 o->current_fb_id = 1; in run_test_on_crtc_set()
1316 if (o->flags & TEST_FLIP) in run_test_on_crtc_set()
1317 o->flip_state.seq_step = 1; in run_test_on_crtc_set()
1319 o->flip_state.seq_step = 0; in run_test_on_crtc_set()
1320 if (o->flags & TEST_VBLANK) in run_test_on_crtc_set()
1321 o->vblank_state.seq_step = 10; in run_test_on_crtc_set()
1323 o->vblank_state.seq_step = 0; in run_test_on_crtc_set()
1326 o->seq_step = max(o->vblank_state.seq_step, o->flip_state.seq_step); in run_test_on_crtc_set()
1330 if (o->flags & TEST_FLIP && !(o->flags & TEST_NOEVENT)) in run_test_on_crtc_set()
1331 check_final_state(o, &o->flip_state, elapsed); in run_test_on_crtc_set()
1332 if (o->flags & TEST_VBLANK) in run_test_on_crtc_set()
1333 check_final_state(o, &o->vblank_state, elapsed); in run_test_on_crtc_set()
1338 igt_remove_fb(drm_fd, &o->fb_info[2]); in run_test_on_crtc_set()
1339 igt_remove_fb(drm_fd, &o->fb_info[1]); in run_test_on_crtc_set()
1340 igt_remove_fb(drm_fd, &o->fb_info[0]); in run_test_on_crtc_set()
1358 for (i = 0; i < resources->count_connectors; i++) { in run_test()
1359 for (n = 0; n < resources->count_crtcs; n++) { in run_test()
1362 o._connector[0] = resources->connectors[i]; in run_test()
1382 for (i = 0; i < resources->count_connectors; i++) { in run_test()
1383 for (n = 0; n < resources->count_crtcs; n++) { in run_test()
1388 o._connector[0] = resources->connectors[i]; in run_test()
1415 for (i = 0; i < resources->count_connectors; i++) { in run_pair()
1416 for (n = 0; n < resources->count_crtcs; n++) { in run_pair()
1417 for (j = i + 1; j < resources->count_connectors; j++) { in run_pair()
1418 for (m = n + 1; m < resources->count_crtcs; m++) { in run_pair()
1421 o._connector[0] = resources->connectors[i]; in run_pair()
1422 o._connector[1] = resources->connectors[j]; in run_pair()
1446 for (i = 0; i < resources->count_connectors; i++) { in run_pair()
1447 for (n = 0; n < resources->count_crtcs; n++) { in run_pair()
1448 for (j = i + 1; j < resources->count_connectors; j++) { in run_pair()
1449 for (m = n + 1; m < resources->count_crtcs; m++) { in run_pair()
1454 o._connector[0] = resources->connectors[i]; in run_pair()
1455 o._connector[1] = resources->connectors[j]; in run_pair()
1503 ret = -1; in test_nonblocking_read()
1504 if (fd != -1) in test_nonblocking_read()
1506 if (ret != -1) { in test_nonblocking_read()
1510 igt_require(ret != -1); in test_nonblocking_read()
1516 igt_assert_eq(ret, -1); in test_nonblocking_read()
1528 } tests[] = { variable
1529 { 30, TEST_VBLANK | TEST_CHECK_TS, "wf_vblank-ts-check" },
1531 "blocking-wf_vblank" },
1533 "absolute-wf_vblank" },
1535 "blocking-absolute-wf_vblank" },
1536 { 10, TEST_FLIP | TEST_BASIC, "plain-flip" },
1537 { 1, TEST_FLIP | TEST_EBUSY, "busy-flip" },
1538 { 30, TEST_FLIP | TEST_FENCE_STRESS , "flip-vs-fences" },
1539 { 30, TEST_FLIP | TEST_CHECK_TS, "plain-flip-ts-check" },
1541 "plain-flip-fb-recreate" },
1542 { 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
1543 { 20, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "flip-vs-dpms" },
1544 { 30, TEST_FLIP | TEST_PAN, "flip-vs-panning" },
1545 { 20, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "flip-vs-modeset" },
1547 "flip-vs-expired-vblank" },
1550 TEST_CHECK_TS, "flip-vs-absolute-wf_vblank" },
1552 "flip-vs-wf_vblank" },
1554 TEST_CHECK_TS, "flip-vs-blocking-wf-vblank" },
1555 { 30, TEST_FLIP | TEST_MODESET | TEST_HANG | TEST_NOEVENT, "flip-vs-modeset-vs-hang" },
1556 { 30, TEST_FLIP | TEST_PAN | TEST_HANG, "flip-vs-panning-vs-hang" },
1559 "flip-vs-dpms-off-vs-modeset" },
1561 "single-buffer-flip-vs-dpms-off-vs-modeset" },
1562 { 30, TEST_FLIP | TEST_NO_2X_OUTPUT | TEST_DPMS_OFF_OTHERS , "dpms-off-confusion" },
1563 { 0, TEST_ENOENT | TEST_NOEVENT, "nonexisting-fb" },
1564 { 10, TEST_DPMS_OFF | TEST_DPMS | TEST_VBLANK_RACE, "dpms-vs-vblank-race" },
1565 { 10, TEST_MODESET | TEST_VBLANK_RACE, "modeset-vs-vblank-race" },
1566 { 0, TEST_BO_TOOBIG | TEST_NO_2X_OUTPUT, "bo-too-big" },
1567 { 10, TEST_FLIP | TEST_SUSPEND, "flip-vs-suspend" },
1591 igt_subtest("nonblocking-read")
1594 for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
1596 tests[i].flags & TEST_BASIC ? "basic-" : "",
1597 tests[i].name)
1598 run_test(tests[i].duration, tests[i].flags);
1600 if (tests[i].flags & TEST_NO_2X_OUTPUT)
1603 igt_subtest_f( "2x-%s", tests[i].name)
1604 run_pair(tests[i].duration, tests[i].flags);
1608 for (i = 0; i < sizeof(tests) / sizeof (tests[0]); i++) {
1611 if ((tests[i].flags & TEST_VBLANK_BLOCK) &&
1612 !(tests[i].flags & TEST_VBLANK_ABSOLUTE))
1616 * -EBUSY needs to complete in a single vblank, skip them for
1617 * interruptible tests
1619 if (tests[i].flags & TEST_EBUSY)
1622 igt_subtest_f( "%s-interruptible", tests[i].name)
1623 run_test(tests[i].duration, tests[i].flags);
1625 if (tests[i].flags & TEST_NO_2X_OUTPUT)
1628 igt_subtest_f( "2x-%s-interruptible", tests[i].name)
1629 run_pair(tests[i].duration, tests[i].flags);