From patchwork Wed Apr 30 17:11:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Roper X-Patchwork-Id: 4095271 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 1D091BFF02 for ; Wed, 30 Apr 2014 17:13:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4C584202DD for ; Wed, 30 Apr 2014 17:13:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 276DD202BE for ; Wed, 30 Apr 2014 17:13:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B0D446EC64; Wed, 30 Apr 2014 10:13:55 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id D9B286EC64 for ; Wed, 30 Apr 2014 10:13:54 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 30 Apr 2014 10:11:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,959,1389772800"; d="scan'208";a="531426921" Received: from mdroper-hswdev.fm.intel.com (HELO mdroper-hswdev) ([10.1.134.215]) by fmsmga002.fm.intel.com with ESMTP; 30 Apr 2014 10:11:04 -0700 Received: from mattrope by mdroper-hswdev with local (Exim 4.82) (envelope-from ) id 1WfY2Q-0004Ri-UW; Wed, 30 Apr 2014 10:11:18 -0700 From: Matt Roper To: intel-gfx@lists.freedesktop.org Date: Wed, 30 Apr 2014 10:11:10 -0700 Message-Id: <1398877871-17046-3-git-send-email-matthew.d.roper@intel.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1398877871-17046-1-git-send-email-matthew.d.roper@intel.com> References: <1398877871-17046-1-git-send-email-matthew.d.roper@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 3/4] kms_plane: Update for universal plane changes 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 Recent changes in igt_kms to support universal planes have removed the plane list order guarantees that kms_plane depended upon. Ensure that we loop over the entire plane list properly and then selectively skip non-overlay planes. While we're at it, update a couple igt_output_get_plane() calls to use plane enums rather than integer values to make it clear what we're actually doing. Signed-off-by: Matt Roper --- tests/kms_plane.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/kms_plane.c b/tests/kms_plane.c index 6bdbca3..bbeab0a 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -94,7 +94,7 @@ test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe) test->pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); igt_output_set_pipe(output, pipe); - primary = igt_output_get_plane(output, 0); + primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY); mode = igt_output_get_mode(output); igt_create_color_fb(data->drm_fd, mode->hdisplay, mode->vdisplay, @@ -146,9 +146,14 @@ test_plane_position_with_output(data_t *data, test_position_init(&test, output, pipe); mode = igt_output_get_mode(output); - primary = igt_output_get_plane(output, 0); + primary = igt_output_get_plane(output, IGT_PLANE_PRIMARY); sprite = igt_output_get_plane(output, plane); + if (sprite->is_primary) { + test_position_fini(&test, output); + igt_skip("Skipping primary plane\n"); + } + create_fb_for_mode__position(data, mode, 100, 100, 64, 64, &primary_fb); igt_plane_set_fb(primary, &primary_fb); @@ -213,7 +218,7 @@ run_tests_for_pipe(data_t *data, enum pipe pipe) { int plane; - for (plane = 1; plane < IGT_MAX_PLANES; plane++) + for (plane = 0; plane < IGT_MAX_PLANES; plane++) run_tests_for_pipe_plane(data, pipe, plane); }