Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 6/9] tests/kms_rotation_crc: Move bad_format parameter to test_plane_rotation
Date: Tue, 06 Feb 2018 12:57:52 +0200	[thread overview]
Message-ID: <1517914672.2602.63.camel@intel.com> (raw)
In-Reply-To: <20180201153914.74639-7-maarten.lankhorst@linux.intel.com>

On Thu, 2018-02-01 at 16:39 +0100, Maarten Lankhorst wrote:
> Instead of 2 functions doing the same thing, consolidate to a single
> function.
> 

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

> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  tests/kms_rotation_crc.c | 22 ++++++----------------
>  1 file changed, 6 insertions(+), 16 deletions(-)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index c402da068ae0..70eb6d24b466 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -368,7 +368,7 @@ static void wait_for_pageflip(int fd)
>  	igt_assert(drmHandleEvent(fd, &evctx) == 0);
>  }
>  
> -static void __test_plane_rotation(data_t *data, int plane_type, bool
> test_bad_format)
> +static void test_plane_rotation(data_t *data, int plane_type, bool
> test_bad_format)
>  {
>  	igt_display_t *display = &data->display;
>  	igt_output_t *output;
> @@ -468,16 +468,6 @@ static void __test_plane_rotation(data_t *data,
> int plane_type, bool test_bad_fo
>  	igt_require_f(valid_tests, "no valid crtc/connector
> combinations found\n");
>  }
>  
> -static inline void test_bad_plane_rotation(data_t *data, int
> plane_type)
> -{
> -	__test_plane_rotation(data, plane_type, true);
> -}
> -
> -static inline void test_plane_rotation(data_t *data, int plane_type)
> -{
> -	__test_plane_rotation(data, plane_type, false);
> -}
> -
>  static void test_plane_rotation_ytiled_obj(data_t *data,
>  					   igt_output_t *output,
>  					   int plane_type)
> @@ -784,7 +774,7 @@ igt_main
>  				    gen >= 9);
>  			data.rotation = subtest->rot;
>  			data.flips = subtest->flips;
> -			test_plane_rotation(&data, subtest->plane);
> +			test_plane_rotation(&data, subtest->plane,
> false);
>  		}
>  	}
>  	data.flips = 0;
> @@ -794,7 +784,7 @@ igt_main
>  		data.rotation = IGT_ROTATION_90;
>  		data.pos_x = 100,
>  		data.pos_y = 0;
> -		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY);
> +		test_plane_rotation(&data, DRM_PLANE_TYPE_OVERLAY,
> false);
>  	}
>  	data.pos_x = 0,
>  	data.pos_y = 0;
> @@ -803,7 +793,7 @@ igt_main
>  		igt_require(gen >= 9);
>  		data.rotation = IGT_ROTATION_90;
>  		data.override_fmt = DRM_FORMAT_RGB565;
> -		test_bad_plane_rotation(&data,
> DRM_PLANE_TYPE_PRIMARY);
> +		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY,
> true);
>  	}
>  	data.override_fmt = 0;
>  
> @@ -811,7 +801,7 @@ igt_main
>  		igt_require(gen >= 9);
>  		data.rotation = IGT_ROTATION_90;
>  		data.override_tiling =
> LOCAL_I915_FORMAT_MOD_X_TILED;
> -		test_bad_plane_rotation(&data,
> DRM_PLANE_TYPE_PRIMARY);
> +		test_plane_rotation(&data, DRM_PLANE_TYPE_PRIMARY,
> true);
>  	}
>  	data.override_tiling = 0;
>  
> @@ -846,7 +836,7 @@ igt_main
>  			data.rotation = (IGT_REFLECT_X | reflect_x-
> >rot);
>  			data.override_tiling = reflect_x->tiling;
>  			data.flips = reflect_x->flips;
> -			test_plane_rotation(&data,
> DRM_PLANE_TYPE_PRIMARY);
> +			test_plane_rotation(&data,
> DRM_PLANE_TYPE_PRIMARY, false);
>  		}
>  	}
>  
-- 
Mika Kahola - Intel OTC

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-02-06 10:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-01 15:39 [igt-dev] [PATCH i-g-t 0/9] tests: Cleanups and NV12 preparations Maarten Lankhorst
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 1/9] tests/kms_panel_fitting: Remove dead code Maarten Lankhorst
2018-02-05 10:50   ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 2/9] tests/kms_atomic: Add the test for CRTC_ID/FB_ID mismatch Maarten Lankhorst
2018-02-05 10:53   ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 3/9] tests/kms_plane_scaling: Test all pixel formats in pipe-*-scaler-with-rotation Maarten Lankhorst
2018-02-05 11:14   ` Mika Kahola
2018-02-05 11:15     ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 4/9] tests/kms_plane_scaling: Test all pixel formats with clamping and clipping too Maarten Lankhorst
2018-02-05 11:47   ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 5/9] tests/kms_rotation_crc: Fix bad-tiling testcase Maarten Lankhorst
2018-02-06 10:50   ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 6/9] tests/kms_rotation_crc: Move bad_format parameter to test_plane_rotation Maarten Lankhorst
2018-02-06 10:57   ` Mika Kahola [this message]
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 7/9] tests/kms_rotation_crc: Always run the flip tests when available Maarten Lankhorst
2018-02-06 11:39   ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 8/9] tests/kms_rotation_crc: Remove primary-rotation-90-Y-tiled Maarten Lankhorst
2018-02-06 13:01   ` Mika Kahola
2018-02-01 15:39 ` [igt-dev] [PATCH i-g-t 9/9] tests/kms_rotation_crc: Perform lazy cleanup and require atomic Maarten Lankhorst
2018-02-07  8:55   ` Mika Kahola
2018-02-07  9:46     ` Maarten Lankhorst
2018-02-07 10:37       ` Mika Kahola
2018-02-01 16:04 ` [igt-dev] ✓ Fi.CI.BAT: success for tests: Cleanups and NV12 preparations Patchwork
2018-02-01 19:07 ` [igt-dev] ✗ Fi.CI.IGT: warning " 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=1517914672.2602.63.camel@intel.com \
    --to=mika.kahola@intel.com \
    --cc=igt-dev@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