From: Antti Koskipaa Subject: [PATCH i-g-t 6/7] kms_cursor_crc: Add moving cursor test Date: Wed, 2 Apr 2014 14:06:29 +0300 Message-ID: <1396436790-14313-7-git-send-email-antti.koskipaa@linux.intel.com> References: <1396436790-14313-1-git-send-email-antti.koskipaa@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 264466EA66 for ; Wed, 2 Apr 2014 04:07:27 -0700 (PDT) In-Reply-To: <1396436790-14313-1-git-send-email-antti.koskipaa@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 021d58a..1e1d348 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -194,6 +194,20 @@ static void test_crc_offscreen(test_data_t *test_data) do_test(test_data, left - (cursor_w+512), right + (cursor_w+512), top - (cursor_h+512), bottom + (cursor_h+512)); } +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) { @@ -337,6 +351,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); } } -- 1.8.3.2