From patchwork Mon Jan 19 13:43:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ander Conselvan de Oliveira X-Patchwork-Id: 5658961 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CCB5EC058D for ; Mon, 19 Jan 2015 13:44:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E87820383 for ; Mon, 19 Jan 2015 13:44:15 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3268E20353 for ; Mon, 19 Jan 2015 13:44:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE4E06E0BB; Mon, 19 Jan 2015 05:44:13 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id A907D6E0BB for ; Mon, 19 Jan 2015 05:44:12 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 19 Jan 2015 05:44:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,427,1418112000"; d="scan'208";a="672227192" Received: from linux.jf.intel.com (HELO linux.intel.com) ([10.23.219.25]) by orsmga002.jf.intel.com with ESMTP; 19 Jan 2015 05:44:10 -0800 Received: from localhost (ander-mobl1.fi.intel.com [10.237.72.65]) by linux.intel.com (Postfix) with ESMTP id CB84F6A408D; Mon, 19 Jan 2015 05:44:03 -0800 (PST) From: Ander Conselvan de Oliveira To: Daniel Vetter Date: Mon, 19 Jan 2015 15:43:57 +0200 Message-Id: <1421675037-23086-1-git-send-email-ander.conselvan.de.oliveira@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Cc: Ander Conselvan de Oliveira , intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t] kms_plane: Add test that suspends/resumes before getting 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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds a test that does a suspend/resume cycle between configuring a plane and getting the crc value for the pipe. The intention is to test if the user requested stated is restored properly, instead of being clobbered by the state read out from the hardware. Signed-off-by: Ander Conselvan de Oliveira --- tests/kms_plane.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/kms_plane.c b/tests/kms_plane.c index 5aa58c4..c94eac0 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -32,6 +32,7 @@ #include "drmtest.h" #include "igt_debugfs.h" #include "igt_kms.h" +#include "igt_aux.h" typedef struct { float red; @@ -269,6 +270,7 @@ create_fb_for_mode__panning(data_t *data, drmModeModeInfo *mode, enum { TEST_PANNING_TOP_LEFT = 1 << 0, TEST_PANNING_BOTTOM_RIGHT = 1 << 1, + TEST_SUSPEND_RESUME = 1 << 2, }; static void @@ -309,8 +311,13 @@ test_plane_panning_with_output(data_t *data, igt_display_commit(&data->display); + if (flags & TEST_SUSPEND_RESUME) + igt_system_suspend_autoresume(); + igt_pipe_crc_collect_crc(data->pipe_crc, &crc); + igt_debug_wait_for_keypress("crc"); + if (flags & TEST_PANNING_TOP_LEFT) igt_assert(igt_crc_equal(&test.red_crc, &crc)); else @@ -360,6 +367,11 @@ run_tests_for_pipe_plane(data_t *data, enum pipe pipe, enum igt_plane plane) test_plane_panning(data, pipe, plane, TEST_PANNING_BOTTOM_RIGHT); + igt_subtest_f("plane-panning-bottom-right-suspend-pipe-%s-plane-%d", + kmstest_pipe_name(pipe), plane) + test_plane_panning(data, pipe, plane, + TEST_PANNING_BOTTOM_RIGHT | + TEST_SUSPEND_RESUME); } static void