All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
@ 2021-11-16 21:00 Rodrigo Siqueira
  2021-11-16 21:29 ` Mark Yacoub
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Rodrigo Siqueira @ 2021-11-16 21:00 UTC (permalink / raw)
  To: aurabindo.pillai, harry.wentland, markyacoub, nicholas.choi; +Cc: igt-dev

From: Aurabindo Pillai <aurabindo.pillai@amd.com>

Switching between different modes could potentially create pstate
warnings if clocks are not being set correctly.

The subtest gets the highest and lowest mode supported on the connector
and switch between them.

Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
---
 tests/amdgpu/amd_mode_switch.c | 210 +++++++++++++++++++++++++++++++++
 tests/amdgpu/meson.build       |   1 +
 2 files changed, 211 insertions(+)
 create mode 100644 tests/amdgpu/amd_mode_switch.c

diff --git a/tests/amdgpu/amd_mode_switch.c b/tests/amdgpu/amd_mode_switch.c
new file mode 100644
index 00000000..270b1b9f
--- /dev/null
+++ b/tests/amdgpu/amd_mode_switch.c
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2021 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "igt.h"
+#include <xf86drmMode.h>
+
+#define MAX_PIPES 6
+
+/* Common test data. */
+typedef struct data {
+	igt_display_t display;
+	igt_plane_t *primary[MAX_PIPES];
+	igt_output_t *output[MAX_PIPES];
+	int fd;
+} data_t;
+
+static void test_init(data_t *data)
+{
+	igt_display_t *display = &data->display;
+	int i;
+
+	for_each_pipe(display, i) {
+		igt_output_t *output = &display->outputs[i];
+
+		data->primary[i] = igt_pipe_get_plane_type(
+			&data->display.pipes[i], DRM_PLANE_TYPE_PRIMARY);
+
+		data->output[i] = output;
+	}
+
+	igt_require(data->output[0]);
+	igt_display_reset(display);
+}
+
+static void test_fini(data_t *data)
+{
+	igt_display_t *display = &data->display;
+
+	igt_display_reset(display);
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
+}
+
+/* Forces a mode for a connector. */
+static void force_output_mode(data_t *d, igt_output_t *output,
+			      const drmModeModeInfo *mode)
+{
+	/* This allows us to create a virtual sink. */
+	if (!igt_output_is_connected(output)) {
+		kmstest_force_edid(d->fd, output->config.connector,
+				   igt_kms_get_4k_edid());
+
+		kmstest_force_connector(d->fd, output->config.connector,
+					FORCE_CONNECTOR_DIGITAL);
+	}
+
+	igt_output_override_mode(output, mode);
+}
+
+static void run_mode_switch_first_last(data_t *data, int num_pipes)
+{
+	igt_output_t *output;
+	struct igt_fb *buffer1[MAX_PIPES] = { NULL };
+	struct igt_fb *buffer2[MAX_PIPES] = { NULL };
+	drmModeConnectorPtr conn;
+	drmModeModeInfoPtr kmode;
+	void *user_data = NULL;
+	int i = 0;
+	int j = 0;
+
+	test_init(data);
+
+	igt_skip_on_f(num_pipes > igt_display_get_n_pipes(&data->display) ||
+			      num_pipes > data->display.n_outputs,
+		      "ASIC does not have %d outputs/pipes\n", num_pipes);
+
+	/* First supported mode */
+
+	for (j = 0; j < num_pipes; j++) {
+		output = data->output[j];
+		if (!igt_output_is_connected(output))
+			continue;
+
+		conn = drmModeGetConnector(
+			data->fd, output->config.connector->connector_id);
+
+		kmode = &conn->modes[0];
+		if (buffer1[j] == NULL) {
+			igt_fb_t fb;
+			buffer1[j] = &fb;
+			igt_create_color_fb(data->fd, kmode->hdisplay,
+					    kmode->vdisplay,
+					    DRM_FORMAT_XRGB8888,
+					    DRM_FORMAT_MOD_NONE, 1.f, 0.f,
+					    0.f, buffer1[j]);
+		}
+		igt_output_set_pipe(output, j);
+		force_output_mode(data, output, kmode);
+		igt_plane_set_fb(data->primary[j], buffer1[j]);
+		drmModeFreeConnector(conn);
+	}
+
+	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+				  user_data);
+
+	/* Last supported mode */
+
+	for (j = 0; j < num_pipes; j++) {
+		output = data->output[j];
+		if (!igt_output_is_connected(output))
+			continue;
+
+		conn = drmModeGetConnector(
+			data->fd, output->config.connector->connector_id);
+
+		kmode = &conn->modes[conn->count_modes - 1];
+		if (buffer2[j] == NULL) {
+			igt_fb_t fb;
+			buffer2[j] = &fb;
+			igt_create_color_fb(data->fd, kmode->hdisplay,
+					    kmode->vdisplay,
+					    DRM_FORMAT_XRGB8888,
+					    DRM_FORMAT_MOD_NONE, 1.f, 0.f,
+					    0.f, buffer2[j]);
+		}
+		force_output_mode(data, output, kmode);
+		igt_plane_set_fb(data->primary[j], buffer2[j]);
+		drmModeFreeConnector(conn);
+	}
+
+	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+				  user_data);
+
+	/* First supported again */
+	for (j = 0; j < num_pipes; j++) {
+		output = data->output[j];
+		if (!igt_output_is_connected(output))
+			continue;
+
+		conn = drmModeGetConnector(
+			data->fd, output->config.connector->connector_id);
+
+		kmode = &conn->modes[0];
+		force_output_mode(data, output, kmode);
+		igt_plane_set_fb(data->primary[j], buffer1[j]);
+		drmModeFreeConnector(conn);
+	}
+
+	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
+				  user_data);
+
+	test_fini(data);
+
+	for (i = 0; i <= num_pipes; i++) {
+		igt_remove_fb(data->fd, buffer1[i]);
+		igt_remove_fb(data->fd, buffer2[i]);
+	}
+}
+
+IGT_TEST_DESCRIPTION("Test switching between supported modes");
+igt_main
+{
+	data_t data;
+	int i = 0;
+
+	igt_skip_on_simulation();
+
+	memset(&data, 0, sizeof(data));
+
+	igt_fixture
+	{
+		data.fd = drm_open_driver_master(DRIVER_AMDGPU);
+
+		kmstest_set_vt_graphics_mode();
+
+		igt_display_require(&data.display, data.fd);
+		igt_require(&data.display.is_atomic);
+		igt_display_require_output(&data.display);
+	}
+
+	for (i = 0; i < MAX_PIPES; i++) {
+		igt_describe(
+			"Test between switching highest and lowest supported mode");
+		igt_subtest_f("mode-switch-first-last-pipe-%d", i)
+			run_mode_switch_first_last(&data, i + 1);
+	}
+
+	igt_fixture
+	{
+		igt_display_fini(&data.display);
+	}
+}
diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
index b736c456..5216e194 100644
--- a/tests/amdgpu/meson.build
+++ b/tests/amdgpu/meson.build
@@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
 			  'amd_mem_leak',
 			  'amd_link_settings',
 			  'amd_vrr_range',
+			  'amd_mode_switch',
 			]
 	amdgpu_deps += libdrm_amdgpu
 endif
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
@ 2021-11-16 21:29 ` Mark Yacoub
  2021-11-16 22:05   ` Juha-Pekka Heikkilä
  2021-11-16 23:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Mark Yacoub @ 2021-11-16 21:29 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev, markyacoub

The test looks pretty generic to me, can we make it a kms_ instead of AMD only?

On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira
<Rodrigo.Siqueira@amd.com> wrote:
>
> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>
> Switching between different modes could potentially create pstate
> warnings if clocks are not being set correctly.
>
> The subtest gets the highest and lowest mode supported on the connector
> and switch between them.
>
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> ---
>  tests/amdgpu/amd_mode_switch.c | 210 +++++++++++++++++++++++++++++++++
>  tests/amdgpu/meson.build       |   1 +
>  2 files changed, 211 insertions(+)
>  create mode 100644 tests/amdgpu/amd_mode_switch.c
>
> diff --git a/tests/amdgpu/amd_mode_switch.c b/tests/amdgpu/amd_mode_switch.c
> new file mode 100644
> index 00000000..270b1b9f
> --- /dev/null
> +++ b/tests/amdgpu/amd_mode_switch.c
> @@ -0,0 +1,210 @@
> +/*
> + * Copyright 2021 Advanced Micro Devices, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#include "igt.h"
> +#include <xf86drmMode.h>
> +
> +#define MAX_PIPES 6
> +
> +/* Common test data. */
> +typedef struct data {
> +       igt_display_t display;
> +       igt_plane_t *primary[MAX_PIPES];
> +       igt_output_t *output[MAX_PIPES];
> +       int fd;
> +} data_t;
> +
> +static void test_init(data_t *data)
> +{
> +       igt_display_t *display = &data->display;
> +       int i;
> +
> +       for_each_pipe(display, i) {
> +               igt_output_t *output = &display->outputs[i];
> +
> +               data->primary[i] = igt_pipe_get_plane_type(
> +                       &data->display.pipes[i], DRM_PLANE_TYPE_PRIMARY);
> +
> +               data->output[i] = output;
> +       }
> +
> +       igt_require(data->output[0]);
> +       igt_display_reset(display);
> +}
> +
> +static void test_fini(data_t *data)
> +{
> +       igt_display_t *display = &data->display;
> +
> +       igt_display_reset(display);
> +       igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
> +}
> +
> +/* Forces a mode for a connector. */
> +static void force_output_mode(data_t *d, igt_output_t *output,
> +                             const drmModeModeInfo *mode)
> +{
> +       /* This allows us to create a virtual sink. */
> +       if (!igt_output_is_connected(output)) {
> +               kmstest_force_edid(d->fd, output->config.connector,
> +                                  igt_kms_get_4k_edid());
> +
> +               kmstest_force_connector(d->fd, output->config.connector,
> +                                       FORCE_CONNECTOR_DIGITAL);
> +       }
> +
> +       igt_output_override_mode(output, mode);
> +}
> +
> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
> +{
> +       igt_output_t *output;
> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
> +       drmModeConnectorPtr conn;
> +       drmModeModeInfoPtr kmode;
> +       void *user_data = NULL;
> +       int i = 0;
> +       int j = 0;
> +
> +       test_init(data);
> +
> +       igt_skip_on_f(num_pipes > igt_display_get_n_pipes(&data->display) ||
> +                             num_pipes > data->display.n_outputs,
> +                     "ASIC does not have %d outputs/pipes\n", num_pipes);
> +
> +       /* First supported mode */
> +
> +       for (j = 0; j < num_pipes; j++) {
> +               output = data->output[j];
> +               if (!igt_output_is_connected(output))
> +                       continue;
> +
> +               conn = drmModeGetConnector(
> +                       data->fd, output->config.connector->connector_id);
> +
> +               kmode = &conn->modes[0];
> +               if (buffer1[j] == NULL) {
> +                       igt_fb_t fb;
> +                       buffer1[j] = &fb;
> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
> +                                           kmode->vdisplay,
> +                                           DRM_FORMAT_XRGB8888,
> +                                           DRM_FORMAT_MOD_NONE, 1.f, 0.f,
> +                                           0.f, buffer1[j]);
> +               }
> +               igt_output_set_pipe(output, j);
> +               force_output_mode(data, output, kmode);
> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
> +               drmModeFreeConnector(conn);
> +       }
> +
> +       igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +                                 user_data);
> +
> +       /* Last supported mode */
> +
> +       for (j = 0; j < num_pipes; j++) {
> +               output = data->output[j];
> +               if (!igt_output_is_connected(output))
> +                       continue;
> +
> +               conn = drmModeGetConnector(
> +                       data->fd, output->config.connector->connector_id);
> +
> +               kmode = &conn->modes[conn->count_modes - 1];
> +               if (buffer2[j] == NULL) {
> +                       igt_fb_t fb;
> +                       buffer2[j] = &fb;
> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
> +                                           kmode->vdisplay,
> +                                           DRM_FORMAT_XRGB8888,
> +                                           DRM_FORMAT_MOD_NONE, 1.f, 0.f,
> +                                           0.f, buffer2[j]);
> +               }
> +               force_output_mode(data, output, kmode);
> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
> +               drmModeFreeConnector(conn);
> +       }
> +
> +       igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +                                 user_data);
> +
> +       /* First supported again */
> +       for (j = 0; j < num_pipes; j++) {
> +               output = data->output[j];
> +               if (!igt_output_is_connected(output))
> +                       continue;
> +
> +               conn = drmModeGetConnector(
> +                       data->fd, output->config.connector->connector_id);
> +
> +               kmode = &conn->modes[0];
> +               force_output_mode(data, output, kmode);
> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
> +               drmModeFreeConnector(conn);
> +       }
> +
> +       igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +                                 user_data);
> +
> +       test_fini(data);
> +
> +       for (i = 0; i <= num_pipes; i++) {
> +               igt_remove_fb(data->fd, buffer1[i]);
> +               igt_remove_fb(data->fd, buffer2[i]);
> +       }
> +}
> +
> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
> +igt_main
> +{
> +       data_t data;
> +       int i = 0;
> +
> +       igt_skip_on_simulation();
> +
> +       memset(&data, 0, sizeof(data));
> +
> +       igt_fixture
> +       {
> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
> +
> +               kmstest_set_vt_graphics_mode();
> +
> +               igt_display_require(&data.display, data.fd);
> +               igt_require(&data.display.is_atomic);
> +               igt_display_require_output(&data.display);
> +       }
> +
> +       for (i = 0; i < MAX_PIPES; i++) {
> +               igt_describe(
> +                       "Test between switching highest and lowest supported mode");
> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
> +                       run_mode_switch_first_last(&data, i + 1);
> +       }
> +
> +       igt_fixture
> +       {
> +               igt_display_fini(&data.display);
> +       }
> +}
> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
> index b736c456..5216e194 100644
> --- a/tests/amdgpu/meson.build
> +++ b/tests/amdgpu/meson.build
> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>                           'amd_mem_leak',
>                           'amd_link_settings',
>                           'amd_vrr_range',
> +                         'amd_mode_switch',
>                         ]
>         amdgpu_deps += libdrm_amdgpu
>  endif
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:29 ` Mark Yacoub
@ 2021-11-16 22:05   ` Juha-Pekka Heikkilä
  2021-11-19 14:47     ` Rodrigo Siqueira Jordao
  0 siblings, 1 reply; 14+ messages in thread
From: Juha-Pekka Heikkilä @ 2021-11-16 22:05 UTC (permalink / raw)
  To: Mark Yacoub, Rodrigo Siqueira; +Cc: igt-dev, markyacoub

I was wondering how is this different from kms_plane_lowres? On 
kms_plane_lowres is also used crc to check also what's on screen stay good.

/Juha-Pekka

Mark Yacoub kirjoitti 16.11.2021 klo 23.29:
> The test looks pretty generic to me, can we make it a kms_ instead of AMD only?
> 
> On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira
> <Rodrigo.Siqueira@amd.com> wrote:
>>
>> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>
>> Switching between different modes could potentially create pstate
>> warnings if clocks are not being set correctly.
>>
>> The subtest gets the highest and lowest mode supported on the connector
>> and switch between them.
>>
>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
>> ---
>>   tests/amdgpu/amd_mode_switch.c | 210 +++++++++++++++++++++++++++++++++
>>   tests/amdgpu/meson.build       |   1 +
>>   2 files changed, 211 insertions(+)
>>   create mode 100644 tests/amdgpu/amd_mode_switch.c
>>
>> diff --git a/tests/amdgpu/amd_mode_switch.c b/tests/amdgpu/amd_mode_switch.c
>> new file mode 100644
>> index 00000000..270b1b9f
>> --- /dev/null
>> +++ b/tests/amdgpu/amd_mode_switch.c
>> @@ -0,0 +1,210 @@
>> +/*
>> + * Copyright 2021 Advanced Micro Devices, Inc.
>> + *
>> + * Permission is hereby granted, free of charge, to any person obtaining a
>> + * copy of this software and associated documentation files (the "Software"),
>> + * to deal in the Software without restriction, including without limitation
>> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
>> + * and/or sell copies of the Software, and to permit persons to whom the
>> + * Software is furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be included in
>> + * all copies or substantial portions of the Software.
>> + *
>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + * OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +#include "igt.h"
>> +#include <xf86drmMode.h>
>> +
>> +#define MAX_PIPES 6
>> +
>> +/* Common test data. */
>> +typedef struct data {
>> +       igt_display_t display;
>> +       igt_plane_t *primary[MAX_PIPES];
>> +       igt_output_t *output[MAX_PIPES];
>> +       int fd;
>> +} data_t;
>> +
>> +static void test_init(data_t *data)
>> +{
>> +       igt_display_t *display = &data->display;
>> +       int i;
>> +
>> +       for_each_pipe(display, i) {
>> +               igt_output_t *output = &display->outputs[i];
>> +
>> +               data->primary[i] = igt_pipe_get_plane_type(
>> +                       &data->display.pipes[i], DRM_PLANE_TYPE_PRIMARY);
>> +
>> +               data->output[i] = output;
>> +       }
>> +
>> +       igt_require(data->output[0]);
>> +       igt_display_reset(display);
>> +}
>> +
>> +static void test_fini(data_t *data)
>> +{
>> +       igt_display_t *display = &data->display;
>> +
>> +       igt_display_reset(display);
>> +       igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
>> +}
>> +
>> +/* Forces a mode for a connector. */
>> +static void force_output_mode(data_t *d, igt_output_t *output,
>> +                             const drmModeModeInfo *mode)
>> +{
>> +       /* This allows us to create a virtual sink. */
>> +       if (!igt_output_is_connected(output)) {
>> +               kmstest_force_edid(d->fd, output->config.connector,
>> +                                  igt_kms_get_4k_edid());
>> +
>> +               kmstest_force_connector(d->fd, output->config.connector,
>> +                                       FORCE_CONNECTOR_DIGITAL);
>> +       }
>> +
>> +       igt_output_override_mode(output, mode);
>> +}
>> +
>> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
>> +{
>> +       igt_output_t *output;
>> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
>> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
>> +       drmModeConnectorPtr conn;
>> +       drmModeModeInfoPtr kmode;
>> +       void *user_data = NULL;
>> +       int i = 0;
>> +       int j = 0;
>> +
>> +       test_init(data);
>> +
>> +       igt_skip_on_f(num_pipes > igt_display_get_n_pipes(&data->display) ||
>> +                             num_pipes > data->display.n_outputs,
>> +                     "ASIC does not have %d outputs/pipes\n", num_pipes);
>> +
>> +       /* First supported mode */
>> +
>> +       for (j = 0; j < num_pipes; j++) {
>> +               output = data->output[j];
>> +               if (!igt_output_is_connected(output))
>> +                       continue;
>> +
>> +               conn = drmModeGetConnector(
>> +                       data->fd, output->config.connector->connector_id);
>> +
>> +               kmode = &conn->modes[0];
>> +               if (buffer1[j] == NULL) {
>> +                       igt_fb_t fb;
>> +                       buffer1[j] = &fb;
>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>> +                                           kmode->vdisplay,
>> +                                           DRM_FORMAT_XRGB8888,
>> +                                           DRM_FORMAT_MOD_NONE, 1.f, 0.f,
>> +                                           0.f, buffer1[j]);
>> +               }
>> +               igt_output_set_pipe(output, j);
>> +               force_output_mode(data, output, kmode);
>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>> +               drmModeFreeConnector(conn);
>> +       }
>> +
>> +       igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
>> +                                 user_data);
>> +
>> +       /* Last supported mode */
>> +
>> +       for (j = 0; j < num_pipes; j++) {
>> +               output = data->output[j];
>> +               if (!igt_output_is_connected(output))
>> +                       continue;
>> +
>> +               conn = drmModeGetConnector(
>> +                       data->fd, output->config.connector->connector_id);
>> +
>> +               kmode = &conn->modes[conn->count_modes - 1];
>> +               if (buffer2[j] == NULL) {
>> +                       igt_fb_t fb;
>> +                       buffer2[j] = &fb;
>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>> +                                           kmode->vdisplay,
>> +                                           DRM_FORMAT_XRGB8888,
>> +                                           DRM_FORMAT_MOD_NONE, 1.f, 0.f,
>> +                                           0.f, buffer2[j]);
>> +               }
>> +               force_output_mode(data, output, kmode);
>> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
>> +               drmModeFreeConnector(conn);
>> +       }
>> +
>> +       igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
>> +                                 user_data);
>> +
>> +       /* First supported again */
>> +       for (j = 0; j < num_pipes; j++) {
>> +               output = data->output[j];
>> +               if (!igt_output_is_connected(output))
>> +                       continue;
>> +
>> +               conn = drmModeGetConnector(
>> +                       data->fd, output->config.connector->connector_id);
>> +
>> +               kmode = &conn->modes[0];
>> +               force_output_mode(data, output, kmode);
>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>> +               drmModeFreeConnector(conn);
>> +       }
>> +
>> +       igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
>> +                                 user_data);
>> +
>> +       test_fini(data);
>> +
>> +       for (i = 0; i <= num_pipes; i++) {
>> +               igt_remove_fb(data->fd, buffer1[i]);
>> +               igt_remove_fb(data->fd, buffer2[i]);
>> +       }
>> +}
>> +
>> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
>> +igt_main
>> +{
>> +       data_t data;
>> +       int i = 0;
>> +
>> +       igt_skip_on_simulation();
>> +
>> +       memset(&data, 0, sizeof(data));
>> +
>> +       igt_fixture
>> +       {
>> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
>> +
>> +               kmstest_set_vt_graphics_mode();
>> +
>> +               igt_display_require(&data.display, data.fd);
>> +               igt_require(&data.display.is_atomic);
>> +               igt_display_require_output(&data.display);
>> +       }
>> +
>> +       for (i = 0; i < MAX_PIPES; i++) {
>> +               igt_describe(
>> +                       "Test between switching highest and lowest supported mode");
>> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
>> +                       run_mode_switch_first_last(&data, i + 1);
>> +       }
>> +
>> +       igt_fixture
>> +       {
>> +               igt_display_fini(&data.display);
>> +       }
>> +}
>> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
>> index b736c456..5216e194 100644
>> --- a/tests/amdgpu/meson.build
>> +++ b/tests/amdgpu/meson.build
>> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>>                            'amd_mem_leak',
>>                            'amd_link_settings',
>>                            'amd_vrr_range',
>> +                         'amd_mode_switch',
>>                          ]
>>          amdgpu_deps += libdrm_amdgpu
>>   endif
>> --
>> 2.25.1
>>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
  2021-11-16 21:29 ` Mark Yacoub
@ 2021-11-16 23:28 ` Patchwork
  2021-11-19 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2021-11-16 23:28 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 6153 bytes --]

== Series Details ==

Series: amdgpu/amd_mode_switch: Introduce mode switch test
URL   : https://patchwork.freedesktop.org/series/96996/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10888 -> IGTPW_6408
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_6408 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_6408, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

Participating hosts (39 -> 33)
------------------------------

  Additional (1): fi-kbl-soraka 
  Missing    (7): fi-ilk-m540 bat-dg1-6 fi-tgl-u2 fi-hsw-4200u fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_6408:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-skl-6600u:       [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-skl-6600u/igt@gem_exec_suspend@basic-s3.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-skl-6600u/igt@gem_exec_suspend@basic-s3.html

  
Known issues
------------

  Here are the changes found in IGTPW_6408 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fence@basic-busy@bcs0:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][3] ([fdo#109271]) +8 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@gem_exec_fence@basic-busy@bcs0.html

  * igt@gem_exec_suspend@basic-s0:
    - fi-tgl-1115g4:      [PASS][4] -> [FAIL][5] ([i915#1888])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0.html

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html

  * igt@i915_selftest@live@gt_pm:
    - fi-kbl-soraka:      NOTRUN -> [DMESG-FAIL][7] ([i915#1886] / [i915#2291])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][8] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#533])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-bdw-5557u:       [PASS][10] -> [INCOMPLETE][11] ([i915#146])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-bdw-5557u/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-bdw-5557u/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@runner@aborted:
    - fi-skl-6600u:       NOTRUN -> [FAIL][12] ([i915#3363] / [i915#4312])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-skl-6600u/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - {fi-hsw-gt1}:       [DMESG-WARN][13] ([i915#3303]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-hsw-gt1/igt@i915_selftest@live@hangcheck.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-hsw-gt1/igt@i915_selftest@live@hangcheck.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-cml-u2:          [DMESG-WARN][15] ([i915#4269]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
  [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6281 -> IGTPW_6408

  CI-20190529: 20190529
  CI_DRM_10888: d4a23275467825243fea6f50938fc89711b9a53c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6408: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html
  IGT_6281: 551f33d68fc780e3d264abd69ec59fe1af1bb65b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git



== Testlist changes ==

+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-0
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-1
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-2
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-3
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-4
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-5

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

[-- Attachment #2: Type: text/html, Size: 7277 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 22:05   ` Juha-Pekka Heikkilä
@ 2021-11-19 14:47     ` Rodrigo Siqueira Jordao
  2021-11-19 15:48       ` Mark Yacoub
                         ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Rodrigo Siqueira Jordao @ 2021-11-19 14:47 UTC (permalink / raw)
  To: Juha-Pekka Heikkilä,
	Mark Yacoub, Rodrigo Siqueira, Vudum, Lakshminarayana
  Cc: igt-dev, markyacoub

Hi,

On 2021-11-16 5:05 p.m., Juha-Pekka Heikkilä wrote:
> I was wondering how is this different from kms_plane_lowres? On 
> kms_plane_lowres is also used crc to check also what's on screen stay good.

Afaik, we ignore kms_plane_lowres since most tests look related to 
tiling-[x|y], which I think is an Intel modifier (again, maybe I'm 
wrong). Anyway, I tried to run it on an AMD device, and most 
kms_plane_lowres subtest skips.

> /Juha-Pekka
> 
> Mark Yacoub kirjoitti 16.11.2021 klo 23.29:
>> The test looks pretty generic to me, can we make it a kms_ instead of 
>> AMD only?

Mark, Juha-Pekka,

Tbh, right now, I prefer to keep this test as AMD-specific because we 
are trying to fully upstream all of our tests, so we can rely on igt 
from the upstream. I can create a README file for amdgpu tests and 
create a TODO section where I can highlight that we can make this test 
and other generic; how about that?

Hi Lakshmi,

This test is specific to AMD, but CI is failing. I think it is another 
false-positive. Here is the patch:

https://patchwork.freedesktop.org/series/96996/

Thanks
Siqueira

>> On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira
>> <Rodrigo.Siqueira@amd.com> wrote:
>>>
>>> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>>
>>> Switching between different modes could potentially create pstate
>>> warnings if clocks are not being set correctly.
>>>
>>> The subtest gets the highest and lowest mode supported on the connector
>>> and switch between them.
>>>
>>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>>> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>> ---
>>>   tests/amdgpu/amd_mode_switch.c | 210 +++++++++++++++++++++++++++++++++
>>>   tests/amdgpu/meson.build       |   1 +
>>>   2 files changed, 211 insertions(+)
>>>   create mode 100644 tests/amdgpu/amd_mode_switch.c
>>>
>>> diff --git a/tests/amdgpu/amd_mode_switch.c 
>>> b/tests/amdgpu/amd_mode_switch.c
>>> new file mode 100644
>>> index 00000000..270b1b9f
>>> --- /dev/null
>>> +++ b/tests/amdgpu/amd_mode_switch.c
>>> @@ -0,0 +1,210 @@
>>> +/*
>>> + * Copyright 2021 Advanced Micro Devices, Inc.
>>> + *
>>> + * Permission is hereby granted, free of charge, to any person 
>>> obtaining a
>>> + * copy of this software and associated documentation files (the 
>>> "Software"),
>>> + * to deal in the Software without restriction, including without 
>>> limitation
>>> + * the rights to use, copy, modify, merge, publish, distribute, 
>>> sublicense,
>>> + * and/or sell copies of the Software, and to permit persons to whom 
>>> the
>>> + * Software is furnished to do so, subject to the following conditions:
>>> + *
>>> + * The above copyright notice and this permission notice shall be 
>>> included in
>>> + * all copies or substantial portions of the Software.
>>> + *
>>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
>>> EXPRESS OR
>>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
>>> MERCHANTABILITY,
>>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO 
>>> EVENT SHALL
>>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, 
>>> DAMAGES OR
>>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
>>> OTHERWISE,
>>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 
>>> USE OR
>>> + * OTHER DEALINGS IN THE SOFTWARE.
>>> + */
>>> +
>>> +#include "igt.h"
>>> +#include <xf86drmMode.h>
>>> +
>>> +#define MAX_PIPES 6
>>> +
>>> +/* Common test data. */
>>> +typedef struct data {
>>> +       igt_display_t display;
>>> +       igt_plane_t *primary[MAX_PIPES];
>>> +       igt_output_t *output[MAX_PIPES];
>>> +       int fd;
>>> +} data_t;
>>> +
>>> +static void test_init(data_t *data)
>>> +{
>>> +       igt_display_t *display = &data->display;
>>> +       int i;
>>> +
>>> +       for_each_pipe(display, i) {
>>> +               igt_output_t *output = &display->outputs[i];
>>> +
>>> +               data->primary[i] = igt_pipe_get_plane_type(
>>> +                       &data->display.pipes[i], 
>>> DRM_PLANE_TYPE_PRIMARY);
>>> +
>>> +               data->output[i] = output;
>>> +       }
>>> +
>>> +       igt_require(data->output[0]);
>>> +       igt_display_reset(display);
>>> +}
>>> +
>>> +static void test_fini(data_t *data)
>>> +{
>>> +       igt_display_t *display = &data->display;
>>> +
>>> +       igt_display_reset(display);
>>> +       igt_display_commit_atomic(display, 
>>> DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
>>> +}
>>> +
>>> +/* Forces a mode for a connector. */
>>> +static void force_output_mode(data_t *d, igt_output_t *output,
>>> +                             const drmModeModeInfo *mode)
>>> +{
>>> +       /* This allows us to create a virtual sink. */
>>> +       if (!igt_output_is_connected(output)) {
>>> +               kmstest_force_edid(d->fd, output->config.connector,
>>> +                                  igt_kms_get_4k_edid());
>>> +
>>> +               kmstest_force_connector(d->fd, output->config.connector,
>>> +                                       FORCE_CONNECTOR_DIGITAL);
>>> +       }
>>> +
>>> +       igt_output_override_mode(output, mode);
>>> +}
>>> +
>>> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
>>> +{
>>> +       igt_output_t *output;
>>> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
>>> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
>>> +       drmModeConnectorPtr conn;
>>> +       drmModeModeInfoPtr kmode;
>>> +       void *user_data = NULL;
>>> +       int i = 0;
>>> +       int j = 0;
>>> +
>>> +       test_init(data);
>>> +
>>> +       igt_skip_on_f(num_pipes > 
>>> igt_display_get_n_pipes(&data->display) ||
>>> +                             num_pipes > data->display.n_outputs,
>>> +                     "ASIC does not have %d outputs/pipes\n", 
>>> num_pipes);
>>> +
>>> +       /* First supported mode */
>>> +
>>> +       for (j = 0; j < num_pipes; j++) {
>>> +               output = data->output[j];
>>> +               if (!igt_output_is_connected(output))
>>> +                       continue;
>>> +
>>> +               conn = drmModeGetConnector(
>>> +                       data->fd, 
>>> output->config.connector->connector_id);
>>> +
>>> +               kmode = &conn->modes[0];
>>> +               if (buffer1[j] == NULL) {
>>> +                       igt_fb_t fb;
>>> +                       buffer1[j] = &fb;
>>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>>> +                                           kmode->vdisplay,
>>> +                                           DRM_FORMAT_XRGB8888,
>>> +                                           DRM_FORMAT_MOD_NONE, 1.f, 
>>> 0.f,
>>> +                                           0.f, buffer1[j]);
>>> +               }
>>> +               igt_output_set_pipe(output, j);
>>> +               force_output_mode(data, output, kmode);
>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>> +               drmModeFreeConnector(conn);
>>> +       }
>>> +
>>> +       igt_display_commit_atomic(&data->display, 
>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>> +                                 user_data);
>>> +
>>> +       /* Last supported mode */
>>> +
>>> +       for (j = 0; j < num_pipes; j++) {
>>> +               output = data->output[j];
>>> +               if (!igt_output_is_connected(output))
>>> +                       continue;
>>> +
>>> +               conn = drmModeGetConnector(
>>> +                       data->fd, 
>>> output->config.connector->connector_id);
>>> +
>>> +               kmode = &conn->modes[conn->count_modes - 1];
>>> +               if (buffer2[j] == NULL) {
>>> +                       igt_fb_t fb;
>>> +                       buffer2[j] = &fb;
>>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>>> +                                           kmode->vdisplay,
>>> +                                           DRM_FORMAT_XRGB8888,
>>> +                                           DRM_FORMAT_MOD_NONE, 1.f, 
>>> 0.f,
>>> +                                           0.f, buffer2[j]);
>>> +               }
>>> +               force_output_mode(data, output, kmode);
>>> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
>>> +               drmModeFreeConnector(conn);
>>> +       }
>>> +
>>> +       igt_display_commit_atomic(&data->display, 
>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>> +                                 user_data);
>>> +
>>> +       /* First supported again */
>>> +       for (j = 0; j < num_pipes; j++) {
>>> +               output = data->output[j];
>>> +               if (!igt_output_is_connected(output))
>>> +                       continue;
>>> +
>>> +               conn = drmModeGetConnector(
>>> +                       data->fd, 
>>> output->config.connector->connector_id);
>>> +
>>> +               kmode = &conn->modes[0];
>>> +               force_output_mode(data, output, kmode);
>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>> +               drmModeFreeConnector(conn);
>>> +       }
>>> +
>>> +       igt_display_commit_atomic(&data->display, 
>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>> +                                 user_data);
>>> +
>>> +       test_fini(data);
>>> +
>>> +       for (i = 0; i <= num_pipes; i++) {
>>> +               igt_remove_fb(data->fd, buffer1[i]);
>>> +               igt_remove_fb(data->fd, buffer2[i]);
>>> +       }
>>> +}
>>> +
>>> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
>>> +igt_main
>>> +{
>>> +       data_t data;
>>> +       int i = 0;
>>> +
>>> +       igt_skip_on_simulation();
>>> +
>>> +       memset(&data, 0, sizeof(data));
>>> +
>>> +       igt_fixture
>>> +       {
>>> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
>>> +
>>> +               kmstest_set_vt_graphics_mode();
>>> +
>>> +               igt_display_require(&data.display, data.fd);
>>> +               igt_require(&data.display.is_atomic);
>>> +               igt_display_require_output(&data.display);
>>> +       }
>>> +
>>> +       for (i = 0; i < MAX_PIPES; i++) {
>>> +               igt_describe(
>>> +                       "Test between switching highest and lowest 
>>> supported mode");
>>> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
>>> +                       run_mode_switch_first_last(&data, i + 1);
>>> +       }
>>> +
>>> +       igt_fixture
>>> +       {
>>> +               igt_display_fini(&data.display);
>>> +       }
>>> +}
>>> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
>>> index b736c456..5216e194 100644
>>> --- a/tests/amdgpu/meson.build
>>> +++ b/tests/amdgpu/meson.build
>>> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>>>                            'amd_mem_leak',
>>>                            'amd_link_settings',
>>>                            'amd_vrr_range',
>>> +                         'amd_mode_switch',
>>>                          ]
>>>          amdgpu_deps += libdrm_amdgpu
>>>   endif
>>> -- 
>>> 2.25.1
>>>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-19 14:47     ` Rodrigo Siqueira Jordao
@ 2021-11-19 15:48       ` Mark Yacoub
  2021-11-19 15:51       ` Juha-Pekka Heikkila
  2021-11-19 17:25       ` Vudum, Lakshminarayana
  2 siblings, 0 replies; 14+ messages in thread
From: Mark Yacoub @ 2021-11-19 15:48 UTC (permalink / raw)
  To: Rodrigo Siqueira Jordao; +Cc: Vudum, Lakshminarayana, igt-dev, markyacoub

On Fri, Nov 19, 2021 at 9:47 AM Rodrigo Siqueira Jordao
<rjordrigo@amd.com> wrote:
>
> Hi,
>
> On 2021-11-16 5:05 p.m., Juha-Pekka Heikkilä wrote:
> > I was wondering how is this different from kms_plane_lowres? On
> > kms_plane_lowres is also used crc to check also what's on screen stay good.
>
> Afaik, we ignore kms_plane_lowres since most tests look related to
> tiling-[x|y], which I think is an Intel modifier (again, maybe I'm
> wrong). Anyway, I tried to run it on an AMD device, and most
> kms_plane_lowres subtest skips.
>
> > /Juha-Pekka
> >
> > Mark Yacoub kirjoitti 16.11.2021 klo 23.29:
> >> The test looks pretty generic to me, can we make it a kms_ instead of
> >> AMD only?
>
> Mark, Juha-Pekka,
>
> Tbh, right now, I prefer to keep this test as AMD-specific because we
> are trying to fully upstream all of our tests, so we can rely on igt
> from the upstream. I can create a README file for amdgpu tests and
> create a TODO section where I can highlight that we can make this test
> and other generic; how about that?
A TODO section sounds good to me on Chromium end.
>
> Hi Lakshmi,
>
> This test is specific to AMD, but CI is failing. I think it is another
> false-positive. Here is the patch:
>
> https://patchwork.freedesktop.org/series/96996/
>
> Thanks
> Siqueira
>
> >> On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira
> >> <Rodrigo.Siqueira@amd.com> wrote:
> >>>
> >>> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
> >>>
> >>> Switching between different modes could potentially create pstate
> >>> warnings if clocks are not being set correctly.
> >>>
> >>> The subtest gets the highest and lowest mode supported on the connector
> >>> and switch between them.
> >>>
> >>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> >>> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> >>> ---
> >>>   tests/amdgpu/amd_mode_switch.c | 210 +++++++++++++++++++++++++++++++++
> >>>   tests/amdgpu/meson.build       |   1 +
> >>>   2 files changed, 211 insertions(+)
> >>>   create mode 100644 tests/amdgpu/amd_mode_switch.c
> >>>
> >>> diff --git a/tests/amdgpu/amd_mode_switch.c
> >>> b/tests/amdgpu/amd_mode_switch.c
> >>> new file mode 100644
> >>> index 00000000..270b1b9f
> >>> --- /dev/null
> >>> +++ b/tests/amdgpu/amd_mode_switch.c
> >>> @@ -0,0 +1,210 @@
> >>> +/*
> >>> + * Copyright 2021 Advanced Micro Devices, Inc.
> >>> + *
> >>> + * Permission is hereby granted, free of charge, to any person
> >>> obtaining a
> >>> + * copy of this software and associated documentation files (the
> >>> "Software"),
> >>> + * to deal in the Software without restriction, including without
> >>> limitation
> >>> + * the rights to use, copy, modify, merge, publish, distribute,
> >>> sublicense,
> >>> + * and/or sell copies of the Software, and to permit persons to whom
> >>> the
> >>> + * Software is furnished to do so, subject to the following conditions:
> >>> + *
> >>> + * The above copyright notice and this permission notice shall be
> >>> included in
> >>> + * all copies or substantial portions of the Software.
> >>> + *
> >>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> >>> EXPRESS OR
> >>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> >>> MERCHANTABILITY,
> >>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO
> >>> EVENT SHALL
> >>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM,
> >>> DAMAGES OR
> >>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> >>> OTHERWISE,
> >>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
> >>> USE OR
> >>> + * OTHER DEALINGS IN THE SOFTWARE.
> >>> + */
> >>> +
> >>> +#include "igt.h"
> >>> +#include <xf86drmMode.h>
> >>> +
> >>> +#define MAX_PIPES 6
> >>> +
> >>> +/* Common test data. */
> >>> +typedef struct data {
> >>> +       igt_display_t display;
> >>> +       igt_plane_t *primary[MAX_PIPES];
> >>> +       igt_output_t *output[MAX_PIPES];
> >>> +       int fd;
> >>> +} data_t;
> >>> +
> >>> +static void test_init(data_t *data)
> >>> +{
> >>> +       igt_display_t *display = &data->display;
> >>> +       int i;
> >>> +
> >>> +       for_each_pipe(display, i) {
> >>> +               igt_output_t *output = &display->outputs[i];
> >>> +
> >>> +               data->primary[i] = igt_pipe_get_plane_type(
> >>> +                       &data->display.pipes[i],
> >>> DRM_PLANE_TYPE_PRIMARY);
> >>> +
> >>> +               data->output[i] = output;
> >>> +       }
> >>> +
> >>> +       igt_require(data->output[0]);
> >>> +       igt_display_reset(display);
> >>> +}
> >>> +
> >>> +static void test_fini(data_t *data)
> >>> +{
> >>> +       igt_display_t *display = &data->display;
> >>> +
> >>> +       igt_display_reset(display);
> >>> +       igt_display_commit_atomic(display,
> >>> DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
> >>> +}
> >>> +
> >>> +/* Forces a mode for a connector. */
> >>> +static void force_output_mode(data_t *d, igt_output_t *output,
> >>> +                             const drmModeModeInfo *mode)
> >>> +{
> >>> +       /* This allows us to create a virtual sink. */
> >>> +       if (!igt_output_is_connected(output)) {
> >>> +               kmstest_force_edid(d->fd, output->config.connector,
> >>> +                                  igt_kms_get_4k_edid());
> >>> +
> >>> +               kmstest_force_connector(d->fd, output->config.connector,
> >>> +                                       FORCE_CONNECTOR_DIGITAL);
> >>> +       }
> >>> +
> >>> +       igt_output_override_mode(output, mode);
> >>> +}
> >>> +
> >>> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
> >>> +{
> >>> +       igt_output_t *output;
> >>> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
> >>> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
> >>> +       drmModeConnectorPtr conn;
> >>> +       drmModeModeInfoPtr kmode;
> >>> +       void *user_data = NULL;
> >>> +       int i = 0;
> >>> +       int j = 0;
> >>> +
> >>> +       test_init(data);
> >>> +
> >>> +       igt_skip_on_f(num_pipes >
> >>> igt_display_get_n_pipes(&data->display) ||
> >>> +                             num_pipes > data->display.n_outputs,
> >>> +                     "ASIC does not have %d outputs/pipes\n",
> >>> num_pipes);
> >>> +
> >>> +       /* First supported mode */
> >>> +
> >>> +       for (j = 0; j < num_pipes; j++) {
> >>> +               output = data->output[j];
> >>> +               if (!igt_output_is_connected(output))
> >>> +                       continue;
> >>> +
> >>> +               conn = drmModeGetConnector(
> >>> +                       data->fd,
> >>> output->config.connector->connector_id);
> >>> +
> >>> +               kmode = &conn->modes[0];
> >>> +               if (buffer1[j] == NULL) {
> >>> +                       igt_fb_t fb;
> >>> +                       buffer1[j] = &fb;
> >>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
> >>> +                                           kmode->vdisplay,
> >>> +                                           DRM_FORMAT_XRGB8888,
> >>> +                                           DRM_FORMAT_MOD_NONE, 1.f,
> >>> 0.f,
> >>> +                                           0.f, buffer1[j]);
> >>> +               }
> >>> +               igt_output_set_pipe(output, j);
> >>> +               force_output_mode(data, output, kmode);
> >>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
> >>> +               drmModeFreeConnector(conn);
> >>> +       }
> >>> +
> >>> +       igt_display_commit_atomic(&data->display,
> >>> DRM_MODE_ATOMIC_ALLOW_MODESET,
> >>> +                                 user_data);
> >>> +
> >>> +       /* Last supported mode */
> >>> +
> >>> +       for (j = 0; j < num_pipes; j++) {
> >>> +               output = data->output[j];
> >>> +               if (!igt_output_is_connected(output))
> >>> +                       continue;
> >>> +
> >>> +               conn = drmModeGetConnector(
> >>> +                       data->fd,
> >>> output->config.connector->connector_id);
> >>> +
> >>> +               kmode = &conn->modes[conn->count_modes - 1];
> >>> +               if (buffer2[j] == NULL) {
> >>> +                       igt_fb_t fb;
> >>> +                       buffer2[j] = &fb;
> >>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
> >>> +                                           kmode->vdisplay,
> >>> +                                           DRM_FORMAT_XRGB8888,
> >>> +                                           DRM_FORMAT_MOD_NONE, 1.f,
> >>> 0.f,
> >>> +                                           0.f, buffer2[j]);
> >>> +               }
> >>> +               force_output_mode(data, output, kmode);
> >>> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
> >>> +               drmModeFreeConnector(conn);
> >>> +       }
> >>> +
> >>> +       igt_display_commit_atomic(&data->display,
> >>> DRM_MODE_ATOMIC_ALLOW_MODESET,
> >>> +                                 user_data);
> >>> +
> >>> +       /* First supported again */
> >>> +       for (j = 0; j < num_pipes; j++) {
> >>> +               output = data->output[j];
> >>> +               if (!igt_output_is_connected(output))
> >>> +                       continue;
> >>> +
> >>> +               conn = drmModeGetConnector(
> >>> +                       data->fd,
> >>> output->config.connector->connector_id);
> >>> +
> >>> +               kmode = &conn->modes[0];
> >>> +               force_output_mode(data, output, kmode);
> >>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
> >>> +               drmModeFreeConnector(conn);
> >>> +       }
> >>> +
> >>> +       igt_display_commit_atomic(&data->display,
> >>> DRM_MODE_ATOMIC_ALLOW_MODESET,
> >>> +                                 user_data);
> >>> +
> >>> +       test_fini(data);
> >>> +
> >>> +       for (i = 0; i <= num_pipes; i++) {
> >>> +               igt_remove_fb(data->fd, buffer1[i]);
> >>> +               igt_remove_fb(data->fd, buffer2[i]);
> >>> +       }
> >>> +}
> >>> +
> >>> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
> >>> +igt_main
> >>> +{
> >>> +       data_t data;
> >>> +       int i = 0;
> >>> +
> >>> +       igt_skip_on_simulation();
> >>> +
> >>> +       memset(&data, 0, sizeof(data));
> >>> +
> >>> +       igt_fixture
> >>> +       {
> >>> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
> >>> +
> >>> +               kmstest_set_vt_graphics_mode();
> >>> +
> >>> +               igt_display_require(&data.display, data.fd);
> >>> +               igt_require(&data.display.is_atomic);
> >>> +               igt_display_require_output(&data.display);
> >>> +       }
> >>> +
> >>> +       for (i = 0; i < MAX_PIPES; i++) {
> >>> +               igt_describe(
> >>> +                       "Test between switching highest and lowest
> >>> supported mode");
> >>> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
> >>> +                       run_mode_switch_first_last(&data, i + 1);
> >>> +       }
> >>> +
> >>> +       igt_fixture
> >>> +       {
> >>> +               igt_display_fini(&data.display);
> >>> +       }
> >>> +}
> >>> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
> >>> index b736c456..5216e194 100644
> >>> --- a/tests/amdgpu/meson.build
> >>> +++ b/tests/amdgpu/meson.build
> >>> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
> >>>                            'amd_mem_leak',
> >>>                            'amd_link_settings',
> >>>                            'amd_vrr_range',
> >>> +                         'amd_mode_switch',
> >>>                          ]
> >>>          amdgpu_deps += libdrm_amdgpu
> >>>   endif
> >>> --
> >>> 2.25.1
> >>>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-19 14:47     ` Rodrigo Siqueira Jordao
  2021-11-19 15:48       ` Mark Yacoub
@ 2021-11-19 15:51       ` Juha-Pekka Heikkila
  2021-11-24 15:16         ` Rodrigo Siqueira Jordao
  2021-11-19 17:25       ` Vudum, Lakshminarayana
  2 siblings, 1 reply; 14+ messages in thread
From: Juha-Pekka Heikkila @ 2021-11-19 15:51 UTC (permalink / raw)
  To: Rodrigo Siqueira Jordao, Mark Yacoub, Rodrigo Siqueira, Vudum,
	Lakshminarayana
  Cc: igt-dev, markyacoub

On 19.11.2021 16.47, Rodrigo Siqueira Jordao wrote:
> Hi,
> 
> On 2021-11-16 5:05 p.m., Juha-Pekka Heikkilä wrote:
>> I was wondering how is this different from kms_plane_lowres? On 
>> kms_plane_lowres is also used crc to check also what's on screen stay 
>> good.
> 
> Afaik, we ignore kms_plane_lowres since most tests look related to 
> tiling-[x|y], which I think is an Intel modifier (again, maybe I'm 
> wrong). Anyway, I tried to run it on an AMD device, and most 
> kms_plane_lowres subtest skips.
> 
>> /Juha-Pekka
>>
>> Mark Yacoub kirjoitti 16.11.2021 klo 23.29:
>>> The test looks pretty generic to me, can we make it a kms_ instead of 
>>> AMD only?
> 
> Mark, Juha-Pekka,
> 
> Tbh, right now, I prefer to keep this test as AMD-specific because we 
> are trying to fully upstream all of our tests, so we can rely on igt 
> from the upstream. I can create a README file for amdgpu tests and 
> create a TODO section where I can highlight that we can make this test 
> and other generic; how about that?

Hi Siqueira,

I was not objecting of upstreaming AMD-specific tests, I don't have AMD 
hw at hand hence I could not guess what are corners there might be hit. 
I was just pointing there's test which seems to do by code and 
description mostly what is done here, agreed only linear modifier test 
will run on AMD hw now.

I think would be good idea to put TODO comment in to remind about 
similarity of these tests, if they're the same test someone can go and 
start merging them later.

/Juha-Pekka

> 
> Hi Lakshmi,
> 
> This test is specific to AMD, but CI is failing. I think it is another 
> false-positive. Here is the patch:
> 
> https://patchwork.freedesktop.org/series/96996/
> 
> Thanks
> Siqueira
> 
>>> On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira
>>> <Rodrigo.Siqueira@amd.com> wrote:
>>>>
>>>> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>>>
>>>> Switching between different modes could potentially create pstate
>>>> warnings if clocks are not being set correctly.
>>>>
>>>> The subtest gets the highest and lowest mode supported on the connector
>>>> and switch between them.
>>>>
>>>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>>>> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>>> ---
>>>>   tests/amdgpu/amd_mode_switch.c | 210 
>>>> +++++++++++++++++++++++++++++++++
>>>>   tests/amdgpu/meson.build       |   1 +
>>>>   2 files changed, 211 insertions(+)
>>>>   create mode 100644 tests/amdgpu/amd_mode_switch.c
>>>>
>>>> diff --git a/tests/amdgpu/amd_mode_switch.c 
>>>> b/tests/amdgpu/amd_mode_switch.c
>>>> new file mode 100644
>>>> index 00000000..270b1b9f
>>>> --- /dev/null
>>>> +++ b/tests/amdgpu/amd_mode_switch.c
>>>> @@ -0,0 +1,210 @@
>>>> +/*
>>>> + * Copyright 2021 Advanced Micro Devices, Inc.
>>>> + *
>>>> + * Permission is hereby granted, free of charge, to any person 
>>>> obtaining a
>>>> + * copy of this software and associated documentation files (the 
>>>> "Software"),
>>>> + * to deal in the Software without restriction, including without 
>>>> limitation
>>>> + * the rights to use, copy, modify, merge, publish, distribute, 
>>>> sublicense,
>>>> + * and/or sell copies of the Software, and to permit persons to 
>>>> whom the
>>>> + * Software is furnished to do so, subject to the following 
>>>> conditions:
>>>> + *
>>>> + * The above copyright notice and this permission notice shall be 
>>>> included in
>>>> + * all copies or substantial portions of the Software.
>>>> + *
>>>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
>>>> EXPRESS OR
>>>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
>>>> MERCHANTABILITY,
>>>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO 
>>>> EVENT SHALL
>>>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, 
>>>> DAMAGES OR
>>>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
>>>> OTHERWISE,
>>>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 
>>>> USE OR
>>>> + * OTHER DEALINGS IN THE SOFTWARE.
>>>> + */
>>>> +
>>>> +#include "igt.h"
>>>> +#include <xf86drmMode.h>
>>>> +
>>>> +#define MAX_PIPES 6
>>>> +
>>>> +/* Common test data. */
>>>> +typedef struct data {
>>>> +       igt_display_t display;
>>>> +       igt_plane_t *primary[MAX_PIPES];
>>>> +       igt_output_t *output[MAX_PIPES];
>>>> +       int fd;
>>>> +} data_t;
>>>> +
>>>> +static void test_init(data_t *data)
>>>> +{
>>>> +       igt_display_t *display = &data->display;
>>>> +       int i;
>>>> +
>>>> +       for_each_pipe(display, i) {
>>>> +               igt_output_t *output = &display->outputs[i];
>>>> +
>>>> +               data->primary[i] = igt_pipe_get_plane_type(
>>>> +                       &data->display.pipes[i], 
>>>> DRM_PLANE_TYPE_PRIMARY);
>>>> +
>>>> +               data->output[i] = output;
>>>> +       }
>>>> +
>>>> +       igt_require(data->output[0]);
>>>> +       igt_display_reset(display);
>>>> +}
>>>> +
>>>> +static void test_fini(data_t *data)
>>>> +{
>>>> +       igt_display_t *display = &data->display;
>>>> +
>>>> +       igt_display_reset(display);
>>>> +       igt_display_commit_atomic(display, 
>>>> DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
>>>> +}
>>>> +
>>>> +/* Forces a mode for a connector. */
>>>> +static void force_output_mode(data_t *d, igt_output_t *output,
>>>> +                             const drmModeModeInfo *mode)
>>>> +{
>>>> +       /* This allows us to create a virtual sink. */
>>>> +       if (!igt_output_is_connected(output)) {
>>>> +               kmstest_force_edid(d->fd, output->config.connector,
>>>> +                                  igt_kms_get_4k_edid());
>>>> +
>>>> +               kmstest_force_connector(d->fd, 
>>>> output->config.connector,
>>>> +                                       FORCE_CONNECTOR_DIGITAL);
>>>> +       }
>>>> +
>>>> +       igt_output_override_mode(output, mode);
>>>> +}
>>>> +
>>>> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
>>>> +{
>>>> +       igt_output_t *output;
>>>> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
>>>> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
>>>> +       drmModeConnectorPtr conn;
>>>> +       drmModeModeInfoPtr kmode;
>>>> +       void *user_data = NULL;
>>>> +       int i = 0;
>>>> +       int j = 0;
>>>> +
>>>> +       test_init(data);
>>>> +
>>>> +       igt_skip_on_f(num_pipes > 
>>>> igt_display_get_n_pipes(&data->display) ||
>>>> +                             num_pipes > data->display.n_outputs,
>>>> +                     "ASIC does not have %d outputs/pipes\n", 
>>>> num_pipes);
>>>> +
>>>> +       /* First supported mode */
>>>> +
>>>> +       for (j = 0; j < num_pipes; j++) {
>>>> +               output = data->output[j];
>>>> +               if (!igt_output_is_connected(output))
>>>> +                       continue;
>>>> +
>>>> +               conn = drmModeGetConnector(
>>>> +                       data->fd, 
>>>> output->config.connector->connector_id);
>>>> +
>>>> +               kmode = &conn->modes[0];
>>>> +               if (buffer1[j] == NULL) {
>>>> +                       igt_fb_t fb;
>>>> +                       buffer1[j] = &fb;
>>>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>>>> +                                           kmode->vdisplay,
>>>> +                                           DRM_FORMAT_XRGB8888,
>>>> +                                           DRM_FORMAT_MOD_NONE, 
>>>> 1.f, 0.f,
>>>> +                                           0.f, buffer1[j]);
>>>> +               }
>>>> +               igt_output_set_pipe(output, j);
>>>> +               force_output_mode(data, output, kmode);
>>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>>> +               drmModeFreeConnector(conn);
>>>> +       }
>>>> +
>>>> +       igt_display_commit_atomic(&data->display, 
>>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>>> +                                 user_data);
>>>> +
>>>> +       /* Last supported mode */
>>>> +
>>>> +       for (j = 0; j < num_pipes; j++) {
>>>> +               output = data->output[j];
>>>> +               if (!igt_output_is_connected(output))
>>>> +                       continue;
>>>> +
>>>> +               conn = drmModeGetConnector(
>>>> +                       data->fd, 
>>>> output->config.connector->connector_id);
>>>> +
>>>> +               kmode = &conn->modes[conn->count_modes - 1];
>>>> +               if (buffer2[j] == NULL) {
>>>> +                       igt_fb_t fb;
>>>> +                       buffer2[j] = &fb;
>>>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>>>> +                                           kmode->vdisplay,
>>>> +                                           DRM_FORMAT_XRGB8888,
>>>> +                                           DRM_FORMAT_MOD_NONE, 
>>>> 1.f, 0.f,
>>>> +                                           0.f, buffer2[j]);
>>>> +               }
>>>> +               force_output_mode(data, output, kmode);
>>>> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
>>>> +               drmModeFreeConnector(conn);
>>>> +       }
>>>> +
>>>> +       igt_display_commit_atomic(&data->display, 
>>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>>> +                                 user_data);
>>>> +
>>>> +       /* First supported again */
>>>> +       for (j = 0; j < num_pipes; j++) {
>>>> +               output = data->output[j];
>>>> +               if (!igt_output_is_connected(output))
>>>> +                       continue;
>>>> +
>>>> +               conn = drmModeGetConnector(
>>>> +                       data->fd, 
>>>> output->config.connector->connector_id);
>>>> +
>>>> +               kmode = &conn->modes[0];
>>>> +               force_output_mode(data, output, kmode);
>>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>>> +               drmModeFreeConnector(conn);
>>>> +       }
>>>> +
>>>> +       igt_display_commit_atomic(&data->display, 
>>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>>> +                                 user_data);
>>>> +
>>>> +       test_fini(data);
>>>> +
>>>> +       for (i = 0; i <= num_pipes; i++) {
>>>> +               igt_remove_fb(data->fd, buffer1[i]);
>>>> +               igt_remove_fb(data->fd, buffer2[i]);
>>>> +       }
>>>> +}
>>>> +
>>>> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
>>>> +igt_main
>>>> +{
>>>> +       data_t data;
>>>> +       int i = 0;
>>>> +
>>>> +       igt_skip_on_simulation();
>>>> +
>>>> +       memset(&data, 0, sizeof(data));
>>>> +
>>>> +       igt_fixture
>>>> +       {
>>>> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
>>>> +
>>>> +               kmstest_set_vt_graphics_mode();
>>>> +
>>>> +               igt_display_require(&data.display, data.fd);
>>>> +               igt_require(&data.display.is_atomic);
>>>> +               igt_display_require_output(&data.display);
>>>> +       }
>>>> +
>>>> +       for (i = 0; i < MAX_PIPES; i++) {
>>>> +               igt_describe(
>>>> +                       "Test between switching highest and lowest 
>>>> supported mode");
>>>> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
>>>> +                       run_mode_switch_first_last(&data, i + 1);
>>>> +       }
>>>> +
>>>> +       igt_fixture
>>>> +       {
>>>> +               igt_display_fini(&data.display);
>>>> +       }
>>>> +}
>>>> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
>>>> index b736c456..5216e194 100644
>>>> --- a/tests/amdgpu/meson.build
>>>> +++ b/tests/amdgpu/meson.build
>>>> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>>>>                            'amd_mem_leak',
>>>>                            'amd_link_settings',
>>>>                            'amd_vrr_range',
>>>> +                         'amd_mode_switch',
>>>>                          ]
>>>>          amdgpu_deps += libdrm_amdgpu
>>>>   endif
>>>> -- 
>>>> 2.25.1
>>>>
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
  2021-11-16 21:29 ` Mark Yacoub
  2021-11-16 23:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2021-11-19 17:13 ` Patchwork
  2021-11-19 17:15 ` Patchwork
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2021-11-19 17:13 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 5770 bytes --]

== Series Details ==

Series: amdgpu/amd_mode_switch: Introduce mode switch test
URL   : https://patchwork.freedesktop.org/series/96996/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_10888 -> IGTPW_6408
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

Participating hosts (39 -> 33)
------------------------------

  Additional (1): fi-kbl-soraka 
  Missing    (7): fi-ilk-m540 bat-dg1-6 fi-tgl-u2 fi-hsw-4200u fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 

Known issues
------------

  Here are the changes found in IGTPW_6408 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fence@basic-busy@bcs0:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][1] ([fdo#109271]) +8 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@gem_exec_fence@basic-busy@bcs0.html

  * igt@gem_exec_suspend@basic-s0:
    - fi-tgl-1115g4:      [PASS][2] -> [FAIL][3] ([i915#1888])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-tgl-1115g4/igt@gem_exec_suspend@basic-s0.html

  * igt@gem_exec_suspend@basic-s3:
    - fi-skl-6600u:       [PASS][4] -> [FAIL][5] ([i915#4564])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-skl-6600u/igt@gem_exec_suspend@basic-s3.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-skl-6600u/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_huc_copy@huc-copy:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#2190])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html

  * igt@i915_selftest@live@gt_pm:
    - fi-kbl-soraka:      NOTRUN -> [DMESG-FAIL][7] ([i915#1886] / [i915#2291])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html

  * igt@kms_chamelium@common-hpd-after-suspend:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][8] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@kms_chamelium@common-hpd-after-suspend.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-kbl-soraka:      NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#533])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-kbl-soraka/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-bdw-5557u:       [PASS][10] -> [INCOMPLETE][11] ([i915#146])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-bdw-5557u/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-bdw-5557u/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@runner@aborted:
    - fi-skl-6600u:       NOTRUN -> [FAIL][12] ([i915#3363] / [i915#4312])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-skl-6600u/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@hangcheck:
    - {fi-hsw-gt1}:       [DMESG-WARN][13] ([i915#3303]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-hsw-gt1/igt@i915_selftest@live@hangcheck.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-hsw-gt1/igt@i915_selftest@live@hangcheck.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-cml-u2:          [DMESG-WARN][15] ([i915#4269]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/fi-cml-u2/igt@kms_frontbuffer_tracking@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#146]: https://gitlab.freedesktop.org/drm/intel/issues/146
  [i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
  [i915#3363]: https://gitlab.freedesktop.org/drm/intel/issues/3363
  [i915#4269]: https://gitlab.freedesktop.org/drm/intel/issues/4269
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4564]: https://gitlab.freedesktop.org/drm/intel/issues/4564
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_6281 -> IGTPW_6408

  CI-20190529: 20190529
  CI_DRM_10888: d4a23275467825243fea6f50938fc89711b9a53c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6408: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html
  IGT_6281: 551f33d68fc780e3d264abd69ec59fe1af1bb65b @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git



== Testlist changes ==

+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-0
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-1
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-2
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-3
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-4
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-5

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

[-- Attachment #2: Type: text/html, Size: 6882 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
                   ` (2 preceding siblings ...)
  2021-11-19 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2021-11-19 17:15 ` Patchwork
  2021-11-19 22:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2021-11-19 17:15 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

== Series Details ==

Series: amdgpu/amd_mode_switch: Introduce mode switch test
URL   : https://patchwork.freedesktop.org/series/96996/
State : success

== Summary ==

CI Bug Log - changes from IGTPW_6408 -> IGTPW_6408
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

Participating hosts (33 -> 33)
------------------------------

  No changes in participating hosts


Changes
-------

  No changes found


Build changes
-------------

  No differences in builds

  CI_DRM_10888: d4a23275467825243fea6f50938fc89711b9a53c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6408: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html



== Testlist changes ==

+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-0
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-1
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-2
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-3
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-4
+igt@amdgpu/amd_mode_switch@mode-switch-first-last-pipe-5

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip//index.html

[-- Attachment #2: Type: text/html, Size: 1809 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-19 14:47     ` Rodrigo Siqueira Jordao
  2021-11-19 15:48       ` Mark Yacoub
  2021-11-19 15:51       ` Juha-Pekka Heikkila
@ 2021-11-19 17:25       ` Vudum, Lakshminarayana
  2 siblings, 0 replies; 14+ messages in thread
From: Vudum, Lakshminarayana @ 2021-11-19 17:25 UTC (permalink / raw)
  To: Rodrigo Siqueira Jordao, Juha-Pekka Heikkilä,
	Mark Yacoub, Rodrigo Siqueira
  Cc: igt-dev, markyacoub

Re-reported. Here is the bug for the regression
https://gitlab.freedesktop.org/drm/intel/-/issues/4564
igt@gem_exec_suspend@basic-s3 - incomplete - INFO: task jbd2/nvme0n1p2-:161 blocked for more than 30 seconds.

Lakshmi.

-----Original Message-----
From: Rodrigo Siqueira Jordao <rjordrigo@amd.com> 
Sent: Friday, November 19, 2021 6:48 AM
To: Juha-Pekka Heikkilä <juhapekka.heikkila@gmail.com>; Mark Yacoub <markyacoub@chromium.org>; Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>; Vudum, Lakshminarayana <lakshminarayana.vudum@intel.com>
Cc: igt-dev@lists.freedesktop.org; markyacoub@google.com; Wentland, Harry <Harry.Wentland@amd.com>
Subject: Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test

Hi,

On 2021-11-16 5:05 p.m., Juha-Pekka Heikkilä wrote:
> I was wondering how is this different from kms_plane_lowres? On 
> kms_plane_lowres is also used crc to check also what's on screen stay good.

Afaik, we ignore kms_plane_lowres since most tests look related to tiling-[x|y], which I think is an Intel modifier (again, maybe I'm wrong). Anyway, I tried to run it on an AMD device, and most kms_plane_lowres subtest skips.

> /Juha-Pekka
> 
> Mark Yacoub kirjoitti 16.11.2021 klo 23.29:
>> The test looks pretty generic to me, can we make it a kms_ instead of 
>> AMD only?

Mark, Juha-Pekka,

Tbh, right now, I prefer to keep this test as AMD-specific because we are trying to fully upstream all of our tests, so we can rely on igt from the upstream. I can create a README file for amdgpu tests and create a TODO section where I can highlight that we can make this test and other generic; how about that?

Hi Lakshmi,

This test is specific to AMD, but CI is failing. I think it is another false-positive. Here is the patch:

https://patchwork.freedesktop.org/series/96996/

Thanks
Siqueira

>> On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira 
>> <Rodrigo.Siqueira@amd.com> wrote:
>>>
>>> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>>
>>> Switching between different modes could potentially create pstate 
>>> warnings if clocks are not being set correctly.
>>>
>>> The subtest gets the highest and lowest mode supported on the 
>>> connector and switch between them.
>>>
>>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>>> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>> ---
>>>   tests/amdgpu/amd_mode_switch.c | 210 
>>> +++++++++++++++++++++++++++++++++
>>>   tests/amdgpu/meson.build       |   1 +
>>>   2 files changed, 211 insertions(+)
>>>   create mode 100644 tests/amdgpu/amd_mode_switch.c
>>>
>>> diff --git a/tests/amdgpu/amd_mode_switch.c 
>>> b/tests/amdgpu/amd_mode_switch.c new file mode 100644 index 
>>> 00000000..270b1b9f
>>> --- /dev/null
>>> +++ b/tests/amdgpu/amd_mode_switch.c
>>> @@ -0,0 +1,210 @@
>>> +/*
>>> + * Copyright 2021 Advanced Micro Devices, Inc.
>>> + *
>>> + * Permission is hereby granted, free of charge, to any person
>>> obtaining a
>>> + * copy of this software and associated documentation files (the
>>> "Software"),
>>> + * to deal in the Software without restriction, including without
>>> limitation
>>> + * the rights to use, copy, modify, merge, publish, distribute,
>>> sublicense,
>>> + * and/or sell copies of the Software, and to permit persons to 
>>> + whom
>>> the
>>> + * Software is furnished to do so, subject to the following conditions:
>>> + *
>>> + * The above copyright notice and this permission notice shall be
>>> included in
>>> + * all copies or substantial portions of the Software.
>>> + *
>>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>>> EXPRESS OR
>>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>>> MERCHANTABILITY,
>>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO
>>> EVENT SHALL
>>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM,
>>> DAMAGES OR
>>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
>>> OTHERWISE,
>>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
>>> USE OR
>>> + * OTHER DEALINGS IN THE SOFTWARE.
>>> + */
>>> +
>>> +#include "igt.h"
>>> +#include <xf86drmMode.h>
>>> +
>>> +#define MAX_PIPES 6
>>> +
>>> +/* Common test data. */
>>> +typedef struct data {
>>> +       igt_display_t display;
>>> +       igt_plane_t *primary[MAX_PIPES];
>>> +       igt_output_t *output[MAX_PIPES];
>>> +       int fd;
>>> +} data_t;
>>> +
>>> +static void test_init(data_t *data) {
>>> +       igt_display_t *display = &data->display;
>>> +       int i;
>>> +
>>> +       for_each_pipe(display, i) {
>>> +               igt_output_t *output = &display->outputs[i];
>>> +
>>> +               data->primary[i] = igt_pipe_get_plane_type(
>>> +                       &data->display.pipes[i],
>>> DRM_PLANE_TYPE_PRIMARY);
>>> +
>>> +               data->output[i] = output;
>>> +       }
>>> +
>>> +       igt_require(data->output[0]);
>>> +       igt_display_reset(display);
>>> +}
>>> +
>>> +static void test_fini(data_t *data) {
>>> +       igt_display_t *display = &data->display;
>>> +
>>> +       igt_display_reset(display);
>>> +       igt_display_commit_atomic(display,
>>> DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
>>> +}
>>> +
>>> +/* Forces a mode for a connector. */ static void 
>>> +force_output_mode(data_t *d, igt_output_t *output,
>>> +                             const drmModeModeInfo *mode) {
>>> +       /* This allows us to create a virtual sink. */
>>> +       if (!igt_output_is_connected(output)) {
>>> +               kmstest_force_edid(d->fd, output->config.connector,
>>> +                                  igt_kms_get_4k_edid());
>>> +
>>> +               kmstest_force_connector(d->fd, 
>>> +output->config.connector,
>>> +                                       FORCE_CONNECTOR_DIGITAL);
>>> +       }
>>> +
>>> +       igt_output_override_mode(output, mode); }
>>> +
>>> +static void run_mode_switch_first_last(data_t *data, int num_pipes) 
>>> +{
>>> +       igt_output_t *output;
>>> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
>>> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
>>> +       drmModeConnectorPtr conn;
>>> +       drmModeModeInfoPtr kmode;
>>> +       void *user_data = NULL;
>>> +       int i = 0;
>>> +       int j = 0;
>>> +
>>> +       test_init(data);
>>> +
>>> +       igt_skip_on_f(num_pipes >
>>> igt_display_get_n_pipes(&data->display) ||
>>> +                             num_pipes > data->display.n_outputs,
>>> +                     "ASIC does not have %d outputs/pipes\n",
>>> num_pipes);
>>> +
>>> +       /* First supported mode */
>>> +
>>> +       for (j = 0; j < num_pipes; j++) {
>>> +               output = data->output[j];
>>> +               if (!igt_output_is_connected(output))
>>> +                       continue;
>>> +
>>> +               conn = drmModeGetConnector(
>>> +                       data->fd,
>>> output->config.connector->connector_id);
>>> +
>>> +               kmode = &conn->modes[0];
>>> +               if (buffer1[j] == NULL) {
>>> +                       igt_fb_t fb;
>>> +                       buffer1[j] = &fb;
>>> +                       igt_create_color_fb(data->fd, 
>>> +kmode->hdisplay,
>>> +                                           kmode->vdisplay,
>>> +                                           DRM_FORMAT_XRGB8888,
>>> +                                           DRM_FORMAT_MOD_NONE, 
>>> +1.f,
>>> 0.f,
>>> +                                           0.f, buffer1[j]);
>>> +               }
>>> +               igt_output_set_pipe(output, j);
>>> +               force_output_mode(data, output, kmode);
>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>> +               drmModeFreeConnector(conn);
>>> +       }
>>> +
>>> +       igt_display_commit_atomic(&data->display,
>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>> +                                 user_data);
>>> +
>>> +       /* Last supported mode */
>>> +
>>> +       for (j = 0; j < num_pipes; j++) {
>>> +               output = data->output[j];
>>> +               if (!igt_output_is_connected(output))
>>> +                       continue;
>>> +
>>> +               conn = drmModeGetConnector(
>>> +                       data->fd,
>>> output->config.connector->connector_id);
>>> +
>>> +               kmode = &conn->modes[conn->count_modes - 1];
>>> +               if (buffer2[j] == NULL) {
>>> +                       igt_fb_t fb;
>>> +                       buffer2[j] = &fb;
>>> +                       igt_create_color_fb(data->fd, 
>>> +kmode->hdisplay,
>>> +                                           kmode->vdisplay,
>>> +                                           DRM_FORMAT_XRGB8888,
>>> +                                           DRM_FORMAT_MOD_NONE, 
>>> +1.f,
>>> 0.f,
>>> +                                           0.f, buffer2[j]);
>>> +               }
>>> +               force_output_mode(data, output, kmode);
>>> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
>>> +               drmModeFreeConnector(conn);
>>> +       }
>>> +
>>> +       igt_display_commit_atomic(&data->display,
>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>> +                                 user_data);
>>> +
>>> +       /* First supported again */
>>> +       for (j = 0; j < num_pipes; j++) {
>>> +               output = data->output[j];
>>> +               if (!igt_output_is_connected(output))
>>> +                       continue;
>>> +
>>> +               conn = drmModeGetConnector(
>>> +                       data->fd,
>>> output->config.connector->connector_id);
>>> +
>>> +               kmode = &conn->modes[0];
>>> +               force_output_mode(data, output, kmode);
>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>> +               drmModeFreeConnector(conn);
>>> +       }
>>> +
>>> +       igt_display_commit_atomic(&data->display,
>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>> +                                 user_data);
>>> +
>>> +       test_fini(data);
>>> +
>>> +       for (i = 0; i <= num_pipes; i++) {
>>> +               igt_remove_fb(data->fd, buffer1[i]);
>>> +               igt_remove_fb(data->fd, buffer2[i]);
>>> +       }
>>> +}
>>> +
>>> +IGT_TEST_DESCRIPTION("Test switching between supported modes"); 
>>> +igt_main {
>>> +       data_t data;
>>> +       int i = 0;
>>> +
>>> +       igt_skip_on_simulation();
>>> +
>>> +       memset(&data, 0, sizeof(data));
>>> +
>>> +       igt_fixture
>>> +       {
>>> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
>>> +
>>> +               kmstest_set_vt_graphics_mode();
>>> +
>>> +               igt_display_require(&data.display, data.fd);
>>> +               igt_require(&data.display.is_atomic);
>>> +               igt_display_require_output(&data.display);
>>> +       }
>>> +
>>> +       for (i = 0; i < MAX_PIPES; i++) {
>>> +               igt_describe(
>>> +                       "Test between switching highest and lowest
>>> supported mode");
>>> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
>>> +                       run_mode_switch_first_last(&data, i + 1);
>>> +       }
>>> +
>>> +       igt_fixture
>>> +       {
>>> +               igt_display_fini(&data.display);
>>> +       }
>>> +}
>>> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build 
>>> index b736c456..5216e194 100644
>>> --- a/tests/amdgpu/meson.build
>>> +++ b/tests/amdgpu/meson.build
>>> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>>>                            'amd_mem_leak',
>>>                            'amd_link_settings',
>>>                            'amd_vrr_range',
>>> +                         'amd_mode_switch',
>>>                          ]
>>>          amdgpu_deps += libdrm_amdgpu
>>>   endif
>>> --
>>> 2.25.1
>>>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [igt-dev] ✗ Fi.CI.IGT: failure for amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
                   ` (3 preceding siblings ...)
  2021-11-19 17:15 ` Patchwork
@ 2021-11-19 22:42 ` Patchwork
  2021-11-19 23:15 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
  2021-11-25 18:54 ` [igt-dev] [PATCH i-g-t] " Harry Wentland
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2021-11-19 22:42 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 30268 bytes --]

== Series Details ==

Series: amdgpu/amd_mode_switch: Introduce mode switch test
URL   : https://patchwork.freedesktop.org/series/96996/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_10888_full -> IGTPW_6408_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_6408_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_6408_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

Participating hosts (11 -> 7)
------------------------------

  Missing    (4): pig-skl-6260u pig-kbl-iris shard-rkl pig-glk-j5005 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_6408_full:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_plane_cursor@pipe-c-viewport-size-128:
    - shard-kbl:          [PASS][1] -> [INCOMPLETE][2] +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-kbl6/igt@kms_plane_cursor@pipe-c-viewport-size-128.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl7/igt@kms_plane_cursor@pipe-c-viewport-size-128.html

  
Known issues
------------

  Here are the changes found in IGTPW_6408_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_create@create-massive:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][3] ([i915#3002])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl2/igt@gem_create@create-massive.html
    - shard-apl:          NOTRUN -> [DMESG-WARN][4] ([i915#3002])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl2/igt@gem_create@create-massive.html

  * igt@gem_ctx_persistence@engines-hostile@vcs0:
    - shard-apl:          [PASS][5] -> [FAIL][6] ([i915#2410])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-apl1/igt@gem_ctx_persistence@engines-hostile@vcs0.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl7/igt@gem_ctx_persistence@engines-hostile@vcs0.html

  * igt@gem_ctx_persistence@engines-mixed:
    - shard-snb:          NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#1099])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-snb7/igt@gem_ctx_persistence@engines-mixed.html

  * igt@gem_exec_fair@basic-none-rrul@rcs0:
    - shard-iclb:         [PASS][8] -> [FAIL][9] ([i915#2842])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-iclb7/igt@gem_exec_fair@basic-none-rrul@rcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb1/igt@gem_exec_fair@basic-none-rrul@rcs0.html

  * igt@gem_exec_fair@basic-none-solo@rcs0:
    - shard-kbl:          NOTRUN -> [FAIL][10] ([i915#2842])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl6/igt@gem_exec_fair@basic-none-solo@rcs0.html

  * igt@gem_exec_fair@basic-none-vip@rcs0:
    - shard-kbl:          [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-kbl7/igt@gem_exec_fair@basic-none-vip@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl1/igt@gem_exec_fair@basic-none-vip@rcs0.html

  * igt@gem_exec_fair@basic-none@vcs0:
    - shard-apl:          [PASS][13] -> [FAIL][14] ([i915#2842])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-apl8/igt@gem_exec_fair@basic-none@vcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl7/igt@gem_exec_fair@basic-none@vcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-tglb:         [PASS][15] -> [FAIL][16] ([i915#2842])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-tglb5/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@bcs0:
    - shard-tglb:         NOTRUN -> [FAIL][17] ([i915#2842]) +4 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@gem_exec_fair@basic-pace@bcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-iclb:         NOTRUN -> [FAIL][18] ([i915#2842]) +3 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb3/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-glk:          [PASS][19] -> [FAIL][20] ([i915#2842]) +2 similar issues
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-glk9/igt@gem_exec_fair@basic-pace@vecs0.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk3/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_media_vme:
    - shard-tglb:         NOTRUN -> [SKIP][21] ([i915#284])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb1/igt@gem_media_vme.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-kbl:          NOTRUN -> [WARN][22] ([i915#2658])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl1/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_pxp@dmabuf-shared-protected-dst-is-context-refcounted:
    - shard-iclb:         NOTRUN -> [SKIP][23] ([i915#4270])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb2/igt@gem_pxp@dmabuf-shared-protected-dst-is-context-refcounted.html

  * igt@gem_pxp@verify-pxp-stale-ctx-execution:
    - shard-tglb:         NOTRUN -> [SKIP][24] ([i915#4270]) +2 similar issues
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@gem_pxp@verify-pxp-stale-ctx-execution.html

  * igt@gem_render_copy@y-tiled-to-vebox-y-tiled:
    - shard-iclb:         NOTRUN -> [SKIP][25] ([i915#768])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@gem_render_copy@y-tiled-to-vebox-y-tiled.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-kbl:          NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#3323])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl6/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-tglb:         NOTRUN -> [SKIP][27] ([i915#3297])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb7/igt@gem_userptr_blits@dmabuf-unsync.html
    - shard-iclb:         NOTRUN -> [SKIP][28] ([i915#3297])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb1/igt@gem_userptr_blits@dmabuf-unsync.html

  * igt@gen9_exec_parse@bb-large:
    - shard-tglb:         NOTRUN -> [SKIP][29] ([i915#2856]) +1 similar issue
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb7/igt@gen9_exec_parse@bb-large.html

  * igt@i915_pm_dc@dc6-dpms:
    - shard-iclb:         [PASS][30] -> [FAIL][31] ([i915#454]) +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-iclb7/igt@i915_pm_dc@dc6-dpms.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_pm_dc@dc9-dpms:
    - shard-tglb:         NOTRUN -> [SKIP][32] ([i915#4281])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb5/igt@i915_pm_dc@dc9-dpms.html

  * igt@i915_pm_rpm@dpms-mode-unset-non-lpsp:
    - shard-tglb:         NOTRUN -> [SKIP][33] ([fdo#111644] / [i915#1397] / [i915#2411])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@i915_pm_rpm@dpms-mode-unset-non-lpsp.html

  * igt@i915_suspend@forcewake:
    - shard-kbl:          NOTRUN -> [DMESG-WARN][34] ([i915#180])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl7/igt@i915_suspend@forcewake.html

  * igt@kms_big_fb@linear-16bpp-rotate-270:
    - shard-tglb:         NOTRUN -> [SKIP][35] ([fdo#111614]) +4 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@kms_big_fb@linear-16bpp-rotate-270.html

  * igt@kms_big_fb@linear-32bpp-rotate-180:
    - shard-glk:          [PASS][36] -> [DMESG-WARN][37] ([i915#118]) +2 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-glk9/igt@kms_big_fb@linear-32bpp-rotate-180.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk5/igt@kms_big_fb@linear-32bpp-rotate-180.html

  * igt@kms_big_fb@x-tiled-8bpp-rotate-270:
    - shard-iclb:         NOTRUN -> [SKIP][38] ([fdo#110725] / [fdo#111614]) +2 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb1/igt@kms_big_fb@x-tiled-8bpp-rotate-270.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
    - shard-kbl:          NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#3777])
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl6/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip.html

  * igt@kms_big_fb@yf-tiled-8bpp-rotate-180:
    - shard-tglb:         NOTRUN -> [SKIP][40] ([fdo#111615]) +4 similar issues
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_big_fb@yf-tiled-8bpp-rotate-180.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip:
    - shard-iclb:         NOTRUN -> [SKIP][41] ([fdo#110723])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb8/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
    - shard-kbl:          NOTRUN -> [SKIP][42] ([fdo#109271] / [i915#3886]) +7 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl6/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_mc_ccs:
    - shard-iclb:         NOTRUN -> [SKIP][43] ([fdo#109278] / [i915#3886]) +3 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@kms_ccs@pipe-a-missing-ccs-buffer-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
    - shard-glk:          NOTRUN -> [SKIP][44] ([fdo#109271] / [i915#3886]) +1 similar issue
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk3/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][45] ([i915#3689] / [i915#3886]) +6 similar issues
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][46] ([fdo#109271] / [i915#3886]) +10 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl1/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-crc-sprite-planes-basic-yf_tiled_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][47] ([fdo#111615] / [i915#3689]) +2 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-yf_tiled_ccs.html

  * igt@kms_ccs@pipe-d-bad-aux-stride-y_tiled_gen12_mc_ccs:
    - shard-tglb:         NOTRUN -> [SKIP][48] ([i915#3689]) +5 similar issues
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb1/igt@kms_ccs@pipe-d-bad-aux-stride-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@hdmi-audio:
    - shard-iclb:         NOTRUN -> [SKIP][49] ([fdo#109284] / [fdo#111827]) +6 similar issues
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb8/igt@kms_chamelium@hdmi-audio.html

  * igt@kms_chamelium@hdmi-crc-nonplanar-formats:
    - shard-glk:          NOTRUN -> [SKIP][50] ([fdo#109271] / [fdo#111827]) +6 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk6/igt@kms_chamelium@hdmi-crc-nonplanar-formats.html

  * igt@kms_chamelium@hdmi-edid-change-during-suspend:
    - shard-apl:          NOTRUN -> [SKIP][51] ([fdo#109271] / [fdo#111827]) +13 similar issues
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl7/igt@kms_chamelium@hdmi-edid-change-during-suspend.html

  * igt@kms_chamelium@vga-hpd:
    - shard-snb:          NOTRUN -> [SKIP][52] ([fdo#109271] / [fdo#111827]) +5 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-snb5/igt@kms_chamelium@vga-hpd.html

  * igt@kms_chamelium@vga-hpd-without-ddc:
    - shard-kbl:          NOTRUN -> [SKIP][53] ([fdo#109271] / [fdo#111827]) +14 similar issues
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl7/igt@kms_chamelium@vga-hpd-without-ddc.html

  * igt@kms_color_chamelium@pipe-b-ctm-0-75:
    - shard-tglb:         NOTRUN -> [SKIP][54] ([fdo#109284] / [fdo#111827]) +11 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb5/igt@kms_color_chamelium@pipe-b-ctm-0-75.html

  * igt@kms_color_chamelium@pipe-d-ctm-green-to-red:
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109278] / [fdo#109284] / [fdo#111827])
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@kms_color_chamelium@pipe-d-ctm-green-to-red.html

  * igt@kms_content_protection@content_type_change:
    - shard-tglb:         NOTRUN -> [SKIP][56] ([fdo#111828]) +1 similar issue
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_content_protection@content_type_change.html

  * igt@kms_cursor_crc@pipe-a-cursor-512x170-random:
    - shard-tglb:         NOTRUN -> [SKIP][57] ([fdo#109279] / [i915#3359]) +4 similar issues
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb3/igt@kms_cursor_crc@pipe-a-cursor-512x170-random.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x170-sliding:
    - shard-iclb:         NOTRUN -> [SKIP][58] ([fdo#109278] / [fdo#109279]) +2 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb8/igt@kms_cursor_crc@pipe-c-cursor-512x170-sliding.html

  * igt@kms_cursor_crc@pipe-d-cursor-512x170-rapid-movement:
    - shard-tglb:         NOTRUN -> [SKIP][59] ([i915#3359]) +11 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb1/igt@kms_cursor_crc@pipe-d-cursor-512x170-rapid-movement.html

  * igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size:
    - shard-iclb:         NOTRUN -> [SKIP][60] ([fdo#109274] / [fdo#109278])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@flip-vs-cursor-toggle:
    - shard-iclb:         [PASS][61] -> [FAIL][62] ([i915#2346])
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-iclb3/igt@kms_cursor_legacy@flip-vs-cursor-toggle.html
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-toggle.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-kbl:          NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#533]) +2 similar issues
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl7/igt@kms_cursor_legacy@pipe-d-torture-bo.html

  * igt@kms_flip@2x-absolute-wf_vblank:
    - shard-tglb:         NOTRUN -> [SKIP][64] ([fdo#111825] / [i915#3966])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_flip@2x-absolute-wf_vblank.html

  * igt@kms_flip@2x-flip-vs-wf_vblank-interruptible:
    - shard-iclb:         NOTRUN -> [SKIP][65] ([fdo#109274]) +4 similar issues
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb3/igt@kms_flip@2x-flip-vs-wf_vblank-interruptible.html

  * igt@kms_flip@flip-vs-expired-vblank@c-dp1:
    - shard-kbl:          [PASS][66] -> [FAIL][67] ([i915#79])
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-kbl2/igt@kms_flip@flip-vs-expired-vblank@c-dp1.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl7/igt@kms_flip@flip-vs-expired-vblank@c-dp1.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [PASS][68] -> [DMESG-WARN][69] ([i915#180]) +6 similar issues
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-kbl4/igt@kms_flip@flip-vs-suspend@c-dp1.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl4/igt@kms_flip@flip-vs-suspend@c-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs:
    - shard-apl:          NOTRUN -> [SKIP][70] ([fdo#109271] / [i915#2672])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt:
    - shard-iclb:         NOTRUN -> [SKIP][71] ([fdo#109280]) +9 similar issues
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-cur-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-tglb:         [PASS][72] -> [INCOMPLETE][73] ([i915#2411] / [i915#2828] / [i915#456])
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-tglb3/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-cpu:
    - shard-glk:          NOTRUN -> [SKIP][74] ([fdo#109271]) +47 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk3/igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-mmap-cpu.html

  * igt@kms_frontbuffer_tracking@fbcpsr-suspend:
    - shard-tglb:         NOTRUN -> [INCOMPLETE][75] ([i915#2411] / [i915#456])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html

  * igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-pwrite:
    - shard-tglb:         NOTRUN -> [SKIP][76] ([fdo#111825]) +30 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@kms_frontbuffer_tracking@psr-2p-scndscrn-spr-indfb-draw-pwrite.html

  * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-wc:
    - shard-kbl:          NOTRUN -> [SKIP][77] ([fdo#109271]) +140 similar issues
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl2/igt@kms_frontbuffer_tracking@psr-rgb101010-draw-mmap-wc.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-apl:          [PASS][78] -> [DMESG-WARN][79] ([i915#180]) +2 similar issues
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-apl2/igt@kms_hdr@bpc-switch-suspend.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl2/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_hdr@static-swap:
    - shard-tglb:         NOTRUN -> [SKIP][80] ([i915#1187])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@kms_hdr@static-swap.html
    - shard-iclb:         NOTRUN -> [SKIP][81] ([i915#1187])
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb8/igt@kms_hdr@static-swap.html

  * igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes:
    - shard-tglb:         NOTRUN -> [SKIP][82] ([fdo#109289])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb3/igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d:
    - shard-apl:          NOTRUN -> [SKIP][83] ([fdo#109271] / [i915#533]) +2 similar issues
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html
    - shard-glk:          NOTRUN -> [SKIP][84] ([fdo#109271] / [i915#533])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
    - shard-kbl:          NOTRUN -> [FAIL][85] ([i915#265])
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl2/igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max:
    - shard-apl:          NOTRUN -> [FAIL][86] ([fdo#108145] / [i915#265])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl8/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-max.html

  * igt@kms_plane_cursor@pipe-d-overlay-size-256:
    - shard-iclb:         NOTRUN -> [SKIP][87] ([fdo#109278]) +18 similar issues
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb6/igt@kms_plane_cursor@pipe-d-overlay-size-256.html

  * igt@kms_plane_lowres@pipe-d-tiling-x:
    - shard-tglb:         NOTRUN -> [SKIP][88] ([i915#3536])
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb1/igt@kms_plane_lowres@pipe-d-tiling-x.html

  * igt@kms_plane_multiple@atomic-pipe-d-tiling-yf:
    - shard-tglb:         NOTRUN -> [SKIP][89] ([fdo#111615] / [fdo#112054])
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb7/igt@kms_plane_multiple@atomic-pipe-d-tiling-yf.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3:
    - shard-snb:          NOTRUN -> [SKIP][90] ([fdo#109271]) +85 similar issues
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-snb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3.html
    - shard-tglb:         NOTRUN -> [SKIP][91] ([i915#2920]) +2 similar issues
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb6/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-3.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5:
    - shard-kbl:          NOTRUN -> [SKIP][92] ([fdo#109271] / [i915#658]) +1 similar issue
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl6/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html
    - shard-apl:          NOTRUN -> [SKIP][93] ([fdo#109271] / [i915#658]) +2 similar issues
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl4/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html
    - shard-glk:          NOTRUN -> [SKIP][94] ([fdo#109271] / [i915#658]) +1 similar issue
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk3/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html
    - shard-iclb:         NOTRUN -> [SKIP][95] ([i915#658]) +1 similar issue
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb6/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-5.html

  * igt@kms_psr2_su@page_flip:
    - shard-tglb:         NOTRUN -> [SKIP][96] ([i915#1911])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb3/igt@kms_psr2_su@page_flip.html
    - shard-iclb:         NOTRUN -> [SKIP][97] ([fdo#109642] / [fdo#111068] / [i915#658])
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb6/igt@kms_psr2_su@page_flip.html

  * igt@kms_psr@psr2_primary_page_flip:
    - shard-tglb:         NOTRUN -> [FAIL][98] ([i915#132] / [i915#3467])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_psr@psr2_primary_page_flip.html

  * igt@kms_vrr@flip-basic:
    - shard-tglb:         NOTRUN -> [SKIP][99] ([fdo#109502]) +1 similar issue
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb1/igt@kms_vrr@flip-basic.html
    - shard-iclb:         NOTRUN -> [SKIP][100] ([fdo#109502]) +1 similar issue
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@kms_vrr@flip-basic.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-tglb:         NOTRUN -> [SKIP][101] ([i915#2437])
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@kms_writeback@writeback-fb-id.html

  * igt@nouveau_crc@pipe-c-source-rg:
    - shard-iclb:         NOTRUN -> [SKIP][102] ([i915#2530])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb6/igt@nouveau_crc@pipe-c-source-rg.html
    - shard-tglb:         NOTRUN -> [SKIP][103] ([i915#2530])
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb7/igt@nouveau_crc@pipe-c-source-rg.html

  * igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name:
    - shard-apl:          NOTRUN -> [SKIP][104] ([fdo#109271]) +120 similar issues
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl3/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html
    - shard-tglb:         NOTRUN -> [SKIP][105] ([fdo#109291]) +2 similar issues
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb5/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html
    - shard-iclb:         NOTRUN -> [SKIP][106] ([fdo#109291]) +2 similar issues
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb6/igt@prime_nv_api@i915_nv_reimport_twice_check_flink_name.html

  * igt@sysfs_clients@fair-3:
    - shard-tglb:         NOTRUN -> [SKIP][107] ([i915#2994])
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@sysfs_clients@fair-3.html

  * igt@sysfs_clients@split-50:
    - shard-apl:          NOTRUN -> [SKIP][108] ([fdo#109271] / [i915#2994]) +2 similar issues
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl3/igt@sysfs_clients@split-50.html

  * igt@tools_test@sysfs_l3_parity:
    - shard-tglb:         NOTRUN -> [SKIP][109] ([fdo#109307])
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@tools_test@sysfs_l3_parity.html

  
#### Possible fixes ####

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [FAIL][110] ([i915#2842]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-iclb3/igt@gem_exec_fair@basic-none-share@rcs0.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb7/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-glk:          [FAIL][112] ([i915#2842]) -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-glk6/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk9/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_whisper@basic-contexts-forked:
    - shard-glk:          [DMESG-WARN][114] ([i915#118]) -> [PASS][115] +2 similar issues
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-glk2/igt@gem_exec_whisper@basic-contexts-forked.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk1/igt@gem_exec_whisper@basic-contexts-forked.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-tglb:         [INCOMPLETE][116] ([i915#456] / [i915#750]) -> [PASS][117]
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-tglb7/igt@i915_suspend@fence-restore-tiled2untiled.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb8/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-tglb:         [INCOMPLETE][118] ([i915#456]) -> [PASS][119]
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-tglb7/igt@i915_suspend@fence-restore-untiled.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb5/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_big_fb@yf-tiled-16bpp-rotate-180:
    - shard-glk:          [FAIL][120] ([i915#3653]) -> [PASS][121]
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-glk6/igt@kms_big_fb@yf-tiled-16bpp-rotate-180.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk1/igt@kms_big_fb@yf-tiled-16bpp-rotate-180.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [INCOMPLETE][122] ([i915#180] / [i915#1982]) -> [PASS][123]
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-apl4/igt@kms_fbcon_fbt@fbc-suspend.html
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-apl2/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_fbcon_fbt@psr-suspend:
    - shard-tglb:         [INCOMPLETE][124] ([i915#2411] / [i915#456]) -> [PASS][125]
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-tglb7/igt@kms_fbcon_fbt@psr-suspend.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-tglb2/igt@kms_fbcon_fbt@psr-suspend.html

  * igt@kms_flip@2x-flip-vs-expired-vblank@ab-hdmi-a1-hdmi-a2:
    - shard-glk:          [FAIL][126] ([i915#2122]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-glk5/igt@kms_flip@2x-flip-vs-expired-vblank@ab-hdmi-a1-hdmi-a2.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-glk1/igt@kms_flip@2x-flip-vs-expired-vblank@ab-hdmi-a1-hdmi-a2.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-kbl:          [DMESG-WARN][128] ([i915#180]) -> [PASS][129] +7 similar issues
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-kbl3/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile:
    - shard-iclb:         [SKIP][130] ([i915#3701]) -> [PASS][131]
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/shard-iclb6/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytile.html

  * igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes:
    - shard-apl:          [DMESG-WARN][132] ([i915#180]) -> [PASS][133] +5 similar issues
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10888/shard-apl3/igt@kms_plane@plane-panning-bottom-right-suspend@pipe-a-planes.html
   [133]: https://intel-gfx-ci.01.org/tree/d

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

[-- Attachment #2: Type: text/html, Size: 33733 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
                   ` (4 preceding siblings ...)
  2021-11-19 22:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
@ 2021-11-19 23:15 ` Patchwork
  2021-11-25 18:54 ` [igt-dev] [PATCH i-g-t] " Harry Wentland
  6 siblings, 0 replies; 14+ messages in thread
From: Patchwork @ 2021-11-19 23:15 UTC (permalink / raw)
  To: Rodrigo Siqueira; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

== Series Details ==

Series: amdgpu/amd_mode_switch: Introduce mode switch test
URL   : https://patchwork.freedesktop.org/series/96996/
State : success

== Summary ==

CI Bug Log - changes from IGTPW_6408_full -> IGTPW_6408_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

Participating hosts (7 -> 7)
------------------------------

  No changes in participating hosts


Changes
-------

  No changes found


Build changes
-------------

  No differences in builds

  CI_DRM_10888: d4a23275467825243fea6f50938fc89711b9a53c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_6408: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_6408/index.html

[-- Attachment #2: Type: text/html, Size: 1422 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-19 15:51       ` Juha-Pekka Heikkila
@ 2021-11-24 15:16         ` Rodrigo Siqueira Jordao
  0 siblings, 0 replies; 14+ messages in thread
From: Rodrigo Siqueira Jordao @ 2021-11-24 15:16 UTC (permalink / raw)
  To: juhapekka.heikkila, Mark Yacoub, Rodrigo Siqueira, Vudum,
	Lakshminarayana
  Cc: igt-dev, markyacoub



On 2021-11-19 10:51 a.m., Juha-Pekka Heikkila wrote:
> On 19.11.2021 16.47, Rodrigo Siqueira Jordao wrote:
>> Hi,
>>
>> On 2021-11-16 5:05 p.m., Juha-Pekka Heikkilä wrote:
>>> I was wondering how is this different from kms_plane_lowres? On 
>>> kms_plane_lowres is also used crc to check also what's on screen stay 
>>> good.
>>
>> Afaik, we ignore kms_plane_lowres since most tests look related to 
>> tiling-[x|y], which I think is an Intel modifier (again, maybe I'm 
>> wrong). Anyway, I tried to run it on an AMD device, and most 
>> kms_plane_lowres subtest skips.
>>
>>> /Juha-Pekka
>>>
>>> Mark Yacoub kirjoitti 16.11.2021 klo 23.29:
>>>> The test looks pretty generic to me, can we make it a kms_ instead 
>>>> of AMD only?
>>
>> Mark, Juha-Pekka,
>>
>> Tbh, right now, I prefer to keep this test as AMD-specific because we 
>> are trying to fully upstream all of our tests, so we can rely on igt 
>> from the upstream. I can create a README file for amdgpu tests and 
>> create a TODO section where I can highlight that we can make this test 
>> and other generic; how about that?
> 
> Hi Siqueira,
> 
> I was not objecting of upstreaming AMD-specific tests, I don't have AMD 
> hw at hand hence I could not guess what are corners there might be hit. 
> I was just pointing there's test which seems to do by code and 
> description mostly what is done here, agreed only linear modifier test 
> will run on AMD hw now.
> 
> I think would be good idea to put TODO comment in to remind about 
> similarity of these tests, if they're the same test someone can go and 
> start merging them later.

Thanks Mark/Juha-Pekka/Lakshmi

I will create a README and a TODO file under amdgpu folder to keep track 
of these suggestions.

Thanks again
Siqueira

> /Juha-Pekka
> 
>>
>> Hi Lakshmi,
>>
>> This test is specific to AMD, but CI is failing. I think it is another 
>> false-positive. Here is the patch:
>>
>> https://patchwork.freedesktop.org/series/96996/ 
>>
>>
>> Thanks
>> Siqueira
>>
>>>> On Tue, Nov 16, 2021 at 4:00 PM Rodrigo Siqueira
>>>> <Rodrigo.Siqueira@amd.com> wrote:
>>>>>
>>>>> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>>>>
>>>>> Switching between different modes could potentially create pstate
>>>>> warnings if clocks are not being set correctly.
>>>>>
>>>>> The subtest gets the highest and lowest mode supported on the 
>>>>> connector
>>>>> and switch between them.
>>>>>
>>>>> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
>>>>> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
>>>>> ---
>>>>>   tests/amdgpu/amd_mode_switch.c | 210 
>>>>> +++++++++++++++++++++++++++++++++
>>>>>   tests/amdgpu/meson.build       |   1 +
>>>>>   2 files changed, 211 insertions(+)
>>>>>   create mode 100644 tests/amdgpu/amd_mode_switch.c
>>>>>
>>>>> diff --git a/tests/amdgpu/amd_mode_switch.c 
>>>>> b/tests/amdgpu/amd_mode_switch.c
>>>>> new file mode 100644
>>>>> index 00000000..270b1b9f
>>>>> --- /dev/null
>>>>> +++ b/tests/amdgpu/amd_mode_switch.c
>>>>> @@ -0,0 +1,210 @@
>>>>> +/*
>>>>> + * Copyright 2021 Advanced Micro Devices, Inc.
>>>>> + *
>>>>> + * Permission is hereby granted, free of charge, to any person 
>>>>> obtaining a
>>>>> + * copy of this software and associated documentation files (the 
>>>>> "Software"),
>>>>> + * to deal in the Software without restriction, including without 
>>>>> limitation
>>>>> + * the rights to use, copy, modify, merge, publish, distribute, 
>>>>> sublicense,
>>>>> + * and/or sell copies of the Software, and to permit persons to 
>>>>> whom the
>>>>> + * Software is furnished to do so, subject to the following 
>>>>> conditions:
>>>>> + *
>>>>> + * The above copyright notice and this permission notice shall be 
>>>>> included in
>>>>> + * all copies or substantial portions of the Software.
>>>>> + *
>>>>> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
>>>>> EXPRESS OR
>>>>> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
>>>>> MERCHANTABILITY,
>>>>> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO 
>>>>> EVENT SHALL
>>>>> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, 
>>>>> DAMAGES OR
>>>>> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
>>>>> OTHERWISE,
>>>>> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 
>>>>> USE OR
>>>>> + * OTHER DEALINGS IN THE SOFTWARE.
>>>>> + */
>>>>> +
>>>>> +#include "igt.h"
>>>>> +#include <xf86drmMode.h>
>>>>> +
>>>>> +#define MAX_PIPES 6
>>>>> +
>>>>> +/* Common test data. */
>>>>> +typedef struct data {
>>>>> +       igt_display_t display;
>>>>> +       igt_plane_t *primary[MAX_PIPES];
>>>>> +       igt_output_t *output[MAX_PIPES];
>>>>> +       int fd;
>>>>> +} data_t;
>>>>> +
>>>>> +static void test_init(data_t *data)
>>>>> +{
>>>>> +       igt_display_t *display = &data->display;
>>>>> +       int i;
>>>>> +
>>>>> +       for_each_pipe(display, i) {
>>>>> +               igt_output_t *output = &display->outputs[i];
>>>>> +
>>>>> +               data->primary[i] = igt_pipe_get_plane_type(
>>>>> +                       &data->display.pipes[i], 
>>>>> DRM_PLANE_TYPE_PRIMARY);
>>>>> +
>>>>> +               data->output[i] = output;
>>>>> +       }
>>>>> +
>>>>> +       igt_require(data->output[0]);
>>>>> +       igt_display_reset(display);
>>>>> +}
>>>>> +
>>>>> +static void test_fini(data_t *data)
>>>>> +{
>>>>> +       igt_display_t *display = &data->display;
>>>>> +
>>>>> +       igt_display_reset(display);
>>>>> +       igt_display_commit_atomic(display, 
>>>>> DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
>>>>> +}
>>>>> +
>>>>> +/* Forces a mode for a connector. */
>>>>> +static void force_output_mode(data_t *d, igt_output_t *output,
>>>>> +                             const drmModeModeInfo *mode)
>>>>> +{
>>>>> +       /* This allows us to create a virtual sink. */
>>>>> +       if (!igt_output_is_connected(output)) {
>>>>> +               kmstest_force_edid(d->fd, output->config.connector,
>>>>> +                                  igt_kms_get_4k_edid());
>>>>> +
>>>>> +               kmstest_force_connector(d->fd, 
>>>>> output->config.connector,
>>>>> +                                       FORCE_CONNECTOR_DIGITAL);
>>>>> +       }
>>>>> +
>>>>> +       igt_output_override_mode(output, mode);
>>>>> +}
>>>>> +
>>>>> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
>>>>> +{
>>>>> +       igt_output_t *output;
>>>>> +       struct igt_fb *buffer1[MAX_PIPES] = { NULL };
>>>>> +       struct igt_fb *buffer2[MAX_PIPES] = { NULL };
>>>>> +       drmModeConnectorPtr conn;
>>>>> +       drmModeModeInfoPtr kmode;
>>>>> +       void *user_data = NULL;
>>>>> +       int i = 0;
>>>>> +       int j = 0;
>>>>> +
>>>>> +       test_init(data);
>>>>> +
>>>>> +       igt_skip_on_f(num_pipes > 
>>>>> igt_display_get_n_pipes(&data->display) ||
>>>>> +                             num_pipes > data->display.n_outputs,
>>>>> +                     "ASIC does not have %d outputs/pipes\n", 
>>>>> num_pipes);
>>>>> +
>>>>> +       /* First supported mode */
>>>>> +
>>>>> +       for (j = 0; j < num_pipes; j++) {
>>>>> +               output = data->output[j];
>>>>> +               if (!igt_output_is_connected(output))
>>>>> +                       continue;
>>>>> +
>>>>> +               conn = drmModeGetConnector(
>>>>> +                       data->fd, 
>>>>> output->config.connector->connector_id);
>>>>> +
>>>>> +               kmode = &conn->modes[0];
>>>>> +               if (buffer1[j] == NULL) {
>>>>> +                       igt_fb_t fb;
>>>>> +                       buffer1[j] = &fb;
>>>>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>>>>> +                                           kmode->vdisplay,
>>>>> +                                           DRM_FORMAT_XRGB8888,
>>>>> +                                           DRM_FORMAT_MOD_NONE, 
>>>>> 1.f, 0.f,
>>>>> +                                           0.f, buffer1[j]);
>>>>> +               }
>>>>> +               igt_output_set_pipe(output, j);
>>>>> +               force_output_mode(data, output, kmode);
>>>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>>>> +               drmModeFreeConnector(conn);
>>>>> +       }
>>>>> +
>>>>> +       igt_display_commit_atomic(&data->display, 
>>>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>>>> +                                 user_data);
>>>>> +
>>>>> +       /* Last supported mode */
>>>>> +
>>>>> +       for (j = 0; j < num_pipes; j++) {
>>>>> +               output = data->output[j];
>>>>> +               if (!igt_output_is_connected(output))
>>>>> +                       continue;
>>>>> +
>>>>> +               conn = drmModeGetConnector(
>>>>> +                       data->fd, 
>>>>> output->config.connector->connector_id);
>>>>> +
>>>>> +               kmode = &conn->modes[conn->count_modes - 1];
>>>>> +               if (buffer2[j] == NULL) {
>>>>> +                       igt_fb_t fb;
>>>>> +                       buffer2[j] = &fb;
>>>>> +                       igt_create_color_fb(data->fd, kmode->hdisplay,
>>>>> +                                           kmode->vdisplay,
>>>>> +                                           DRM_FORMAT_XRGB8888,
>>>>> +                                           DRM_FORMAT_MOD_NONE, 
>>>>> 1.f, 0.f,
>>>>> +                                           0.f, buffer2[j]);
>>>>> +               }
>>>>> +               force_output_mode(data, output, kmode);
>>>>> +               igt_plane_set_fb(data->primary[j], buffer2[j]);
>>>>> +               drmModeFreeConnector(conn);
>>>>> +       }
>>>>> +
>>>>> +       igt_display_commit_atomic(&data->display, 
>>>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>>>> +                                 user_data);
>>>>> +
>>>>> +       /* First supported again */
>>>>> +       for (j = 0; j < num_pipes; j++) {
>>>>> +               output = data->output[j];
>>>>> +               if (!igt_output_is_connected(output))
>>>>> +                       continue;
>>>>> +
>>>>> +               conn = drmModeGetConnector(
>>>>> +                       data->fd, 
>>>>> output->config.connector->connector_id);
>>>>> +
>>>>> +               kmode = &conn->modes[0];
>>>>> +               force_output_mode(data, output, kmode);
>>>>> +               igt_plane_set_fb(data->primary[j], buffer1[j]);
>>>>> +               drmModeFreeConnector(conn);
>>>>> +       }
>>>>> +
>>>>> +       igt_display_commit_atomic(&data->display, 
>>>>> DRM_MODE_ATOMIC_ALLOW_MODESET,
>>>>> +                                 user_data);
>>>>> +
>>>>> +       test_fini(data);
>>>>> +
>>>>> +       for (i = 0; i <= num_pipes; i++) {
>>>>> +               igt_remove_fb(data->fd, buffer1[i]);
>>>>> +               igt_remove_fb(data->fd, buffer2[i]);
>>>>> +       }
>>>>> +}
>>>>> +
>>>>> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
>>>>> +igt_main
>>>>> +{
>>>>> +       data_t data;
>>>>> +       int i = 0;
>>>>> +
>>>>> +       igt_skip_on_simulation();
>>>>> +
>>>>> +       memset(&data, 0, sizeof(data));
>>>>> +
>>>>> +       igt_fixture
>>>>> +       {
>>>>> +               data.fd = drm_open_driver_master(DRIVER_AMDGPU);
>>>>> +
>>>>> +               kmstest_set_vt_graphics_mode();
>>>>> +
>>>>> +               igt_display_require(&data.display, data.fd);
>>>>> +               igt_require(&data.display.is_atomic);
>>>>> +               igt_display_require_output(&data.display);
>>>>> +       }
>>>>> +
>>>>> +       for (i = 0; i < MAX_PIPES; i++) {
>>>>> +               igt_describe(
>>>>> +                       "Test between switching highest and lowest 
>>>>> supported mode");
>>>>> +               igt_subtest_f("mode-switch-first-last-pipe-%d", i)
>>>>> +                       run_mode_switch_first_last(&data, i + 1);
>>>>> +       }
>>>>> +
>>>>> +       igt_fixture
>>>>> +       {
>>>>> +               igt_display_fini(&data.display);
>>>>> +       }
>>>>> +}
>>>>> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
>>>>> index b736c456..5216e194 100644
>>>>> --- a/tests/amdgpu/meson.build
>>>>> +++ b/tests/amdgpu/meson.build
>>>>> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>>>>>                            'amd_mem_leak',
>>>>>                            'amd_link_settings',
>>>>>                            'amd_vrr_range',
>>>>> +                         'amd_mode_switch',
>>>>>                          ]
>>>>>          amdgpu_deps += libdrm_amdgpu
>>>>>   endif
>>>>> -- 
>>>>> 2.25.1
>>>>>
>>
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test
  2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
                   ` (5 preceding siblings ...)
  2021-11-19 23:15 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
@ 2021-11-25 18:54 ` Harry Wentland
  6 siblings, 0 replies; 14+ messages in thread
From: Harry Wentland @ 2021-11-25 18:54 UTC (permalink / raw)
  To: Rodrigo Siqueira, aurabindo.pillai, markyacoub, nicholas.choi; +Cc: igt-dev

On 2021-11-16 16:00, Rodrigo Siqueira wrote:
> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
> 
> Switching between different modes could potentially create pstate
> warnings if clocks are not being set correctly.
> 
> The subtest gets the highest and lowest mode supported on the connector
> and switch between them.
> 
> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>

Acked-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  tests/amdgpu/amd_mode_switch.c | 210 +++++++++++++++++++++++++++++++++
>  tests/amdgpu/meson.build       |   1 +
>  2 files changed, 211 insertions(+)
>  create mode 100644 tests/amdgpu/amd_mode_switch.c
> 
> diff --git a/tests/amdgpu/amd_mode_switch.c b/tests/amdgpu/amd_mode_switch.c
> new file mode 100644
> index 00000000..270b1b9f
> --- /dev/null
> +++ b/tests/amdgpu/amd_mode_switch.c
> @@ -0,0 +1,210 @@
> +/*
> + * Copyright 2021 Advanced Micro Devices, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + * OTHER DEALINGS IN THE SOFTWARE.
> + */
> +
> +#include "igt.h"
> +#include <xf86drmMode.h>
> +
> +#define MAX_PIPES 6
> +
> +/* Common test data. */
> +typedef struct data {
> +	igt_display_t display;
> +	igt_plane_t *primary[MAX_PIPES];
> +	igt_output_t *output[MAX_PIPES];
> +	int fd;
> +} data_t;
> +
> +static void test_init(data_t *data)
> +{
> +	igt_display_t *display = &data->display;
> +	int i;
> +
> +	for_each_pipe(display, i) {
> +		igt_output_t *output = &display->outputs[i];
> +
> +		data->primary[i] = igt_pipe_get_plane_type(
> +			&data->display.pipes[i], DRM_PLANE_TYPE_PRIMARY);
> +
> +		data->output[i] = output;
> +	}
> +
> +	igt_require(data->output[0]);
> +	igt_display_reset(display);
> +}
> +
> +static void test_fini(data_t *data)
> +{
> +	igt_display_t *display = &data->display;
> +
> +	igt_display_reset(display);
> +	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, 0);
> +}
> +
> +/* Forces a mode for a connector. */
> +static void force_output_mode(data_t *d, igt_output_t *output,
> +			      const drmModeModeInfo *mode)
> +{
> +	/* This allows us to create a virtual sink. */
> +	if (!igt_output_is_connected(output)) {
> +		kmstest_force_edid(d->fd, output->config.connector,
> +				   igt_kms_get_4k_edid());
> +
> +		kmstest_force_connector(d->fd, output->config.connector,
> +					FORCE_CONNECTOR_DIGITAL);
> +	}
> +
> +	igt_output_override_mode(output, mode);
> +}
> +
> +static void run_mode_switch_first_last(data_t *data, int num_pipes)
> +{
> +	igt_output_t *output;
> +	struct igt_fb *buffer1[MAX_PIPES] = { NULL };
> +	struct igt_fb *buffer2[MAX_PIPES] = { NULL };
> +	drmModeConnectorPtr conn;
> +	drmModeModeInfoPtr kmode;
> +	void *user_data = NULL;
> +	int i = 0;
> +	int j = 0;
> +
> +	test_init(data);
> +
> +	igt_skip_on_f(num_pipes > igt_display_get_n_pipes(&data->display) ||
> +			      num_pipes > data->display.n_outputs,
> +		      "ASIC does not have %d outputs/pipes\n", num_pipes);
> +
> +	/* First supported mode */
> +
> +	for (j = 0; j < num_pipes; j++) {
> +		output = data->output[j];
> +		if (!igt_output_is_connected(output))
> +			continue;
> +
> +		conn = drmModeGetConnector(
> +			data->fd, output->config.connector->connector_id);
> +
> +		kmode = &conn->modes[0];
> +		if (buffer1[j] == NULL) {
> +			igt_fb_t fb;
> +			buffer1[j] = &fb;
> +			igt_create_color_fb(data->fd, kmode->hdisplay,
> +					    kmode->vdisplay,
> +					    DRM_FORMAT_XRGB8888,
> +					    DRM_FORMAT_MOD_NONE, 1.f, 0.f,
> +					    0.f, buffer1[j]);
> +		}
> +		igt_output_set_pipe(output, j);
> +		force_output_mode(data, output, kmode);
> +		igt_plane_set_fb(data->primary[j], buffer1[j]);
> +		drmModeFreeConnector(conn);
> +	}
> +
> +	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  user_data);
> +
> +	/* Last supported mode */
> +
> +	for (j = 0; j < num_pipes; j++) {
> +		output = data->output[j];
> +		if (!igt_output_is_connected(output))
> +			continue;
> +
> +		conn = drmModeGetConnector(
> +			data->fd, output->config.connector->connector_id);
> +
> +		kmode = &conn->modes[conn->count_modes - 1];
> +		if (buffer2[j] == NULL) {
> +			igt_fb_t fb;
> +			buffer2[j] = &fb;
> +			igt_create_color_fb(data->fd, kmode->hdisplay,
> +					    kmode->vdisplay,
> +					    DRM_FORMAT_XRGB8888,
> +					    DRM_FORMAT_MOD_NONE, 1.f, 0.f,
> +					    0.f, buffer2[j]);
> +		}
> +		force_output_mode(data, output, kmode);
> +		igt_plane_set_fb(data->primary[j], buffer2[j]);
> +		drmModeFreeConnector(conn);
> +	}
> +
> +	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  user_data);
> +
> +	/* First supported again */
> +	for (j = 0; j < num_pipes; j++) {
> +		output = data->output[j];
> +		if (!igt_output_is_connected(output))
> +			continue;
> +
> +		conn = drmModeGetConnector(
> +			data->fd, output->config.connector->connector_id);
> +
> +		kmode = &conn->modes[0];
> +		force_output_mode(data, output, kmode);
> +		igt_plane_set_fb(data->primary[j], buffer1[j]);
> +		drmModeFreeConnector(conn);
> +	}
> +
> +	igt_display_commit_atomic(&data->display, DRM_MODE_ATOMIC_ALLOW_MODESET,
> +				  user_data);
> +
> +	test_fini(data);
> +
> +	for (i = 0; i <= num_pipes; i++) {
> +		igt_remove_fb(data->fd, buffer1[i]);
> +		igt_remove_fb(data->fd, buffer2[i]);
> +	}
> +}
> +
> +IGT_TEST_DESCRIPTION("Test switching between supported modes");
> +igt_main
> +{
> +	data_t data;
> +	int i = 0;
> +
> +	igt_skip_on_simulation();
> +
> +	memset(&data, 0, sizeof(data));
> +
> +	igt_fixture
> +	{
> +		data.fd = drm_open_driver_master(DRIVER_AMDGPU);
> +
> +		kmstest_set_vt_graphics_mode();
> +
> +		igt_display_require(&data.display, data.fd);
> +		igt_require(&data.display.is_atomic);
> +		igt_display_require_output(&data.display);
> +	}
> +
> +	for (i = 0; i < MAX_PIPES; i++) {
> +		igt_describe(
> +			"Test between switching highest and lowest supported mode");
> +		igt_subtest_f("mode-switch-first-last-pipe-%d", i)
> +			run_mode_switch_first_last(&data, i + 1);
> +	}
> +
> +	igt_fixture
> +	{
> +		igt_display_fini(&data.display);
> +	}
> +}
> diff --git a/tests/amdgpu/meson.build b/tests/amdgpu/meson.build
> index b736c456..5216e194 100644
> --- a/tests/amdgpu/meson.build
> +++ b/tests/amdgpu/meson.build
> @@ -16,6 +16,7 @@ if libdrm_amdgpu.found()
>  			  'amd_mem_leak',
>  			  'amd_link_settings',
>  			  'amd_vrr_range',
> +			  'amd_mode_switch',
>  			]
>  	amdgpu_deps += libdrm_amdgpu
>  endif
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-11-25 18:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 21:00 [igt-dev] [PATCH i-g-t] amdgpu/amd_mode_switch: Introduce mode switch test Rodrigo Siqueira
2021-11-16 21:29 ` Mark Yacoub
2021-11-16 22:05   ` Juha-Pekka Heikkilä
2021-11-19 14:47     ` Rodrigo Siqueira Jordao
2021-11-19 15:48       ` Mark Yacoub
2021-11-19 15:51       ` Juha-Pekka Heikkila
2021-11-24 15:16         ` Rodrigo Siqueira Jordao
2021-11-19 17:25       ` Vudum, Lakshminarayana
2021-11-16 23:28 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2021-11-19 17:13 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-11-19 17:15 ` Patchwork
2021-11-19 22:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-11-19 23:15 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2021-11-25 18:54 ` [igt-dev] [PATCH i-g-t] " Harry Wentland

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.