public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 4/9] tests/kms_plane_scaling: Convert from simple test to full test
Date: Mon, 15 Jan 2018 11:10:22 +0200	[thread overview]
Message-ID: <1516007422.12453.91.camel@intel.com> (raw)
In-Reply-To: <20180112102116.4670-5-maarten.lankhorst@linux.intel.com>

On Fri, 2018-01-12 at 11:21 +0100, Maarten Lankhorst wrote:
> Convert the test to run subtests per pipe, before we start adding
> more subtests.
> 

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  tests/kms_plane_scaling.c | 46 +++++++++++++++++++++--------------
> -----------
>  1 file changed, 21 insertions(+), 25 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 5487f89e5149..624e20447780 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -170,6 +170,9 @@ test_plane_scaling_on_pipe(data_t *d, enum pipe
> pipe, igt_output_t *output)
>  	drmModeModeInfo *mode;
>  	int primary_plane_scaling = 0; /* For now */
>  
> +	igt_require(d->num_scalers > 0);
> +
> +	igt_display_reset(display);
>  	igt_output_set_pipe(output, pipe);
>  	mode = igt_output_get_mode(output);
>  
> @@ -296,39 +299,32 @@ cleanup:
>  	cleanup_crtc(d, output, d->plane1);
>  }
>  
> -static void test_plane_scaling(data_t *d, enum pipe pipe)
> -{
> -	igt_output_t *output;
> -	int valid_tests = 0;
> -
> -	igt_require(d->num_scalers);
> -
> -	for_each_valid_output_on_pipe(&d->display, pipe, output) {
> -		test_plane_scaling_on_pipe(d, pipe, output);
> -		igt_output_set_pipe(output, PIPE_ANY);
> -		valid_tests++;
> -	}
> -
> -	igt_require_f(valid_tests, "no valid crtc/connector
> combinations found\n");
> -}
> -
> -igt_simple_main
> +igt_main
>  {
>  	data_t data = {};
>  	enum pipe pipe;
>  
>  	igt_skip_on_simulation();
>  
> +	igt_fixture {
> +		data.drm_fd = drm_open_driver(DRIVER_INTEL);
> +		igt_require_pipe_crc(data.drm_fd);
> +		igt_display_init(&data.display, data.drm_fd);
> +		data.devid = intel_get_drm_devid(data.drm_fd);
> +		data.num_scalers = intel_gen(data.devid) >= 9 ? 2 :
> 0;
> +	}
>  
> -	data.drm_fd = drm_open_driver(DRIVER_INTEL);
> -	igt_require_pipe_crc(data.drm_fd);
> -	igt_display_init(&data.display, data.drm_fd);
> -	data.devid = intel_get_drm_devid(data.drm_fd);
> +	for_each_pipe_static(pipe) igt_subtest_group {
> +		igt_output_t *output;
>  
> -	data.num_scalers = intel_gen(data.devid) >= 9 ? 2 : 0;
> +		igt_fixture
> +			igt_display_require_output_on_pipe(&data.dis
> play, pipe);
>  
> -	for_each_pipe_static(pipe)
> -		test_plane_scaling(&data, pipe);
> +		igt_subtest_f("pipe-%s-plane-scaling",
> kmstest_pipe_name(pipe))
> +			for_each_valid_output_on_pipe(&data.display,
> pipe, output)
> +				test_plane_scaling_on_pipe(&data,
> pipe, output);
> +	}
>  
> -	igt_display_fini(&data.display);
> +	igt_fixture
> +		igt_display_fini(&data.display);
>  }
-- 
Mika Kahola - Intel OTC

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-01-15  9:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 10:21 [PATCH i-g-t v2 0/9] kms plane scaling tests Maarten Lankhorst
2018-01-12 10:21 ` [PATCH i-g-t v2 1/9] tests/kms_plane: Run test for all supported pixel formats, v2 Maarten Lankhorst
2018-01-12 13:52   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 2/9] tests/kms_plane_scaling: Move the actual test to its own function Maarten Lankhorst
2018-01-15  8:47   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 3/9] tests/kms_plane_scaling: Fix basic scaling test, v2 Maarten Lankhorst
2018-01-15  9:01   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 4/9] tests/kms_plane_scaling: Convert from simple test to full test Maarten Lankhorst
2018-01-15  9:10   ` Mika Kahola [this message]
2018-01-12 10:21 ` [PATCH i-g-t v2 5/9] tests/kms_plane_scaling: Clean up tests to work better with igt_kms Maarten Lankhorst
2018-01-12 10:21 ` [PATCH i-g-t v2 6/9] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v2 Maarten Lankhorst
2018-01-12 10:21 ` [PATCH i-g-t v2 7/9] tests/kms_plane_scaling: test scaler with clipping clamping, v2 Maarten Lankhorst
2018-01-12 10:21 ` [PATCH i-g-t v2 8/9] lib/igt_kms: Add more braces around macros Maarten Lankhorst
2018-01-15 12:01   ` Mika Kahola
2018-01-12 10:21 ` [PATCH i-g-t v2 9/9] tests/kms_plane_scaling: test for multi pipe with scaling Maarten Lankhorst
2018-01-12 13:09 ` ✓ Fi.CI.BAT: success for kms plane scaling tests Patchwork
2018-01-12 13:58 ` ✓ Fi.CI.IGT: " Patchwork

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=1516007422.12453.91.camel@intel.com \
    --to=mika.kahola@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    /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