Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
To: Kunal Joshi <kunal1.joshi@intel.com>, igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 1/2] tests/kms_bw: add subtest for only connected outputs
Date: Thu, 13 Jun 2024 10:48:04 -0400	[thread overview]
Message-ID: <b8b463d3-c60e-4ca4-bc6e-e223dbb092f8@amd.com> (raw)
In-Reply-To: <20240613130715.1008793-2-kunal1.joshi@intel.com>



On 6/13/24 9:07 AM, Kunal Joshi wrote:
> forcing DP connector doesn't work well and tests are skipping
> with unsupported mode, add new test which runs test on connected
> outputs only.
> 
> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>   tests/kms_bw.c | 41 +++++++++++++++++++++++++++++++++++------
>   1 file changed, 35 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/kms_bw.c b/tests/kms_bw.c
> index 05f7e79ad..bbf374612 100644
> --- a/tests/kms_bw.c
> +++ b/tests/kms_bw.c
> @@ -48,6 +48,19 @@
>    * @2560x1440p:       2560x1440 resolution
>    * @3840x2160p:       3840x2160 resolution
>    * @2160x1440p:       2160x1440 resolution
> + *
> + * SUBTEST: connected-linear-tiling-%d-displays-%s
> + * Description: bw test with %arg[2]
> + *
> + * arg[1].values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
> + *
> + * arg[2]:
> + *
> + * @1920x1080p:       1920x1080 resolution
> + * @2560x1440p:       2560x1440 resolution
> + * @3840x2160p:       3840x2160 resolution
> + * @2160x1440p:       2160x1440 resolution
> + *
>    */
>   
>   /* Common test data. */
> @@ -55,6 +68,7 @@ typedef struct data {
>           igt_display_t display;
>           igt_plane_t *primary[IGT_MAX_PIPES];
>           igt_output_t *output[IGT_MAX_PIPES];
> +	igt_output_t *connected_output[IGT_MAX_PIPES];
>           igt_pipe_t *pipe[IGT_MAX_PIPES];
>           igt_pipe_crc_t *pipe_crc[IGT_MAX_PIPES];
>           drmModeModeInfo mode[IGT_MAX_PIPES];
> @@ -62,6 +76,7 @@ typedef struct data {
>           int w[IGT_MAX_PIPES];
>           int h[IGT_MAX_PIPES];
>           int fd;
> +	int connected_outputs;
>   } data_t;
>   
>   static drmModeModeInfo test_mode[] = {
> @@ -108,6 +123,7 @@ static void test_init(data_t *data)
>   	igt_display_t *display = &data->display;
>   	int i, max_pipes = display->n_pipes;
>   	igt_output_t *output;
> +	data->connected_outputs = 0;
>   
>   	for_each_pipe(display, i) {
>   		data->pipe_id[i] = i;
> @@ -124,12 +140,12 @@ static void test_init(data_t *data)
>   			continue;
>   
>   		output = &display->outputs[i];
> -
>   		data->output[i] = output;
>   
>   		/* Only allow physically connected displays for the tests. */
>   		if (!igt_output_is_connected(output))
>   			continue;
> +		data->connected_output[data->connected_outputs++] = output;
>   
>   		igt_assert(kmstest_get_connector_default_mode(
>   			data->fd, output->config.connector, &data->mode[i]));
> @@ -173,7 +189,7 @@ static void force_output_mode(data_t *d, igt_output_t *output,
>   	igt_output_override_mode(output, mode);
>   }
>   
> -static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfo *mode) {
> +static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfo *mode, bool physical) {
>   	igt_display_t *display = &data->display;
>   	igt_output_t *output;
>   	struct igt_fb buffer[IGT_MAX_PIPES];
> @@ -189,11 +205,15 @@ static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfo
>   	igt_skip_on_f(pipe >= num_pipes,
>                         "ASIC does not have %d pipes\n", pipe);
>   
> +        igt_skip_on_f(physical && pipe > data->connected_outputs ,
> +                      "Only %d connected need %d pipes\n",data->connected_outputs, pipe);
> +
> +
>   	test_init(data);
>   
>   	/* create buffers */
>   	for (i = 0; i <= pipe; i++) {
> -		output = data->output[i];
> +		output = physical ? data->connected_output[i] : data->output[i];
>   		if (!output) {
>   			continue;
>   		}
> @@ -219,7 +239,7 @@ static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfo
>   	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
>   
>   	for (i = 0; i <= pipe; i++) {
> -		output = data->output[i];
> +		output = physical ? data->connected_output[i] : data->output[i];
>   		if (!output) {
>   			continue;
>   		}
> @@ -230,7 +250,7 @@ static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfo
>   	}
>   
>   	for (i = pipe; i >= 0; i--) {
> -		output = data->output[i];
> +		output = physical ? data->connected_output[i] : data->output[i];
>   		if (!output)
>   			continue;
>   
> @@ -265,10 +285,19 @@ igt_main
>   		for (j = 0; j < ARRAY_SIZE(test_mode); j++) {
>   			igt_subtest_f("linear-tiling-%d-displays-%s", i+1,
>   			      test_mode[j].name)
> -			run_test_linear_tiling(&data, i, &test_mode[j]);
> +			run_test_linear_tiling(&data, i, &test_mode[j], false);
>   		}
>   	}
>   
> +        for (i = 0; i < IGT_MAX_PIPES; i++) {
> +                for (j = 0; j < ARRAY_SIZE(test_mode); j++) {
> +                        igt_subtest_f("connected-linear-tiling-%d-displays-%s", i+1,
> +                              test_mode[j].name)
> +                        run_test_linear_tiling(&data, i, &test_mode[j], true);
> +                }
> +        }
> +
> +
>   	igt_fixture
>   	{
>   		igt_display_fini(&data.display);


Thanks! The patch is:

Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>

-- 


Thanks & Regards,
Aurabindo Pillai

  reply	other threads:[~2024-06-13 14:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-13 13:07 [PATCH i-g-t 0/2] add subtest in kms_bw for connected outputs only Kunal Joshi
2024-06-13 13:07 ` [PATCH i-g-t 1/2] tests/kms_bw: add subtest for only connected outputs Kunal Joshi
2024-06-13 14:48   ` Aurabindo Pillai [this message]
2024-06-13 13:07 ` [PATCH i-g-t 2/2] HAX patch do not merge Kunal Joshi
2024-06-13 14:23 ` ✓ CI.xeBAT: success for add subtest in kms_bw for connected outputs only Patchwork
2024-06-13 14:33 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-13 19:11 ` ✗ CI.xeFULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2024-06-17 16:10 [PATCH i-g-t 0/2] " Kunal Joshi
2024-06-17 16:10 ` [PATCH i-g-t 1/2] tests/kms_bw: add subtest for only connected outputs Kunal Joshi
2024-06-17 16:11   ` Pillai, Aurabindo
2024-06-19  8:04 [PATCH i-g-t 0/2] add subtest in kms_bw for connected outputs only Kunal Joshi
2024-06-19  8:04 ` [PATCH i-g-t 1/2] tests/kms_bw: add subtest for only connected outputs Kunal Joshi

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=b8b463d3-c60e-4ca4-bc6e-e223dbb092f8@amd.com \
    --to=aurabindo.pillai@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kunal1.joshi@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