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 1/8] benchmarks/kms_fb_stress: Assert that we have an supported pipe
Date: Wed, 22 May 2024 10:50:54 +0200 [thread overview]
Message-ID: <Zk2x7nwtOnugJ2Io@localhost.localdomain> (raw)
In-Reply-To: <20240422-kms_fb_stress-dev-v5-1-0c577163dc88@riseup.net>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Tested-by: Louis Chauvet <louis.chauvet@bootlin.com>
Le 22/04/24 - 19:18, Arthur Grillo a écrit :
> Some driver may not support overlay planes. Add a check for that.
>
> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
> ---
> benchmarks/kms_fb_stress.c | 36 +++++++++++++++++++++++++++---------
> 1 file changed, 27 insertions(+), 9 deletions(-)
>
> diff --git a/benchmarks/kms_fb_stress.c b/benchmarks/kms_fb_stress.c
> index 00eaa0a4931a..e9c051318ed6 100644
> --- a/benchmarks/kms_fb_stress.c
> +++ b/benchmarks/kms_fb_stress.c
> @@ -87,6 +87,27 @@ static igt_output_t *find_wb_output(struct data_t *data)
> return NULL;
> }
>
> +static void set_wb_pipe(struct data_t *data)
> +{
> + enum pipe pipe = PIPE_NONE;
> +
> + for_each_pipe(&data->display, pipe) {
> + igt_pipe_t *pipe_obj = &data->display.pipes[pipe];
> +
> + if (igt_pipe_count_plane_type(pipe_obj, DRM_PLANE_TYPE_OVERLAY) < 2)
> + continue;
> +
> + igt_debug("Selecting pipe %s to %s\n",
> + kmstest_pipe_name(pipe),
> + igt_output_name(data->wb_output));
> + igt_output_set_pipe(data->wb_output, pipe);
> +
> + return;
> + }
> +
> + igt_assert_f(0, "No pipe supports this benchmark\n");
> +}
> +
> static void set_crtc_size(struct data_t *data)
> {
> drmModeModeInfo *mode;
> @@ -142,7 +163,6 @@ static struct kms_t default_kms = {
> igt_simple_main
> {
> struct data_t data = {0};
> - enum pipe pipe = PIPE_NONE;
> struct timespec then, now;
> double elapsed;
>
> @@ -161,24 +181,22 @@ igt_simple_main
>
> data.wb_output = find_wb_output(&data);
> igt_require(data.wb_output);
> -
> - for_each_pipe(&data.display, pipe) {
> - igt_debug("Selecting pipe %s to %s\n",
> - kmstest_pipe_name(pipe),
> - igt_output_name(data.wb_output));
> - igt_output_set_pipe(data.wb_output, pipe);
> - break;
> - }
> + set_wb_pipe(&data);
>
> set_crtc_size(&data);
>
> gen_fbs(&data);
>
> data.kms.primary.base = igt_output_get_plane_type(data.wb_output, DRM_PLANE_TYPE_PRIMARY);
> + igt_assert(data.kms.primary.base != NULL);
> +
> data.kms.overlay_a.base = igt_output_get_plane_type_index(data.wb_output,
> DRM_PLANE_TYPE_OVERLAY, 0);
> + igt_assert(data.kms.overlay_a.base != NULL);
> +
> data.kms.overlay_b.base = igt_output_get_plane_type_index(data.wb_output,
> DRM_PLANE_TYPE_OVERLAY, 1);
> + igt_assert(data.kms.overlay_b.base != NULL);
>
> igt_assert_eq(igt_gettime(&then), 0);
>
>
> --
> 2.44.0
>
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-05-22 8:51 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 [this message]
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
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=Zk2x7nwtOnugJ2Io@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 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.