From: Imre Deak Subject: [PATCH 16/22] flip_test: store crtc_idx in the test context obj Date: Tue, 16 Oct 2012 17:34:50 +0300 Message-ID: <1350398096-3649-17-git-send-email-imre.deak@intel.com> References: <1350398096-3649-1-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id C4B6D9F616 for ; Tue, 16 Oct 2012 07:35:34 -0700 (PDT) In-Reply-To: <1350398096-3649-1-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 --- 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