[PATCH 2/2] tests/chamelium/kms_chamelium_color: plug ports and prefer HDMI
Modem, Bhanuprakash
bhanuprakash.modem at intel.com
Mon Jun 24 13:22:04 UTC 2024
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 at intel.com>
> Signed-off-by: Kunal Joshi <kunal1.joshi at 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();
> }
>
More information about the igt-dev
mailing list