Skip to contentSkip to conversation

tools/amd_hdmi_compliance_yuv420: Test 4K video modes with YUV encoding

PATCH Superseded Wang, Chao-kai (Stylon) 4 participants 6 messages Sep 11, 2019 – Sep 16, 2019 Arm/Amlogic Meson SoC support

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/amd_hdmi_compliance_yuv420: Test 4K video modes with YUV encoding

From: Stylon Wang <[email protected]>

HDMI 2.0 compliance tests needs 4K modes with YUV encoding. This test selects 4K modes based on specified VIC.

---
 tools/Makefile.am                  |   3 +
 tools/Makefile.sources             |   4 +
 tools/amd_hdmi_compliance_yuv420.c | 193 +++++++++++++++++++++++++++++
 tools/meson.build                  |   5 +
 4 files changed, 205 insertions(+)
 create mode 100644 tools/amd_hdmi_compliance_yuv420.c
tools/Makefile.am +3 -0
index 4f54720f..1a23e078 100644
@@ -11,6 +11,9 @@ bin_PROGRAMS += intel_dp_compliance
 intel_dp_compliance_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
 intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la
 
+bin_PROGRAMS += amd_hdmi_compliance_yuv420
+amd_hdmi_compliance_yuv420_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
+
 SUBDIRS = null_state_gen registers
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi -I$(top_srcdir)/lib \
tools/Makefile.sources +4 -0
index 50706f41..8196cb59 100644
@@ -66,3 +66,7 @@ intel_dp_compliance_SOURCES = \
         intel_dp_compliance_hotplug.c \
         $(NULL)
 
+amd_hdmi_compliance_yuv420_SOURCES = \
+        amd_hdmi_compliance_yuv420.c \
+		$(NULL)
+
tools/amd_hdmi_compliance_yuv420.c new file +193 -0

193 lines not on this page · raw message

tools/meson.build +5 -0
index 6e72b263..fa366ab2 100644
@@ -100,6 +100,11 @@ executable('intel_gpu_top', 'intel_gpu_top.c',
 	   install_rpath : bindir_rpathdir,
 	   dependencies : lib_igt_perf)
 
+executable('amd_hdmi_compliance_yuv420', 'amd_hdmi_compliance_yuv420.c',
+	   dependencies : [tool_deps],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
 conf_data = configuration_data()
 conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
Signature · 6 lines
2.17.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#1 lore raw
Quoted 4 lines · Chao-kai (Stylon)

From: Stylon Wang <[email protected]>

HDMI 2.0 compliance tests needs 4K modes with YUV encoding. This test selects 4K modes based on specified VIC.

It helps to note what changed in a patch series in both the patch title and in the commit message here.

You can add a v2 to the patch header by appending a -v2 to your command, eg:

"git send-email -v2 ..."

And in the commit description you should do something like:

v2:
- example change 1
- example change 2

Other than that, I do have some general comments and nitpicks:

I think this tool might be better off named as just amd_hdmi_compliance so we can expand on this later.

Nicholas Kazlauskas

Quoted 69 lines
---
  tools/Makefile.am                  |   3 +
  tools/Makefile.sources             |   4 +
  tools/amd_hdmi_compliance_yuv420.c | 193 +++++++++++++++++++++++++++++
  tools/meson.build                  |   5 +
  4 files changed, 205 insertions(+)

create mode 100644 tools/amd_hdmi_compliance_yuv420.c

tools/Makefile.am +3 -0
index 4f54720f..1a23e078 100644
@@ -11,6 +11,9 @@ bin_PROGRAMS += intel_dp_compliance
  intel_dp_compliance_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
  intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la
 
+bin_PROGRAMS += amd_hdmi_compliance_yuv420
+amd_hdmi_compliance_yuv420_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
+
  SUBDIRS = null_state_gen registers
 
  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi -I$(top_srcdir)/lib \
tools/Makefile.sources +4 -0
index 50706f41..8196cb59 100644
@@ -66,3 +66,7 @@ intel_dp_compliance_SOURCES = \
          intel_dp_compliance_hotplug.c \
          $(NULL)
 
+amd_hdmi_compliance_yuv420_SOURCES = \
+        amd_hdmi_compliance_yuv420.c \
+		$(NULL)
+
tools/amd_hdmi_compliance_yuv420.c new file +27 -0
new file mode 100644
index 00000000..5f5eae2c
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2019 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"
+
+/* Common test data */
+typedef struct data {
+	struct igt_fb pattern_fb_info;

tools/amd_hdmi_compliance_yuv420.c line 37

Quoted 10 lines
tools/amd_hdmi_compliance_yuv420.c new file +10 -0
+	int fd;
+	igt_display_t display;
+	igt_plane_t *primary;
+	igt_output_t *output;
+	igt_pipe_t *pipe;
+	enum pipe pipe_id;
+	bool use_virtual_connector;
+} data_t;
+
+// Video modes indexed by VIC

IGT uses kernel style formatting so this comment should be:

/* Video modes indexed by VIC */

Quoted 91 lines
tools/amd_hdmi_compliance_yuv420.c new file +91 -0
+static drmModeModeInfo test_modes[] = {
+	[1] = { 25175,
+			640, 656, 752, 800, 0,
+			480, 489, 492, 525, 0,
+			60, 0xa, 0x40,
+			"640x480",	/* VIC 1 */
+	},
+	[96] = { 594000,
+			 3840, 4896, 4984, 5280, 0,
+			 2160, 2168, 2178, 2250, 0,
+			50, 0x5|DRM_MODE_FLAG_PIC_AR_16_9, 0x40,
+			"3840x2160",	/* VIC 96 */
+	},
+	[97] = { 594000,
+			3840, 4016, 4104, 4400, 0,
+			2160, 2168, 2178, 2250, 0,
+			60, 0x5|DRM_MODE_FLAG_PIC_AR_16_9, 0x40,
+			"3840x2160",	/* VIC 97 */
+	},
+	[101] = { 594000,
+			  4096, 5064, 5152, 5280, 0,
+			  2160, 2168, 2178, 2250, 0,
+			  50, 0x5|DRM_MODE_FLAG_PIC_AR_256_135, 0x40,
+			  "4096x2160",	/* VIC 101 */
+	},
+	[102] = { 594000,
+			  4096, 4184, 4272, 4400, 0,
+			  2160, 2168, 2178, 2250, 0,
+			  60, 0x5|DRM_MODE_FLAG_PIC_AR_256_135, 0x40,
+			  "4096x2160",	/* VIC 102 */
+	},
+	[106] = { 594000,
+			 3840, 4896, 4984, 5280, 0,
+			 2160, 2168, 2178, 2250, 0,
+			50, 0x5|DRM_MODE_FLAG_PIC_AR_64_27, 0x40,
+			"3840x2160",	/* VIC 106 */
+	},
+	[107] = { 594000,
+			3840, 4016, 4104, 4400, 0,
+			2160, 2168, 2178, 2250, 0,
+			60, 0x5|DRM_MODE_FLAG_PIC_AR_64_27, 0x40,
+			"3840x2160",	/* VIC 107 */
+	},
+};
+
+/* Common test setup. */
+static void test_init(data_t *data)
+{
+	igt_display_t *display = &data->display;
+
+	data->pipe_id = PIPE_A;
+	data->pipe = &data->display.pipes[data->pipe_id];
+
+	igt_display_reset(display);
+
+	/* find a connected HDMI output */
+	data->output = NULL;
+	for (int i=0; i < data->display.n_outputs; ++i) {
+		drmModeConnector *connector = data->display.outputs[i].config.connector;
+		if (connector->connection == DRM_MODE_CONNECTED &&
+				(connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+				 (data->use_virtual_connector &&
+				  connector->connector_type == DRM_MODE_CONNECTOR_VIRTUAL))) {
+			data->output = &data->display.outputs[i];
+		}
+	}
+
+	igt_require(data->output);
+
+	data->primary =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	igt_output_set_pipe(data->output, data->pipe_id);
+
+}
+
+/* Common test cleanup. */
+static void test_fini(data_t *data)
+{
+	igt_display_reset(&data->display);
+}
+
+static void test_vic_mode(data_t *data, int vic)
+{
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	igt_fb_t afb;
+
+	test_init(data);
+
+	mode = &test_modes[vic];

tools/amd_hdmi_compliance_yuv420.c line 138

Quoted 10 lines
tools/amd_hdmi_compliance_yuv420.c new file +10 -0
+
+	igt_output_override_mode(data->output, mode);
+
+	igt_create_pattern_fb(data->fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888, 0, &afb);
+
+	igt_plane_set_fb(data->primary, &afb);
+
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+	fprintf(stderr, "Press [Enter] to finish\n");

I think igt_info(...) is preferred here over fprintf directly.

tools/amd_hdmi_compliance_yuv420.c line 139

Quoted 1 line
tools/amd_hdmi_compliance_yuv420.c new file +1 -0
+	getchar();

I understand that you aren't using igt_debug_wait_for_keypress here, but I think an improvement that could be made is to extract this out into a sub function that waits explicitly for the newline:

static void wait_for_keypress(void)

{
	while (getchar() != '\n')
		;
}

tools/amd_hdmi_compliance_yuv420.c line 150

Quoted 11 lines
tools/amd_hdmi_compliance_yuv420.c new file +11 -0
+
+	test_fini(data);
+}
+
+const char *optstr = "hvt:";
+static void usage(const char *name)
+{
+	fprintf(stderr, "Usage: %s [-ht]\n", name);
+	fprintf(stderr, "-h:	show help\n");
+	fprintf(stderr, "-t vic: select video mode based on VIC\n");
+	fprintf(stderr, "-v:	test on 'Virtual' connector as well, for debugging.\n");

igt_info(...) if possible here

Quoted 19 lines
tools/amd_hdmi_compliance_yuv420.c new file +19 -0
+}
+
+int main(int argc, char **argv)
+{
+	data_t data;
+	int c;
+	int vic = 1; /* default to VIC 1 (640x480) */
+
+	memset(&data, 0, sizeof(data));
+
+	while((c = getopt(argc, argv, optstr)) != -1) {
+		switch(c) {
+		case 't':
+			vic = atoi(optarg);
+			break;
+		case 'v':
+			data.use_virtual_connector = true;
+			break;
+		default:

tools/amd_hdmi_compliance_yuv420.c line 179

Quoted 10 lines
tools/amd_hdmi_compliance_yuv420.c new file +10 -0
+		case 'h':
+			usage(argv[0]);
+			exit(1);
+		}
+	}
+
+	if (vic < 1 ||
+		vic > ARRAY_SIZE(test_modes) ||
+		!test_modes[vic].name[0]) {
+		fprintf(stderr, "VIC %d is not supported\n", vic);

igt_info(...) if possible here

Quoted 21 lines
tools/amd_hdmi_compliance_yuv420.c new file +14 -0
+		exit(1);
+	}
+
+	data.fd = drm_open_driver_master(DRIVER_ANY);
+	kmstest_set_vt_graphics_mode();
+
+	igt_display_require(&data.display, data.fd);
+	igt_require(data.display.is_atomic);
+	igt_display_require_output(&data.display);
+
+	test_vic_mode(&data, vic);
+
+	igt_display_fini(&data.display);
+}
tools/meson.build +0 -0
index 6e72b263..fa366ab2 100644
@@ -100,6 +100,11 @@ executable('intel_gpu_top', 'intel_gpu_top.c',
  	   install_rpath : bindir_rpathdir,

tools/meson.build executable('intel_gpu_top', 'intel_gpu_top.c', · line 110

Quoted 10 lines
tools/meson.build +5 -0
  	   dependencies : lib_igt_perf)
 
+executable('amd_hdmi_compliance_yuv420', 'amd_hdmi_compliance_yuv420.c',
+	   dependencies : [tool_deps],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
  conf_data = configuration_data()
  conf_data.set('prefix', prefix)
  conf_data.set('exec_prefix', '${prefix}')

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#2 lore raw
Quoted 15 lines · Nicholas
Quoted 4 lines · Chao-kai (Stylon)

From: Stylon Wang <[email protected]>

HDMI 2.0 compliance tests needs 4K modes with YUV encoding. This test selects 4K modes based on specified VIC.

It helps to note what changed in a patch series in both the patch title and in the commit message here.

You can add a v2 to the patch header by appending a -v2 to your command, eg:

"git send-email -v2 ..."

And in the commit description you should do something like:

Quoted 8 lines

v2:
- example change 1
- example change 2

Other than that, I do have some general comments and nitpicks:

I think this tool might be better off named as just amd_hdmi_compliance so we can expand on this later.

Is there anything specific that makes this tool AMD-specific? It even uses DRIVER_ANY.

I guess the same question can be asked about intel_dp_compliance.c...

Signature · 1 line
Petri Latvala
Quoted 270 lines

Nicholas Kazlauskas

Quoted 69 lines
---
  tools/Makefile.am                  |   3 +
  tools/Makefile.sources             |   4 +
  tools/amd_hdmi_compliance_yuv420.c | 193 +++++++++++++++++++++++++++++
  tools/meson.build                  |   5 +
  4 files changed, 205 insertions(+)

create mode 100644 tools/amd_hdmi_compliance_yuv420.c

tools/Makefile.am +3 -0
index 4f54720f..1a23e078 100644
@@ -11,6 +11,9 @@ bin_PROGRAMS += intel_dp_compliance
  intel_dp_compliance_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
  intel_dp_compliance_LDADD = $(top_builddir)/lib/libintel_tools.la
 
+bin_PROGRAMS += amd_hdmi_compliance_yuv420
+amd_hdmi_compliance_yuv420_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
+
  SUBDIRS = null_state_gen registers
 
  AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include/drm-uapi -I$(top_srcdir)/lib \
tools/Makefile.sources +4 -0
index 50706f41..8196cb59 100644
@@ -66,3 +66,7 @@ intel_dp_compliance_SOURCES = \
          intel_dp_compliance_hotplug.c \
          $(NULL)
 
+amd_hdmi_compliance_yuv420_SOURCES = \
+        amd_hdmi_compliance_yuv420.c \
+		$(NULL)
+
tools/amd_hdmi_compliance_yuv420.c new file +27 -0
new file mode 100644
index 00000000..5f5eae2c
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2019 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"
+
+/* Common test data */
+typedef struct data {
+	struct igt_fb pattern_fb_info;

tools/amd_hdmi_compliance_yuv420.c line 37

Quoted 10 lines
tools/amd_hdmi_compliance_yuv420.c new file +10 -0
+	int fd;
+	igt_display_t display;
+	igt_plane_t *primary;
+	igt_output_t *output;
+	igt_pipe_t *pipe;
+	enum pipe pipe_id;
+	bool use_virtual_connector;
+} data_t;
+
+// Video modes indexed by VIC

IGT uses kernel style formatting so this comment should be:

/* Video modes indexed by VIC */

Quoted 91 lines
tools/amd_hdmi_compliance_yuv420.c new file +91 -0
+static drmModeModeInfo test_modes[] = {
+	[1] = { 25175,
+			640, 656, 752, 800, 0,
+			480, 489, 492, 525, 0,
+			60, 0xa, 0x40,
+			"640x480",	/* VIC 1 */
+	},
+	[96] = { 594000,
+			 3840, 4896, 4984, 5280, 0,
+			 2160, 2168, 2178, 2250, 0,
+			50, 0x5|DRM_MODE_FLAG_PIC_AR_16_9, 0x40,
+			"3840x2160",	/* VIC 96 */
+	},
+	[97] = { 594000,
+			3840, 4016, 4104, 4400, 0,
+			2160, 2168, 2178, 2250, 0,
+			60, 0x5|DRM_MODE_FLAG_PIC_AR_16_9, 0x40,
+			"3840x2160",	/* VIC 97 */
+	},
+	[101] = { 594000,
+			  4096, 5064, 5152, 5280, 0,
+			  2160, 2168, 2178, 2250, 0,
+			  50, 0x5|DRM_MODE_FLAG_PIC_AR_256_135, 0x40,
+			  "4096x2160",	/* VIC 101 */
+	},
+	[102] = { 594000,
+			  4096, 4184, 4272, 4400, 0,
+			  2160, 2168, 2178, 2250, 0,
+			  60, 0x5|DRM_MODE_FLAG_PIC_AR_256_135, 0x40,
+			  "4096x2160",	/* VIC 102 */
+	},
+	[106] = { 594000,
+			 3840, 4896, 4984, 5280, 0,
+			 2160, 2168, 2178, 2250, 0,
+			50, 0x5|DRM_MODE_FLAG_PIC_AR_64_27, 0x40,
+			"3840x2160",	/* VIC 106 */
+	},
+	[107] = { 594000,
+			3840, 4016, 4104, 4400, 0,
+			2160, 2168, 2178, 2250, 0,
+			60, 0x5|DRM_MODE_FLAG_PIC_AR_64_27, 0x40,
+			"3840x2160",	/* VIC 107 */
+	},
+};
+
+/* Common test setup. */
+static void test_init(data_t *data)
+{
+	igt_display_t *display = &data->display;
+
+	data->pipe_id = PIPE_A;
+	data->pipe = &data->display.pipes[data->pipe_id];
+
+	igt_display_reset(display);
+
+	/* find a connected HDMI output */
+	data->output = NULL;
+	for (int i=0; i < data->display.n_outputs; ++i) {
+		drmModeConnector *connector = data->display.outputs[i].config.connector;
+		if (connector->connection == DRM_MODE_CONNECTED &&
+				(connector->connector_type == DRM_MODE_CONNECTOR_HDMIA ||
+				 (data->use_virtual_connector &&
+				  connector->connector_type == DRM_MODE_CONNECTOR_VIRTUAL))) {
+			data->output = &data->display.outputs[i];
+		}
+	}
+
+	igt_require(data->output);
+
+	data->primary =
+		igt_pipe_get_plane_type(data->pipe, DRM_PLANE_TYPE_PRIMARY);
+
+	igt_output_set_pipe(data->output, data->pipe_id);
+
+}
+
+/* Common test cleanup. */
+static void test_fini(data_t *data)
+{
+	igt_display_reset(&data->display);
+}
+
+static void test_vic_mode(data_t *data, int vic)
+{
+	igt_display_t *display = &data->display;
+	drmModeModeInfo *mode;
+	igt_fb_t afb;
+
+	test_init(data);
+
+	mode = &test_modes[vic];

tools/amd_hdmi_compliance_yuv420.c line 138

Quoted 10 lines
tools/amd_hdmi_compliance_yuv420.c new file +10 -0
+
+	igt_output_override_mode(data->output, mode);
+
+	igt_create_pattern_fb(data->fd, mode->hdisplay, mode->vdisplay, DRM_FORMAT_XRGB8888, 0, &afb);
+
+	igt_plane_set_fb(data->primary, &afb);
+
+	igt_display_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
+
+	fprintf(stderr, "Press [Enter] to finish\n");

I think igt_info(...) is preferred here over fprintf directly.

tools/amd_hdmi_compliance_yuv420.c line 139

Quoted 1 line
tools/amd_hdmi_compliance_yuv420.c new file +1 -0
+	getchar();

I understand that you aren't using igt_debug_wait_for_keypress here, but I think an improvement that could be made is to extract this out into a sub function that waits explicitly for the newline:

static void wait_for_keypress(void)

{
	while (getchar() != '\n')
		;
}

tools/amd_hdmi_compliance_yuv420.c line 150

Quoted 11 lines
tools/amd_hdmi_compliance_yuv420.c new file +11 -0
+
+	test_fini(data);
+}
+
+const char *optstr = "hvt:";
+static void usage(const char *name)
+{
+	fprintf(stderr, "Usage: %s [-ht]\n", name);
+	fprintf(stderr, "-h:	show help\n");
+	fprintf(stderr, "-t vic: select video mode based on VIC\n");
+	fprintf(stderr, "-v:	test on 'Virtual' connector as well, for debugging.\n");

igt_info(...) if possible here

Quoted 19 lines
tools/amd_hdmi_compliance_yuv420.c new file +19 -0
+}
+
+int main(int argc, char **argv)
+{
+	data_t data;
+	int c;
+	int vic = 1; /* default to VIC 1 (640x480) */
+
+	memset(&data, 0, sizeof(data));
+
+	while((c = getopt(argc, argv, optstr)) != -1) {
+		switch(c) {
+		case 't':
+			vic = atoi(optarg);
+			break;
+		case 'v':
+			data.use_virtual_connector = true;
+			break;
+		default:

tools/amd_hdmi_compliance_yuv420.c line 179

Quoted 10 lines
tools/amd_hdmi_compliance_yuv420.c new file +10 -0
+		case 'h':
+			usage(argv[0]);
+			exit(1);
+		}
+	}
+
+	if (vic < 1 ||
+		vic > ARRAY_SIZE(test_modes) ||
+		!test_modes[vic].name[0]) {
+		fprintf(stderr, "VIC %d is not supported\n", vic);

igt_info(...) if possible here

Quoted 22 lines
tools/amd_hdmi_compliance_yuv420.c new file +14 -0
+		exit(1);
+	}
+
+	data.fd = drm_open_driver_master(DRIVER_ANY);
+	kmstest_set_vt_graphics_mode();
+
+	igt_display_require(&data.display, data.fd);
+	igt_require(data.display.is_atomic);
+	igt_display_require_output(&data.display);
+
+	test_vic_mode(&data, vic);
+
+	igt_display_fini(&data.display);
+}
tools/meson.build +0 -0
index 6e72b263..fa366ab2 100644
@@ -100,6 +100,11 @@ executable('intel_gpu_top', 'intel_gpu_top.c',
  	   install_rpath : bindir_rpathdir,
  	   dependencies : lib_igt_perf)
 
Quoted 14 lines

tools/meson.build executable('intel_gpu_top', 'intel_gpu_top.c', · line 110

Quoted 9 lines
tools/meson.build +5 -0
+executable('amd_hdmi_compliance_yuv420', 'amd_hdmi_compliance_yuv420.c',
+	   dependencies : [tool_deps],
+	   install_rpath : bindir_rpathdir,
+	   install : true)
+
  conf_data = configuration_data()
  conf_data.set('prefix', prefix)
  conf_data.set('exec_prefix', '${prefix}')

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#3 lore raw
Quoted 22 lines · Petri Latvala
Quoted 21 lines · Nicholas
Quoted 4 lines · Chao-kai (Stylon)

From: Stylon Wang <[email protected]>

HDMI 2.0 compliance tests needs 4K modes with YUV encoding. This test selects 4K modes based on specified VIC.

It helps to note what changed in a patch series in both the patch title and in the commit message here.

You can add a v2 to the patch header by appending a -v2 to your command, eg:

"git send-email -v2 ..."

And in the commit description you should do something like:

v2:
- example change 1
- example change 2

Other than that, I do have some general comments and nitpicks:

Quoted 10 lines
Quoted 2 lines

I think this tool might be better off named as just amd_hdmi_compliance so we can expand on this later.

Is there anything specific that makes this tool AMD-specific? It even uses DRIVER_ANY.

I guess the same question can be asked about intel_dp_compliance.c...

Nothing yet that I can see in the patch itself.

I know that debugfs entries to help with automating this compliance were added to amdgpu (like the one that controls 420 vs 444 output), so I would imagine that they would be added after though.

Nicholas Kazlauskas
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#4 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for tools/amd_hdmi_compliance_yuv420: Test 4K video modes with YUV encoding (rev2)

In reply to Wang, Chao-kai (Stylon)
== Series Details ==

== Series Details ==

Series: tools/amd_hdmi_compliance_yuv420: Test 4K video modes with YUV encoding (rev2)
URL : https://patchwork.freedesktop.org/series/66451/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6871 -> IGTPW_3443
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/66451/revisions/2/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [PASS][1] -> [INCOMPLETE][2] ([fdo#107718])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-blb-e6850/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-blb-e6850/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [PASS][3] -> [FAIL][4] ([fdo#103167])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-u3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-u3/igt@[email protected]

* igt@kms_prop_blob@basic:
- fi-icl-u3: [PASS][5] -> [DMESG-WARN][6] ([fdo#107724])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-u3/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_create@basic-files:
- {fi-icl-guc}: [INCOMPLETE][7] ([fdo#107713] / [fdo#109100]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-guc/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-guc/igt@[email protected]

* igt@gem_flink_basic@flink-lifetime:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-u3/igt@[email protected]

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][11] ([fdo#111407]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-kbl-7500u/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-kbl-7500u/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- {fi-icl-u4}: [FAIL][13] ([fdo#103167]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-u4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-u4/igt@[email protected]
- fi-icl-u2: [FAIL][15] ([fdo#103167]) -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-u2/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@common-hpd-after-suspend:
- fi-icl-u2: [DMESG-WARN][17] ([fdo#102505] / [fdo#110390]) -> [FAIL][18] ([fdo#109483])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/fi-icl-u2/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/fi-icl-u2/igt@[email protected]

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

[fdo#102505]: https://bugs.freedesktop.org/show_bug.cgi?id=102505
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#110390]: https://bugs.freedesktop.org/show_bug.cgi?id=110390
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407

Participating hosts (53 -> 47)
------------------------------

Additional (1): fi-kbl-soraka
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* IGT: IGT_5178 -> IGTPW_3443

CI-20190529: 20190529
CI_DRM_6871: f58f61f8f8a1137f3b4e2bf4af02d5f7694a0b2e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3443: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/
IGT_5178: efb4539494d94f03374874d3b61bd04ef3802aaa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev

#5 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for tools/amd_hdmi_compliance_yuv420: Test 4K video modes with YUV encoding (rev2)

In reply to Wang, Chao-kai (Stylon)
== Series Details ==

== Series Details ==

Series: tools/amd_hdmi_compliance_yuv420: Test 4K video modes with YUV encoding (rev2)
URL : https://patchwork.freedesktop.org/series/66451/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6871_full -> IGTPW_3443_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/66451/revisions/2/mbox/

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_shared@exec-single-timeline-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#110841])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@independent-bsd:
- shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#111325]) +2 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb4/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: [PASS][5] -> [SKIP][6] ([fdo#109271])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-kbl1/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-kbl7/igt@[email protected]

* igt@i915_suspend@debugfs-reader:
- shard-apl: [PASS][7] -> [DMESG-WARN][8] ([fdo#108566]) +4 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-apl2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-apl8/igt@[email protected]

* igt@kms_big_fb@x-tiled-8bpp-rotate-180:
- shard-snb: [PASS][9] -> [SKIP][10] ([fdo#109271])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-snb4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-snb2/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-64x64-random:
- shard-apl: [PASS][11] -> [FAIL][12] ([fdo#103232])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-apl6/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-apl6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
- shard-iclb: [PASS][13] -> [FAIL][14] ([fdo#103167]) +2 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb1/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb6/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-y:
- shard-iclb: [PASS][15] -> [FAIL][16] ([fdo#103166])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb8/igt@[email protected]

* igt@kms_vblank@pipe-c-wait-busy-hang:
- shard-iclb: [PASS][17] -> [INCOMPLETE][18] ([fdo#107713])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb5/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb1/igt@[email protected]

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][19] -> [SKIP][20] ([fdo#109276]) +6 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb2/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb3/igt@[email protected]

#### Possible fixes ####

* igt@gem_bad_reloc@negative-reloc-bsd2:
- shard-iclb: [SKIP][21] ([fdo#109276]) -> [PASS][22] +14 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb8/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@preempt-other-bsd:
- shard-iclb: [SKIP][23] ([fdo#111325]) -> [PASS][24] +6 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb8/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-apl: [DMESG-WARN][25] ([fdo#108686]) -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-apl2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-apl1/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-suspend:
- shard-apl: [DMESG-WARN][27] ([fdo#108566]) -> [PASS][28] +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-apl8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-apl5/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: [FAIL][29] ([fdo#104873]) -> [PASS][30]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-glk3/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-glk3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite:
- shard-iclb: [FAIL][31] ([fdo#103167]) -> [PASS][32] +3 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][33] ([fdo#103166]) -> [PASS][34]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb6/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb8/igt@[email protected]

* igt@kms_psr@psr2_cursor_blt:
- shard-iclb: [SKIP][35] ([fdo#109441]) -> [PASS][36] +2 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb1/igt@kms_psr@psr2_cursor_blt.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html

* igt@tools_test@tools_test:
- shard-apl: [SKIP][37] ([fdo#109271]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-apl8/igt@tools_test@tools_test.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-apl5/igt@tools_test@tools_test.html

#### Warnings ####

* igt@gem_mocs_settings@mocs-settings-bsd2:
- shard-iclb: [FAIL][39] ([fdo#111330]) -> [SKIP][40] ([fdo#109276])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-iclb2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-iclb7/igt@[email protected]

* igt@kms_vblank@pipe-c-accuracy-idle:
- shard-snb: [SKIP][41] ([fdo#109271] / [fdo#109278]) -> [SKIP][42] ([fdo#109271])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6871/shard-snb6/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/shard-snb2/igt@[email protected]

[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330

Participating hosts (10 -> 6)
------------------------------

Missing (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005

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

* CI: CI-20190529 -> None
* IGT: IGT_5178 -> IGTPW_3443
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_6871: f58f61f8f8a1137f3b4e2bf4af02d5f7694a0b2e @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_3443: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/
IGT_5178: efb4539494d94f03374874d3b61bd04ef3802aaa @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3443/
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev