For DRM_IOCTL_WAIT_VBLANK we'll have to pass the crtc_idx - as opposed to the crtc id required by the rest of the IOCTLs we use. No functional change. Signed-off-by: Imre Deak <imre.deak at intel.com> --- tests/flip_test.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/flip_test.c b/tests/flip_test.c index f07c0db..85fa0f2 100644 --- a/tests/flip_test.c +++ b/tests/flip_test.c @@ -85,6 +85,7 @@ struct event_state { struct test_output { uint32_t id; + int crtc_idx; int mode_valid; drmModeModeInfo mode; drmModeEncoder *encoder; @@ -533,11 +534,13 @@ static unsigned event_loop(struct test_output *o, unsigned duration_sec) return tv_dur.tv_sec * 1000 * 1000 + tv_dur.tv_usec; } -static void flip_mode(struct test_output *o, int crtc, int duration) +static void flip_mode(struct test_output *o, int duration) { int bpp = 32, depth = 24; unsigned ellapsed; + int crtc; + crtc = resources->crtcs[o->crtc_idx]; connector_find_preferred_mode(o, crtc); if (!o->mode_valid) return; @@ -620,8 +623,9 @@ static int run_test(int duration, int flags) o.id = resources->connectors[c]; o.flags = flags; o.flip_state.name = "flip"; + o.crtc_idx = i; - flip_mode(&o, resources->crtcs[i], duration); + flip_mode(&o, duration); } } -- 1.7.9.5