From patchwork Tue Jun 6 12:20:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Kahola X-Patchwork-Id: 9768767 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 A780060364 for ; Tue, 6 Jun 2017 12:21:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A28EE20121 for ; Tue, 6 Jun 2017 12:21:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9738028397; Tue, 6 Jun 2017 12:21:14 +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 38E86284A8 for ; Tue, 6 Jun 2017 12:21:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B6DC89338; Tue, 6 Jun 2017 12:21:13 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 40A9A89338 for ; Tue, 6 Jun 2017 12:21:13 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 06 Jun 2017 05:21:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,306,1493708400"; d="scan'208";a="977351289" Received: from sorvi.fi.intel.com ([10.237.72.182]) by orsmga003.jf.intel.com with ESMTP; 06 Jun 2017 05:21:11 -0700 From: Mika Kahola To: intel-gfx@lists.freedesktop.org Date: Tue, 6 Jun 2017 15:20:46 +0300 Message-Id: <1496751646-30358-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_pipe_crc_basic: Reset GPU before running subtests 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 It has been noticed by our CI BAT testing that in some 1%-3% probability kms_pipe_crc_basic subtest read-crc-pipe-x-frame-sequence fails when comparing gathered CRC frames. However, running kms_pipe_crc_basic subtests alone i.e. outside BAT I was unable to replicate the issue. The patch proposes a GPU reset before running the subtests. This way we can ensure that GPU register settings are reinitialized if they have been altered by the tests executed earlier in BAT. The issue has been seen on following bug reports Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99788 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100367 Signed-off-by: Mika Kahola --- tests/kms_pipe_crc_basic.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c index f49b434..e1940e6 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -175,6 +175,13 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags) igt_require_f(valid_connectors, "No connector found for pipe %i\n", pipe); } +static void reset_gpu(void) +{ + int fd = drm_open_driver(DRIVER_INTEL); + igt_post_hang_ring(fd, igt_hang_ring(fd, I915_EXEC_DEFAULT)); + close(fd); +} + data_t data = {0, }; igt_main @@ -194,6 +201,9 @@ igt_main data.debugfs = igt_debugfs_dir(data.drm_fd); } + /* before running tests, reset gpu */ + reset_gpu(); + igt_subtest("bad-pipe") test_bad_command(&data, "pipe D none");