From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH i-g-t 3/5] kms_plane: Update for universal plane changes Date: Fri, 13 Jun 2014 17:27:44 +0100 Message-ID: <20140613162744.GS31323@strange.amr.corp.intel.com> References: <1401376014-24845-1-git-send-email-matthew.d.roper@intel.com> <1401376157-24940-1-git-send-email-matthew.d.roper@intel.com> <1401376157-24940-3-git-send-email-matthew.d.roper@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 72AFB6EAA3 for ; Fri, 13 Jun 2014 09:27:46 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1401376157-24940-3-git-send-email-matthew.d.roper@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Matt Roper Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, May 29, 2014 at 08:09:15AM -0700, Matt Roper wrote: > 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 I've hard time deciding if I'm happy with losing the ordering of planes. I think I'm not :) Can we have the init function keep the plane ordering? -- Damien > --- > 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 5db0947..1d334ab 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 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx