All of lore.kernel.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] tests/kms_plane_scaling: Move get_num_scalers to a function, v2.
Date: Tue, 16 Jan 2018 13:55:03 +0200	[thread overview]
Message-ID: <1516103703.12453.109.camel@intel.com> (raw)
In-Reply-To: <20180116100333.22837-1-maarten.lankhorst@linux.intel.com>

On Tue, 2018-01-16 at 11:03 +0100, Maarten Lankhorst wrote:
> The number of scalers can depend on the pipe, so require at least 1
> scaler before running any subtests.
> 
> Changes since v1:
> - More closely match kernel implementation. (Mika)
> 

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

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  tests/kms_plane_scaling.c | 22 ++++++++++++++++------
>  1 file changed, 16 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 7e9a948a6b33..dd87bd090705 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -38,8 +38,6 @@ typedef struct {
>  	int image_w;
>  	int image_h;
>  
> -	int num_scalers;
> -
>  	struct igt_fb fb1;
>  	struct igt_fb fb2;
>  	struct igt_fb fb3;
> @@ -53,6 +51,18 @@ typedef struct {
>  	igt_plane_t *plane4;
>  } data_t;
>  
> +static int get_num_scalers(uint32_t devid, enum pipe pipe)
> +{
> +	igt_require(intel_gen(devid) >= 9);
> +
> +	if (intel_gen(devid) >= 10)
> +		return 2;
> +	else if (pipe != PIPE_C)
> +		return 2;
> +	else
> +		return 1;
> +}
> +
>  static void prepare_crtc(data_t *data, igt_output_t *output, enum
> pipe pipe,
>  			igt_plane_t *plane, drmModeModeInfo *mode,
> enum igt_commit_style s)
>  {
> @@ -170,8 +180,6 @@ 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);
> @@ -310,15 +318,17 @@ igt_main
>  		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;
>  	}
>  
>  	for_each_pipe_static(pipe) igt_subtest_group {
>  		igt_output_t *output;
>  
> -		igt_fixture
> +		igt_fixture {
>  			igt_display_require_output_on_pipe(&data.dis
> play, pipe);
>  
> +			igt_require(get_num_scalers(data.devid,
> pipe) > 0);
> +		}
> +
>  		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);
-- 
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-16 11:52 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 14:28 [PATCH i-g-t v3 0/8] kms_plane_scaling tests Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 1/8] tests/kms_plane_scaling: Move the actual test to its own function Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 2/8] tests/kms_plane_scaling: Fix basic scaling test, v3 Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 3/8] tests/kms_plane_scaling: Convert from simple test to full test Maarten Lankhorst
2018-01-15 14:28 ` [PATCH i-g-t v3 4/8] tests/kms_plane_scaling: Move get_num_scalers to a function Maarten Lankhorst
2018-01-16  8:22   ` Mika Kahola
2018-01-16 10:03   ` [PATCH i-g-t] tests/kms_plane_scaling: Move get_num_scalers to a function, v2 Maarten Lankhorst
2018-01-16 11:55     ` Mika Kahola [this message]
2018-01-15 14:28 ` [PATCH i-g-t v3 5/8] tests/kms_plane_scaling: Clean up tests to work better with igt_kms, v2 Maarten Lankhorst
2018-01-16  9:32   ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 6/8] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v2 Maarten Lankhorst
2018-01-16 12:43   ` Mika Kahola
2018-01-16 14:00   ` [PATCH i-g-t] tests/kms_plane_scaling: test scaling with tiling rotation and pixel formats, v3 Maarten Lankhorst
2018-01-16 14:22     ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 7/8] tests/kms_plane_scaling: test scaler with clipping clamping, v3 Maarten Lankhorst
2018-01-16 11:14   ` Mika Kahola
2018-01-15 14:28 ` [PATCH i-g-t v3 8/8] tests/kms_plane_scaling: test for multi pipe with scaling, v3 Maarten Lankhorst
2018-01-16 13:46   ` Mika Kahola
2018-01-16 13:47     ` Maarten Lankhorst
2018-01-16 13:56       ` Mika Kahola
2018-01-17  9:23         ` Maarten Lankhorst
2018-01-15 16:05 ` ✓ Fi.CI.BAT: success for kms_plane_scaling tests Patchwork
2018-01-15 19:25 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-16  9:14 ` ✓ Fi.CI.BAT: success " Patchwork
2018-01-16 10:24 ` ✓ Fi.CI.BAT: success for kms_plane_scaling tests. (rev2) Patchwork
2018-01-16 11:14 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-16 14:59 ` ✓ Fi.CI.BAT: success for kms_plane_scaling tests. (rev3) Patchwork
2018-01-16 16:43 ` ✗ Fi.CI.IGT: warning " Patchwork
2018-01-17 10:05 ` [Intel-gfx] [PATCH i-g-t v3 0/8] kms_plane_scaling tests Daniel Vetter
2018-01-17 10:05   ` Daniel Vetter

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=1516103703.12453.109.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.