From patchwork Fri Jul 28 12:45:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kahola X-Patchwork-Id: 9868689 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C8FF560382 for ; Fri, 28 Jul 2017 12:43:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C778D288BB for ; Fri, 28 Jul 2017 12:43:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB4B2288BE; Fri, 28 Jul 2017 12:43:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4CE4F288BB for ; Fri, 28 Jul 2017 12:43:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 43C816F372; Fri, 28 Jul 2017 12:43:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7010C6F372 for ; Fri, 28 Jul 2017 12:43:29 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Jul 2017 05:43:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.40,425,1496127600"; d="scan'208"; a="1177328463" Received: from sorvi.fi.intel.com ([10.237.72.154]) by fmsmga001.fm.intel.com with ESMTP; 28 Jul 2017 05:43:23 -0700 From: Mika Kahola To: intel-gfx@lists.freedesktop.org Date: Fri, 28 Jul 2017 15:45:16 +0300 Message-Id: <1501245916-3719-1-git-send-email-mika.kahola@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [Intel-gfx] [PATCH i-g-t] tests/kms_plane_multiple: Fix reference CRC X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP When grabbing reference CRC with igt_pipe_crc_get_crcs() the number of words in igt_crc_t structure was incorrectly collected. The fix here is to switch to igt_pipe_crc_collect_crc() function when collecting CRC for reference frame. The problem was caught by CI system and at least affects on HSW platform. Signed-off-by: Mika Kahola --- tests/kms_plane_multiple.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c index f6c6223..08f184a 100644 --- a/tests/kms_plane_multiple.c +++ b/tests/kms_plane_multiple.c @@ -110,7 +110,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe, bool atomic, { drmModeModeInfo *mode; igt_plane_t *primary; - int ret, n; + int ret; igt_output_set_pipe(output, pipe); @@ -131,9 +131,7 @@ test_grab_crc(data_t *data, igt_output_t *output, enum pipe pipe, bool atomic, atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); igt_skip_on(ret != 0); - igt_pipe_crc_start(data->pipe_crc); - n = igt_pipe_crc_get_crcs(data->pipe_crc, 1, &crc); - igt_assert_eq(n, 1); + igt_pipe_crc_collect_crc(data->pipe_crc, crc); } /* @@ -278,6 +276,8 @@ test_atomic_plane_position_with_output(data_t *data, enum pipe pipe, test_grab_crc(data, output, pipe, true, &blue, tiling, &test.reference_crc); + igt_pipe_crc_start(data->pipe_crc); + i = 0; while (i < iterations || loop_forever) { prepare_planes(data, pipe, &blue, tiling, n_planes, output); @@ -344,6 +344,8 @@ test_legacy_plane_position_with_output(data_t *data, enum pipe pipe, test_grab_crc(data, output, pipe, false, &blue, tiling, &test.reference_crc); + igt_pipe_crc_start(data->pipe_crc); + i = 0; while (i < iterations || loop_forever) { prepare_planes(data, pipe, &blue, tiling, n_planes, output);