From patchwork Thu Apr 10 12:08:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Antti_Koskip=C3=A4=C3=A4?= X-Patchwork-Id: 3962391 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 865F9C0EBC for ; Thu, 10 Apr 2014 12:08:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4B4D20632 for ; Thu, 10 Apr 2014 12:08:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D481B204FB for ; Thu, 10 Apr 2014 12:08:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D7D7C6EC1E; Thu, 10 Apr 2014 05:08:38 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id F3BEB6E212 for ; Thu, 10 Apr 2014 05:08:35 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 10 Apr 2014 05:08:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,834,1389772800"; d="scan'208";a="417335608" Received: from sahapukki.fi.intel.com ([10.237.72.180]) by azsmga001.ch.intel.com with ESMTP; 10 Apr 2014 05:08:14 -0700 From: Antti Koskipaa To: intel-gfx@lists.freedesktop.org Date: Thu, 10 Apr 2014 15:08:10 +0300 Message-Id: <1397131692-2857-7-git-send-email-antti.koskipaa@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1397131692-2857-1-git-send-email-antti.koskipaa@linux.intel.com> References: <1397131692-2857-1-git-send-email-antti.koskipaa@linux.intel.com> Subject: [Intel-gfx] [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Signed-off-by: Antti Koskipaa --- tests/kms_cursor_crc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 85ff243..b2498a1 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -200,6 +200,20 @@ static void test_crc_offscreen(test_data_t *test_data) do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX); } +static void test_crc_sliding(test_data_t *test_data) +{ + int i; + + /* Make sure cursor moves smoothly and pixel-by-pixel, and that there are + * no alignment issues. Horizontal, vertical and diagonal test. + */ + for (i = 0; i < 16; i++) { + do_single_test(test_data, i, 0); + do_single_test(test_data, 0, i); + do_single_test(test_data, i, i); + } +} + static bool prepare_crtc(test_data_t *test_data, igt_output_t *output, int cursor_w, int cursor_h) { @@ -343,6 +357,8 @@ static void run_test_generic(data_t *data, int cursor_max_size) run_test(data, test_crc_onscreen, cursor_size, cursor_size); igt_subtest_f("cursor-%s-offscreen", c_size) run_test(data, test_crc_offscreen, cursor_size, cursor_size); + igt_subtest_f("cursor-%s-sliding", c_size) + run_test(data, test_crc_sliding, cursor_size, cursor_size); } }