Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Kunal Joshi <kunal1.joshi@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] tests/chamelium/kms_chamelium_color: plug ports and prefer HDMI
Date: Mon, 24 Jun 2024 18:52:04 +0530	[thread overview]
Message-ID: <89a349a5-68ea-487e-8f1f-88864c557aec@intel.com> (raw)
In-Reply-To: <20240624071805.1356668-3-kunal1.joshi@intel.com>

Hi Kunal,

On 24-06-2024 12:48 pm, Kunal Joshi wrote:
> plug port before starting the test and prefer HDMI connector

Can you please add some info like why do we need to plug the port 
everytime before starting the subtest?

Also, please split this patch into 2:
1) plug port before starting the subtest
2) HDMI preference over DP

> as we face DP FSM issues on DP connector
> 
> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
> ---
>   tests/chamelium/kms_chamelium_color.c | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/tests/chamelium/kms_chamelium_color.c b/tests/chamelium/kms_chamelium_color.c
> index 4156023da..f8e80f350 100644
> --- a/tests/chamelium/kms_chamelium_color.c
> +++ b/tests/chamelium/kms_chamelium_color.c
> @@ -468,6 +468,19 @@ static int test_setup(data_t *data, enum pipe p)
>   
>   	data->primary = igt_pipe_get_plane_type(pipe, DRM_PLANE_TYPE_PRIMARY);
>   
> +	/*
> +	 * Prefer to run this test on HDMI connector if its connected, since on DP we
> +	 * sometimes face DP FSM issue
> +	 */
> +        for_each_valid_output_on_pipe(&data->display, p, data->output) {
> +                for (i = 0; i < data->port_count; i++) {
> +                        if ((data->output->config.connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
> +			    data->output->config.connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) &&
> +			    strcmp(data->output->name, chamelium_port_get_name(data->ports[i])) == 0)
> +                                return i;
> +                }
> +        }
> +
>   	for_each_valid_output_on_pipe(&data->display, p, data->output) {

We can drop this line to combine HDMI & DP checks in single loop.

- Bhanu

>   		for (i = 0; i < data->port_count; i++) {
>   			if (strcmp(data->output->name,
> @@ -709,6 +722,7 @@ run_tests_for_pipe(data_t *data)
>   
>   igt_main
>   {
> +	int i;
>   	data_t data = {};
>   
>   	igt_fixture {
> @@ -731,6 +745,9 @@ igt_main
>   		if (!data.port_count)
>   			igt_skip("No ports connected\n");
>   
> +		for( i = 0; i < data.port_count; i++)
> +			chamelium_plug(data.chamelium, data.ports[i]);
> +
>   		kmstest_set_vt_graphics_mode();
>   	}
>   

  reply	other threads:[~2024-06-24 13:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24  7:18 [PATCH 0/2] tests/chamelium: fixes for chamelium tests Kunal Joshi
2024-06-24  7:18 ` [PATCH 1/2] lib/igt_debugfs: handle xe driver as well Kunal Joshi
2024-06-24  8:07   ` Modem, Bhanuprakash
2024-06-24  7:18 ` [PATCH 2/2] tests/chamelium/kms_chamelium_color: plug ports and prefer HDMI Kunal Joshi
2024-06-24 13:22   ` Modem, Bhanuprakash [this message]
2024-06-24  8:17 ` ✓ Fi.CI.BAT: success for tests/chamelium: fixes for chamelium tests Patchwork
2024-06-24  8:44 ` ✓ CI.xeBAT: " Patchwork
2024-06-24 10:30 ` ✗ CI.xeFULL: failure " Patchwork
2024-06-25 11:31 ` ✗ Fi.CI.IGT: " 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=89a349a5-68ea-487e-8f1f-88864c557aec@intel.com \
    --to=bhanuprakash.modem@intel.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