From patchwork Mon Jun 30 23:44:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 4455411 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 17F959F358 for ; Mon, 30 Jun 2014 23:46:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 546E5202F0 for ; Mon, 30 Jun 2014 23:46:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 87CF8201FA for ; Mon, 30 Jun 2014 23:46:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 111866E0DE; Mon, 30 Jun 2014 16:46:05 -0700 (PDT) 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 ESMTP id 294AC6E0DE for ; Mon, 30 Jun 2014 16:46:04 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 30 Jun 2014 16:45:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,578,1400050800"; d="scan'208";a="566304618" Received: from mdroper-hswdev.fm.intel.com (HELO mdroper-hswdev) ([10.1.134.215]) by orsmga002.jf.intel.com with ESMTP; 30 Jun 2014 16:45:49 -0700 Received: from mattrope by mdroper-hswdev with local (Exim 4.82) (envelope-from ) id 1X1lHP-0002g8-2U; Mon, 30 Jun 2014 16:46:35 -0700 From: Matt Roper To: intel-gfx@lists.freedesktop.org Date: Mon, 30 Jun 2014 16:44:30 -0700 Message-Id: <1404171870-10206-10-git-send-email-matthew.d.roper@intel.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1404171870-10206-1-git-send-email-matthew.d.roper@intel.com> References: <1404171870-10206-1-git-send-email-matthew.d.roper@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 9/9] tests/kms_cursor_crc: Call drmModeMoveCursor() directly 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.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 We're calling drmModeSetCursor() to change the cursor image and never actually doing a display commit (aside from when we display the cursor), so call the move ioctl directly rather than igt_plane_set_position() to ensure the changes actually take effect. Signed-off-by: Matt Roper --- tests/kms_cursor_crc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index d21fc99..82807b7 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -349,10 +349,10 @@ static void test_cursor_size(data_t *data) igt_display_t *display = &data->display; igt_pipe_crc_t *pipe_crc = data->pipe_crc; igt_crc_t crc[10], ref_crc; - igt_plane_t *cursor; cairo_t *cr; uint32_t fb_id; int i, size, cursor_max_size = data->cursor_max_size; + int ret; /* Create a maximum size cursor, then change the size in flight to * smaller ones to see that the size is applied correctly @@ -367,12 +367,12 @@ static void test_cursor_size(data_t *data) /* Hardware test loop */ cursor_enable(data); - cursor = igt_output_get_plane(data->output, IGT_PLANE_CURSOR); - igt_plane_set_position(cursor, 0, 0); + ret = drmModeMoveCursor(data->drm_fd, data->output->config.crtc->crtc_id, 0, 0); + igt_assert(ret == 0); for (i = 0, size = cursor_max_size; size >= 64; size /= 2, i++) { /* Change size in flight: */ - int ret = drmModeSetCursor(data->drm_fd, data->output->config.crtc->crtc_id, - data->fb.gem_handle, size, size); + ret = drmModeSetCursor(data->drm_fd, data->output->config.crtc->crtc_id, + data->fb.gem_handle, size, size); igt_assert(ret == 0); igt_wait_for_vblank(data->drm_fd, data->pipe); igt_pipe_crc_collect_crc(pipe_crc, &crc[i]);