public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 2/3] kms_plane: Update for universal plane changes
Date: Thu, 10 Apr 2014 17:26:24 -0700	[thread overview]
Message-ID: <1397175985-3328-3-git-send-email-matthew.d.roper@intel.com> (raw)
In-Reply-To: <1397175985-3328-1-git-send-email-matthew.d.roper@intel.com>

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 <matthew.d.roper@intel.com>
---
 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);
 }
 
-- 
1.8.5.1

  parent reply	other threads:[~2014-04-11  0:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11  0:24 [PATCH] drm/i915: Intel-specific primary plane handling (v2) Matt Roper
2014-04-11  0:26 ` [PATCH i-g-t 0/3] Universal plane testing Matt Roper
2014-04-11  0:26   ` [PATCH i-g-t 1/3] kms: Add universal plane support Matt Roper
2014-04-11  0:26   ` Matt Roper [this message]
2014-04-11  0:26   ` [PATCH i-g-t 3/3] kms_universal_plane: Universal plane testing Matt Roper
2014-04-11  9:22     ` Daniel Vetter
2014-04-11 11:57       ` Daniel Vetter
2014-04-11  9:34 ` [PATCH] drm/i915: Intel-specific primary plane handling (v2) Daniel Vetter
2014-04-11 14:17   ` Matt Roper
2014-04-11 14:23     ` Daniel Vetter
2014-04-11 17:41   ` Matt Roper
2014-04-11 18:27     ` Daniel Vetter
2014-04-11 20:44 ` [PATCH] drm/i915: Intel-specific primary plane handling (v3) Matt Roper
2014-04-11 21:13   ` [PATCH] drm/i915: Intel-specific primary plane handling (v4) Matt Roper
2014-04-22 12:47     ` Ville Syrjälä
2014-04-22 15:18       ` Matt Roper
2014-04-22 17:14         ` Daniel Vetter
2014-04-22 17:32           ` Matt Roper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397175985-3328-3-git-send-email-matthew.d.roper@intel.com \
    --to=matthew.d.roper@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox