Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Arthur Grillo <arthurgrillo@riseup.net>
Cc: igt-dev@lists.freedesktop.org,
	Petri Latvala <adrinael@adrinael.net>,
	Arkadiusz Hiler <arek@hiler.eu>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
	Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
	Ashutosh Dixit <ashutosh.dixit@intel.com>,
	Pekka Paalanen <pekka.paalanen@collabora.com>
Subject: Re: [PATCH i-g-t v5 7/8] benchmarks/kms_fb_stress: Optionally enable the overlay planes
Date: Wed, 22 May 2024 11:07:58 +0200	[thread overview]
Message-ID: <Zk217vwFb9WlPE6o@localhost.localdomain> (raw)
In-Reply-To: <20240422-kms_fb_stress-dev-v5-7-0c577163dc88@riseup.net>

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>

Le 22/04/24 - 19:18, Arthur Grillo a écrit :
> In the future, we would like to not use overlay planes, so make them
> optional.
> 
> Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
> ---
>  benchmarks/kms_fb_stress.c | 40 ++++++++++++++++++++++++++--------------
>  1 file changed, 26 insertions(+), 14 deletions(-)
> 
> diff --git a/benchmarks/kms_fb_stress.c b/benchmarks/kms_fb_stress.c
> index 8775fabdd164..d2d6b3e65eae 100644
> --- a/benchmarks/kms_fb_stress.c
> +++ b/benchmarks/kms_fb_stress.c
> @@ -37,6 +37,7 @@ struct data_t {
>  	igt_output_t *wb_output;
>  	drmModeModeInfo *mode;
>  	struct kms_t kms;
> +	bool use_overlay;
>  };
>  
>  static void plane_setup(struct plane_t *plane, int index)
> @@ -75,8 +76,10 @@ static void gen_fbs(struct data_t *data)
>  
>  	for (int i = 0; i < NUM_FBS; i++) {
>  		create_fb(data->fd, &kms->primary, i, !i, i, i);
> -		create_fb(data->fd, &kms->overlay_a, i, i, !i, i);
> -		create_fb(data->fd, &kms->overlay_b, i, i, i, !i);
> +		if (data->use_overlay) {
> +			create_fb(data->fd, &kms->overlay_a, i, i, !i, i);
> +			create_fb(data->fd, &kms->overlay_b, i, i, i, !i);
> +		}
>  
>  		kms->writeback.rect.width = mode->hdisplay;
>  		kms->writeback.rect.height = mode->vdisplay;
> @@ -150,12 +153,14 @@ static void stress_driver(struct data_t *data)
>  	igt_info("\tprimary:\n");
>  	igt_info("\t\tformat: %s\n", igt_format_str(data->kms.primary.format));
>  	igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data->kms.primary.rect));
> -	igt_info("\toverlay A:\n");
> -	igt_info("\t\tformat: %s\n", igt_format_str(data->kms.overlay_a.format));
> -	igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data->kms.overlay_a.rect));
> -	igt_info("\toverlay B:\n");
> -	igt_info("\t\tformat: %s\n", igt_format_str(data->kms.overlay_b.format));
> -	igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data->kms.overlay_b.rect));
> +	if (data->use_overlay) {
> +		igt_info("\toverlay A:\n");
> +		igt_info("\t\tformat: %s\n", igt_format_str(data->kms.overlay_a.format));
> +		igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data->kms.overlay_a.rect));
> +		igt_info("\toverlay B:\n");
> +		igt_info("\t\tformat: %s\n", igt_format_str(data->kms.overlay_b.format));
> +		igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data->kms.overlay_b.rect));
> +	}
>  	igt_info("\twriteback:\n");
>  	igt_info("\t\tformat: %s\n", igt_format_str(data->kms.writeback.format));
>  	igt_info("\t\trectangle: " RECT_FMT "\n", RECT_ARG(&data->kms.writeback.rect));
> @@ -169,9 +174,11 @@ static void stress_driver(struct data_t *data)
>  
>  		plane_setup(&data->kms.primary, fb_index);
>  
> -		plane_setup(&data->kms.overlay_a, fb_index);
> +		if (data->use_overlay) {
> +			plane_setup(&data->kms.overlay_a, fb_index);
>  
> -		plane_setup(&data->kms.overlay_b, fb_index);
> +			plane_setup(&data->kms.overlay_b, fb_index);
> +		}
>  
>  		igt_output_set_writeback_fb(data->wb_output, &data->kms.writeback.fbs[fb_index]);
>  
> @@ -187,14 +194,18 @@ static void stress_driver(struct data_t *data)
>  	elapsed = igt_time_elapsed(&then, &now);
>  
>  	igt_plane_set_fb(data->kms.primary.base, NULL);
> -	igt_plane_set_fb(data->kms.overlay_a.base, NULL);
> -	igt_plane_set_fb(data->kms.overlay_b.base, NULL);
> +	if (data->use_overlay) {
> +		igt_plane_set_fb(data->kms.overlay_a.base, NULL);
> +		igt_plane_set_fb(data->kms.overlay_b.base, NULL);
> +	}
>  	igt_output_set_writeback_fb(data->wb_output, NULL);
>  
>  	for (int i = 0; i < NUM_FBS; i++) {
>  		igt_remove_fb(data->fd, &data->kms.primary.fbs[i]);
> -		igt_remove_fb(data->fd, &data->kms.overlay_a.fbs[i]);
> -		igt_remove_fb(data->fd, &data->kms.overlay_b.fbs[i]);
> +		if (data->use_overlay) {
> +			igt_remove_fb(data->fd, &data->kms.overlay_a.fbs[i]);
> +			igt_remove_fb(data->fd, &data->kms.overlay_b.fbs[i]);
> +		}
>  		igt_remove_fb(data->fd, &data->kms.writeback.fbs[i]);
>  	}
>  
> @@ -279,6 +290,7 @@ igt_main
>  	}
>  
>  	igt_subtest("default-stress") {
> +		data.use_overlay = true;
>  		stress_driver(&data);
>  
>  	}
> 
> -- 
> 2.44.0
> 

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2024-05-22  9:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22 22:18 [PATCH i-g-t v5 0/8] benchmarks/kms_fb_stress: benchmark formats Arthur Grillo
2024-04-22 22:18 ` [PATCH i-g-t v5 1/8] benchmarks/kms_fb_stress: Assert that we have an supported pipe Arthur Grillo
2024-05-22  8:50   ` Louis Chauvet
2024-04-22 22:18 ` [PATCH i-g-t v5 2/8] benchmarks/kms_fb_stress: Log the KMS structure Arthur Grillo
2024-05-22  8:51   ` Louis Chauvet
2024-04-22 22:18 ` [PATCH i-g-t v5 3/8] benchmarks/kms_fb_stress: Separate the benchmark in a subtest Arthur Grillo
2024-05-22  8:59   ` Louis Chauvet
2024-04-22 22:18 ` [PATCH i-g-t v5 4/8] benchmarks/kms_fb_stress: Free resources on the stress procedure Arthur Grillo
2024-05-22  9:04   ` Louis Chauvet
2024-04-22 22:18 ` [PATCH i-g-t v5 5/8] benchmarks/kms_fb_stress: Move FB creation to a separate function Arthur Grillo
2024-05-22  9:07   ` Louis Chauvet
2024-04-22 22:18 ` [PATCH i-g-t v5 6/8] benchmarks/kms_fb_stress: Don't paint the FB's if the format is not supported by Pixman Arthur Grillo
2024-05-22  8:39   ` Louis Chauvet
2024-04-22 22:18 ` [PATCH i-g-t v5 7/8] benchmarks/kms_fb_stress: Optionally enable the overlay planes Arthur Grillo
2024-05-22  9:07   ` Louis Chauvet [this message]
2024-04-22 22:18 ` [PATCH i-g-t v5 8/8] benchmarks/kms_fb_stress: Create a benchmark for formats Arthur Grillo
2024-05-22  8:35   ` Louis Chauvet
2024-04-22 23:02 ` ✓ CI.xeBAT: success for benchmarks/kms_fb_stress: benchmark formats (rev2) Patchwork
2024-04-22 23:13 ` ✓ Fi.CI.BAT: " Patchwork
2024-04-23  5:53 ` ✗ CI.xeFULL: failure " Patchwork
2024-04-23 19:57   ` Kamil Konieczny
2024-04-23 10:47 ` ✗ Fi.CI.IGT: " Patchwork
2024-04-23 19:56   ` Kamil Konieczny
2024-05-21 15:57 ` [PATCH i-g-t v5 0/8] benchmarks/kms_fb_stress: benchmark formats Arthur Grillo

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=Zk217vwFb9WlPE6o@localhost.localdomain \
    --to=louis.chauvet@bootlin.com \
    --cc=adrinael@adrinael.net \
    --cc=arek@hiler.eu \
    --cc=arthurgrillo@riseup.net \
    --cc=ashutosh.dixit@intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juhapekka.heikkila@gmail.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=pekka.paalanen@collabora.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