Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Karthik B S <karthik.b.s@intel.com>
To: Arun R Murthy <arun.r.murthy@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/4] tests/kms_async_flips: Split test_init()
Date: Wed, 17 May 2023 14:34:46 +0530	[thread overview]
Message-ID: <467e15bc-84a0-cf99-7601-789a81f59e38@intel.com> (raw)
In-Reply-To: <20230516062206.1064604-3-arun.r.murthy@intel.com>


On 5/16/2023 11:52 AM, Arun R Murthy wrote:
> Split the test_init() into two parts: one sets up the mode, the
> other the framebuffers. Will be useful for testing different
> modifiers.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
>   tests/kms_async_flips.c | 37 +++++++++++++++++++------------------
>   1 file changed, 19 insertions(+), 18 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 1c036426..f54bd7ca 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -148,23 +148,31 @@ static void require_monotonic_timestamp(int fd)
>   
>   static void test_init(data_t *data)
>   {
> -	int i;
> -	uint32_t width, height;
> -	igt_plane_t *plane;
> -	static uint32_t prev_output_id;
>   	drmModeModeInfo *mode;
>   
>   	igt_display_reset(&data->display);
>   	igt_display_commit(&data->display);
>   
>   	mode = igt_output_get_mode(data->output);
> -	width = mode->hdisplay;
> -	height = mode->vdisplay;
>   
>   	data->crtc_id = data->display.pipes[data->pipe].crtc_id;
>   	data->refresh_rate = mode->vrefresh;
>   
>   	igt_output_set_pipe(data->output, data->pipe);
> +}
> +
> +static void test_init_fbs(data_t *data)
> +{
> +	int i;
> +	uint32_t width, height;
> +	igt_plane_t *plane;
> +	static uint32_t prev_output_id;
> +	drmModeModeInfo *mode;
> +
> +	mode = igt_output_get_mode(data->output);
> +	width = mode->hdisplay;
> +	height = mode->vdisplay;
> +
>   	plane = igt_output_get_plane_type(data->output, DRM_PLANE_TYPE_PRIMARY);
>   
>   	if (prev_output_id != data->output->id) {
> @@ -191,8 +199,6 @@ static void test_async_flip(data_t *data)
>   	long long int fps;
>   	struct timeval start, end, diff;
>   
> -	test_init(data);
> -
>   	gettimeofday(&start, NULL);
>   	frame = 1;
>   	do {
> @@ -287,8 +293,6 @@ static void test_timestamp(data_t *data)
>   	unsigned int seq, seq1;
>   	int ret;
>   
> -	test_init(data);
> -
>   	/*
>   	 * In older platforms(<= gen10), async address update bit is double buffered.
>   	 * So flip timestamp can be verified only from the second flip.
> @@ -346,8 +350,6 @@ static void test_cursor(data_t *data)
>   	do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
>   	do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &height));
>   
> -	test_init(data);
> -
>   	igt_create_color_fb(data->drm_fd, width, height, DRM_FORMAT_ARGB8888,
>   			    DRM_FORMAT_MOD_LINEAR, 1., 1., 1., &cursor_fb);
>   
> @@ -388,8 +390,6 @@ static void test_invalid(data_t *data)
>   	width = mode->hdisplay;
>   	height = mode->vdisplay;
>   
> -	test_init(data);
> -
>   	igt_create_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
>   		      I915_FORMAT_MOD_Y_TILED, &fb);
>   
> @@ -493,8 +493,6 @@ static void test_crc(data_t *data)
>   	data->frame_count = 0;
>   	data->flip_pending = false;
>   
> -	test_init(data);
> -
>   	cr = igt_get_cairo_ctx(data->drm_fd, &data->bufs[frame]);
>   	igt_paint_color(cr, 0, 0, data->bufs[frame].width, data->bufs[frame].height, 1.0, 0.0, 0.0);
>   	igt_put_cairo_ctx(cr);
> @@ -550,15 +548,18 @@ static void run_test(data_t *data, void (*test)(data_t *))
>   {
>   	igt_display_t *display = &data->display;
>   
> -	for_each_valid_output_on_pipe(display, data->pipe, data->output) {
> + 	for_each_pipe_with_valid_output(display, data->pipe, data->output) {
>   		igt_display_reset(display);
>   
>   		igt_output_set_pipe(data->output, data->pipe);
>   		if (!i915_pipe_output_combo_valid(display))
>   			continue;
>   
> -		igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(data->pipe), data->output->name)
> +		test_init(data);
> +		igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(data->pipe), data->output->name) {
> +			test_init_fbs(data);
>   			test(data);
> +		}
>   
>   		if (!data->extended)
>   			break;

  reply	other threads:[~2023-05-17  9:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  6:22 [igt-dev] [PATCH i-g-t 1/4] tests/kms_async_flips: Ger rid of i915 specific fb creation Arun R Murthy
2023-05-16  6:22 ` [igt-dev] [PATCH i-g-t 2/4] " Arun R Murthy
2023-05-17 11:10   ` Kamil Konieczny
2023-05-17 11:26     ` Murthy, Arun R
2023-05-16  6:22 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_async_flips: Split test_init() Arun R Murthy
2023-05-17  9:04   ` Karthik B S [this message]
2023-05-16  6:22 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_async_flips: Test all modifiers Arun R Murthy
2023-05-17  9:01   ` Karthik B S
2023-05-16  6:55 ` [igt-dev] [PATCH i-g-t 1/4] tests/kms_async_flips: Ger rid of i915 specific fb creation Saarinen, Jani
2023-05-16  7:24 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/4] " Patchwork
2023-05-17  3:50 ` [igt-dev] [PATCHv2 i-g-t 1/4] tests/kms_async_flips: Get " Arun R Murthy
2023-05-17  3:50   ` [igt-dev] [PATCHv2 i-g-t 2/4] tests/kms_async_flips: Run the test only once per pipe Arun R Murthy
2023-05-17  6:33     ` Karthik B S
2023-05-17  7:51       ` Murthy, Arun R
2023-05-17  5:49   ` [igt-dev] [PATCHv2 i-g-t 1/4] tests/kms_async_flips: Get rid of i915 specific fb creation Karthik B S
2023-05-17  4:45 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [PATCHv2,i-g-t,1/4] tests/kms_async_flips: Get rid of i915 specific fb creation (rev2) Patchwork
2023-05-17 14:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-05-18 11:25 ` [igt-dev] [PATCHv2 i-g-t 1/4] tests/kms_async_flips: Get rid of i915 specific fb creation Arun R Murthy
2023-05-18 11:25   ` [igt-dev] [PATCHv3 i-g-t 2/4] tests/kms_async_flips: Run the test for all outputs Arun R Murthy
2023-05-18 11:56     ` Karthik B S
2023-05-18 11:25   ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_async_flips: Split test_init() Arun R Murthy
2023-05-18 11:25   ` [igt-dev] [PATCHv2 i-g-t 4/4] tests/kms_async_flips: Test all modifiers Arun R Murthy
2023-05-18 11:58     ` Karthik B S
2023-05-18 11:58 ` [igt-dev] ✗ Fi.CI.BUILD: failure for series starting with [i-g-t,3/4] tests/kms_async_flips: Split test_init() (rev5) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-05-18 12:13 [igt-dev] [PATCHv2 i-g-t 1/4] tests/kms_async_flips: Get rid of i915 specific fb creation Arun R Murthy
2023-05-18 12:13 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_async_flips: Split test_init() Arun R Murthy
2023-05-19  5:42   ` Arun R Murthy

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=467e15bc-84a0-cf99-7601-789a81f59e38@intel.com \
    --to=karthik.b.s@intel.com \
    --cc=arun.r.murthy@intel.com \
    --cc=igt-dev@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