Skip to contentSkip to conversation

Test modeseting with imported prime buffer between any two devices

PATCH In review Arkadiusz Hiler 3 participants 8 messages Apr 29, 2020 – Apr 30, 2020 Library code

lore
Share & tools
lore
#0 lore raw

cover Test modeseting with imported prime buffer between any two devices

By default the first two devices that are matching provided chipset requirements are used (ANY + VGEM). This is sensitive to enumeration order, but as long as there are only two devices it's fine - PRIME will get tested both directions.

# kms_prime
IGT-Version: 1.25-g0b58fd8c (x86_64) (Linux: 5.7.0-rc2-CI-CI_DRM_8370+ x86_64)
Starting subtest: basic-crc
Starting dynamic subtest: first-to-second
Test requirement not met in function igt_require_pipe_crc, file ../lib/igt_debugfs.c:522:
Test requirement: fstatat(dir, "crtc-0/crc/control", &stat, 0) == 0
CRCs not supported on this platform
Last errno: 2, No such file or directory
Dynamic subtest first-to-second: SKIP (0,000s)
Starting dynamic subtest: second-to-first
Dynamic subtest second-to-first: SUCCESS (1,779s)
Subtest basic-crc: SUCCESS (2,024s)

In case there are more than two devices you can specify which ones should be used or force ordering, e.g.:

# lsgpu
sys:/sys/devices/pci0000:00/0000:00:02.0
    subsystem       : pci
    drm card        : /dev/dri/card0
    drm render      : /dev/dri/renderD128
    vendor          : 8086
    device          : 9A49

sys:/sys/devices/platform/vgem

    subsystem       : platform
    drm card        : /dev/dri/card1
    drm render      : /dev/dri/renderD129
# kms_prime --device "sys:/sys/devices/platform/vgem;pci:vendor=Intel"
IGT-Version: 1.25-g0b58fd8c (x86_64) (Linux: 5.7.0-rc2-CI-CI_DRM_8370+ x86_64)
Starting subtest: basic-crc
Looking for devices to open using filter 0: sys:/sys/devices/platform/vgem
Filter matched /dev/dri/card1 | /dev/dri/renderD129
Looking for devices to open using filter 1: pci:vendor=Intel
Filter matched /dev/dri/card0 | /dev/dri/renderD128
Starting dynamic subtest: first-to-second
Dynamic subtest first-to-second: SUCCESS (1,978s)
Starting dynamic subtest: second-to-first
Test requirement not met in function igt_require_pipe_crc, file ../lib/igt_debugfs.c:522:
Test requirement: fstatat(dir, "crtc-0/crc/control", &stat, 0) == 0
CRCs not supported on this platform
Last errno: 2, No such file or directory
Dynamic subtest second-to-first: SKIP (0,000s)
Subtest basic-crc: SUCCESS (2,944s)

You can also use the IGT_DEVICE environment variable or Common::Device in .igtrc.

Arkadiusz Hiler (2):
lib: Support multiple filters lib/drmtest: Introduce __drm_open_driver_another

 lib/drmtest.c          | 165 +++++++++++++++++++++++++++++++++++------
 lib/drmtest.h          |   1 +
 lib/igt_core.c         |  16 ++--
 lib/igt_device_scan.c  |  87 ++++++++++++++++------
 lib/igt_device_scan.h  |   8 +-
 tests/core_hotunplug.c |   3 +-
 tests/kms_prime.c      | 107 ++++++++++++++++----------
 7 files changed, 288 insertions(+), 99 deletions(-)
Signature · 6 lines
2.25.2

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

PATCH 1/2 lib: Support multiple filters

This patch brings back support for multiple filters that was in the original series by Zbyszek.

We can now take multiple, semicolon separated filters. Right now the tests are using only the first filter.

Cc Petri Latvala <[email protected]>
Cc Zbigniew Kempczyński <[email protected]>
---
 lib/drmtest.c          |  8 ++--
 lib/igt_core.c         | 16 ++++----
 lib/igt_device_scan.c  | 87 +++++++++++++++++++++++++++++++-----------
 lib/igt_device_scan.h  |  8 ++--
 tests/core_hotunplug.c |  3 +-
 5 files changed, 83 insertions(+), 39 deletions(-)
lib/drmtest.c +4 -4
index 1fc39925..7b2fd337 100644
@@ -324,8 +324,8 @@ static bool __get_the_first_card(struct igt_device_card *card)
 {
 	const char *filter;
 
-	if (igt_device_is_filter_set()) {
-		filter = igt_device_filter_get();
+	if (igt_device_filter_count() > 0) {
+		filter = igt_device_filter_get(0);
 		igt_info("Looking for devices to open using filter: %s\n", filter);
 
 		if (igt_device_card_match(filter, card)) {
@@ -354,7 +354,7 @@ static bool __get_the_first_card(struct igt_device_card *card)
  */
 int __drm_open_driver(int chipset)
 {
-	if (igt_device_is_filter_set()) {
+	if (igt_device_filter_count() > 0) {
 		bool found;
 		struct igt_device_card card;
 
@@ -371,7 +371,7 @@ int __drm_open_driver(int chipset)
 
 int __drm_open_driver_render(int chipset)
 {
-	if (igt_device_is_filter_set()) {
+	if (igt_device_filter_count() > 0) {
 		bool found;
 		struct igt_device_card card;
 
lib/igt_core.c +9 -7
index 3f7b9f68..44705d10 100644
@@ -249,7 +249,7 @@
  *	FrameDumpPath=/tmp # The path to dump frames that fail comparison checks
  *
  *	&num; Device selection filter
- *	Device=pci:vendor=8086,card=0;vgem:
+ *	Device=pci:vendor=8086,card=0;sys:/sys/devices/platform/vgem
  *
  *	&num; The following section is used for configuring the Device Under Test.
  *	&num; It is not mandatory and allows overriding default values.
@@ -685,7 +685,7 @@ static void print_usage(const char *help_str, bool output_on_stderr)
 		   "  --skip-crc-compare\n"
 		   "  --help-description\n"
 		   "  --describe\n"
-		   "  --device filter\n"
+		   "  --device filters\n"
 		   "  --version\n"
 		   "  --help|-h\n");
 	if (help_str)
@@ -778,7 +778,7 @@ static void common_init_config(void)
 		igt_set_autoresume_delay(ret);
 
 	/* Adding filters, order .igtrc, IGT_DEVICE, --device filter */
-	if (igt_device_is_filter_set())
+	if (igt_device_filter_count() > 0)
 		igt_debug("Notice: using --device filters:\n");
 	else {
 		if (igt_rc_device) {
@@ -793,14 +793,16 @@ static void common_init_config(void)
 					  "Common::Device:\n");
 		}
 		if (igt_rc_device) {
-			igt_device_filter_set(igt_rc_device);
+			igt_device_filter_add(igt_rc_device);
 			free(igt_rc_device);
 			igt_rc_device = NULL;
 		}
 	}
 
-	if (igt_device_is_filter_set())
-		igt_debug("[%s]\n", igt_device_filter_get());
+	if (igt_device_filter_count() > 0) {
+		for (int i = 0; i < igt_device_filter_count(); i++)
+			igt_debug("[%s]\n", igt_device_filter_get(i));
+	}
 }
 
 static void common_init_env(void)
@@ -999,7 +1001,7 @@ static int common_init(int *argc, char **argv,
 				free(igt_rc_device);
 				igt_rc_device = NULL;
 			}
-			igt_device_filter_set(optarg);
+			igt_device_filter_add(optarg);
 			break;
 		case OPT_VERSION:
 			print_version();
lib/igt_device_scan.c +64 -23

123 lines not on this page · raw message

lib/igt_device_scan.h +4 -4
index 44c99dec..24eafe62 100644
@@ -50,10 +50,10 @@ void igt_device_print_filter_types(void);
  * IGT can store/retrieve filters passed by user using '--device' args.
  */
 
-bool igt_device_is_filter_set(void);
-void igt_device_filter_set(const char *filter);
-void igt_device_filter_free(void);
-const char *igt_device_filter_get(void);
+int igt_device_filter_count(void);
+int igt_device_filter_add(const char *filter);
+void igt_device_filter_free_all(void);
+const char *igt_device_filter_get(int num);
 
 /* Use filter to match the device and fill card structure */
 bool igt_device_card_match(const char *filter, struct igt_device_card *card);
tests/core_hotunplug.c +2 -1
index f9cfc8c3..ded53fd5 100644
@@ -167,7 +167,8 @@ static void set_filter_from_device(int fd)
 	strncat(path, "/device", PATH_MAX - strlen(path));
 	igt_assert(realpath(path, dst));
 
-	igt_device_filter_set(filter);
+	igt_device_filter_free_all();
+	igt_device_filter_add(filter);
 }
 
 /* Subtests */
Signature · 6 lines
2.25.2

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Reviewed-by on v1 1/2
#2 lore raw

Re: [igt-dev] [PATCH i-g-t 1/2] lib: Support multiple filters

Quoted 88 lines · Arkadiusz Hiler

This patch brings back support for multiple filters that was in the original series by Zbyszek.

We can now take multiple, semicolon separated filters. Right now the tests are using only the first filter.

Cc Petri Latvala <[email protected]>
Cc Zbigniew Kempczyński <[email protected]>
---
 lib/drmtest.c          |  8 ++--
 lib/igt_core.c         | 16 ++++----
 lib/igt_device_scan.c  | 87 +++++++++++++++++++++++++++++++-----------
 lib/igt_device_scan.h  |  8 ++--
 tests/core_hotunplug.c |  3 +-
 5 files changed, 83 insertions(+), 39 deletions(-)
lib/drmtest.c +4 -4
index 1fc39925..7b2fd337 100644
@@ -324,8 +324,8 @@ static bool __get_the_first_card(struct igt_device_card *card)
 {
 	const char *filter;
 
-	if (igt_device_is_filter_set()) {
-		filter = igt_device_filter_get();
+	if (igt_device_filter_count() > 0) {
+		filter = igt_device_filter_get(0);
 		igt_info("Looking for devices to open using filter: %s\n", filter);
 
 		if (igt_device_card_match(filter, card)) {
@@ -354,7 +354,7 @@ static bool __get_the_first_card(struct igt_device_card *card)
  */
 int __drm_open_driver(int chipset)
 {
-	if (igt_device_is_filter_set()) {
+	if (igt_device_filter_count() > 0) {
 		bool found;
 		struct igt_device_card card;
 
@@ -371,7 +371,7 @@ int __drm_open_driver(int chipset)
 
 int __drm_open_driver_render(int chipset)
 {
-	if (igt_device_is_filter_set()) {
+	if (igt_device_filter_count() > 0) {
 		bool found;
 		struct igt_device_card card;
 
lib/igt_core.c +4 -4
index 3f7b9f68..44705d10 100644
@@ -249,7 +249,7 @@
  *	FrameDumpPath=/tmp # The path to dump frames that fail comparison checks
  *
  *	&num; Device selection filter
- *	Device=pci:vendor=8086,card=0;vgem:
+ *	Device=pci:vendor=8086,card=0;sys:/sys/devices/platform/vgem
  *
  *	&num; The following section is used for configuring the Device Under Test.
  *	&num; It is not mandatory and allows overriding default values.
@@ -685,7 +685,7 @@ static void print_usage(const char *help_str, bool output_on_stderr)
 		   "  --skip-crc-compare\n"
 		   "  --help-description\n"
 		   "  --describe\n"
-		   "  --device filter\n"
+		   "  --device filters\n"
 		   "  --version\n"
 		   "  --help|-h\n");
 	if (help_str)
@@ -778,7 +778,7 @@ static void common_init_config(void)
 		igt_set_autoresume_delay(ret);
 
 	/* Adding filters, order .igtrc, IGT_DEVICE, --device filter */
-	if (igt_device_is_filter_set())
+	if (igt_device_filter_count() > 0)
 		igt_debug("Notice: using --device filters:\n");
 	else {
 		if (igt_rc_device) {
@@ -793,14 +793,16 @@ static void common_init_config(void)
 					  "Common::Device:\n");
 		}
 		if (igt_rc_device) {
-			igt_device_filter_set(igt_rc_device);
+			igt_device_filter_add(igt_rc_device);
 			free(igt_rc_device);

lib/igt_core.c static void common_init_config(void) · line 805

Quoted 10 lines
lib/igt_core.c +4 -2
 			igt_rc_device = NULL;
 		}
 	}
 
-	if (igt_device_is_filter_set())
-		igt_debug("[%s]\n", igt_device_filter_get());
+	if (igt_device_filter_count() > 0) {
+		for (int i = 0; i < igt_device_filter_count(); i++)
+			igt_debug("[%s]\n", igt_device_filter_get(i));
+	}

The if check can be dropped here, the for condition already takes care of it.

Did we have unit tests for filters handling somewhere? I mean the list stuff, not the application, latter is harder to unit test.

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

#3 lore raw

PATCH 2/2 lib/drmtest: Introduce __drm_open_driver_another

In reply to Arkadiusz Hiler

__drm_open_driver_another(int idx, ...) is a counterpart to __drm_open_driver(..) with the following changes:

If device filters are provided the idx-th filter is used and the first matching device is selected.

Consecutive calls to it, with increasing idx (starting from zero) are guaranteed to return fd of a different /dev/dri/ node than the previous calls or -1.

Counterparts to other existing drm_open_*() should be introduced in similar fashion as the need arises.

kms_prime test is converted to use this new call and dumb buffers directly.

Cc Petri Latvala <[email protected]>
Cc Mika Kahola <[email protected]>
---
 lib/drmtest.c     | 163 +++++++++++++++++++++++++++++++++++++++-------
 lib/drmtest.h     |   1 +
 tests/kms_prime.c | 107 ++++++++++++++++++------------
 3 files changed, 208 insertions(+), 63 deletions(-)
lib/drmtest.c +140 -23
index 7b2fd337..538fcf65 100644
@@ -246,7 +246,51 @@ err:
 	return -1;
 }
 
-static int __search_and_open(const char *base, int offset, unsigned int chipset)
+static struct {
+	int fd;
+	struct stat stat;
+}_opened_fds[64];
+
+static int _opened_fds_count;
+
+static void _set_opened_fd(int idx, int fd)
+{
+	assert(idx < ARRAY_SIZE(_opened_fds));
+	assert(idx <= _opened_fds_count);
+
+	_opened_fds[idx].fd = fd;
+
+	assert(fstat(fd, &_opened_fds[idx].stat) == 0);
+
+	_opened_fds_count = idx+1;
+}
+
+static bool _is_already_opened(const char *path, int as_idx)
+{
+	struct stat new;
+
+	assert(as_idx < ARRAY_SIZE(_opened_fds));
+	assert(as_idx <= _opened_fds_count);
+
+	/*
+	 * we cannot even stat the device, so it's of no use - let's claim it's
+	 * already opened
+	 */
+	if (stat(path, &new) != 0)
+		return true;
+
+	for (int i = 0; i < as_idx; ++i) {
+		/* did we cross filesystem boundary? */
+		assert(_opened_fds[i].stat.st_dev == new.st_dev);
+
+		if (_opened_fds[i].stat.st_ino == new.st_ino)
+			return true;
+	}
+
+	return false;
+}
+
+static int __search_and_open(const char *base, int offset, unsigned int chipset, int as_idx)
 {
 	const char *forced;
 
@@ -259,6 +303,10 @@ static int __search_and_open(const char *base, int offset, unsigned int chipset)
 		int fd;
 
 		sprintf(name, "%s%u", base, i + offset);
+
+		if (_is_already_opened(name, as_idx))
+			continue;
+
 		fd = open_device(name, chipset);
 		if (fd != -1)
 			return fd;
@@ -283,17 +331,17 @@ static void __try_modprobe(unsigned int chipset)
 	pthread_mutex_unlock(&mutex);
 }
 
-static int __open_driver(const char *base, int offset, unsigned int chipset)
+static int __open_driver(const char *base, int offset, unsigned int chipset, int as_idx)
 {
 	int fd;
 
-	fd = __search_and_open(base, offset, chipset);
+	fd = __search_and_open(base, offset, chipset, as_idx);
 	if (fd != -1)
 		return fd;
 
 	__try_modprobe(chipset);
 
-	return __search_and_open(base, offset, chipset);
+	return __search_and_open(base, offset, chipset, as_idx);
 }
 
 static int __open_driver_exact(const char *name, unsigned int chipset)
@@ -320,13 +368,13 @@ static int __open_driver_exact(const char *name, unsigned int chipset)
  * True if card according to the added filter was found,
  * false othwerwise.
  */
-static bool __get_the_first_card(struct igt_device_card *card)
+static bool __get_card_for_nth_filter(int idx, struct igt_device_card *card)
 {
 	const char *filter;
 
-	if (igt_device_filter_count() > 0) {
-		filter = igt_device_filter_get(0);
-		igt_info("Looking for devices to open using filter: %s\n", filter);
+	if (igt_device_filter_count() > idx) {
+		filter = igt_device_filter_get(idx);
+		igt_info("Looking for devices to open using filter %d: %s\n", idx, filter);
 
 		if (igt_device_card_match(filter, card)) {
 			igt_info("Filter matched %s | %s\n", card->card, card->render);
@@ -339,6 +387,87 @@ static bool __get_the_first_card(struct igt_device_card *card)
 	return false;
 }
 
+/**
+ * __drm_open_driver_another:
+ * @idx: index of the device you are opening
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
+ *
+ * This function is intended to be used instead of drm_open_driver() for tests
+ * that are opening multiple /dev/dri/card* nodes, usually for the purpose of
+ * multi-GPU testing.
+ *
+ * This function opens device in the following order:
+ *
+ * 1. when --device arguments are present:
+ *   * device scanning is executed,
+ *   * idx-th filter (starting with 0, filters are semicolon separated) is used
+ *   * if there is no idx-th filter, goto 2
+ *   * first device maching the filter is selected
+ *   * if it's already opened (for indexes = 0..idx-1) we fail with -1
+ *   * otherwise open the device and return the fd
+ *
+ * 2. compatibility mode - open the first DRM device we can find that is not
+ *    already opened for indexes 0..idx-1, searching up to 16 device nodes
+ *
+ * The test is reponsible to test the interaction between devices in both
+ * directions if applicable.
+ *
+ * Example:
+ *
+ * |[<!-- language="c" -->
+ * igt_subtest_with_dynamic("basic") {
+ * 	int first_fd = -1;
+ * 	int second_fd = -1;
+ *
+ * 	first_fd = __drm_open_driver_another(0, DRIVER_ANY);
+ * 	igt_require(first_fd >= 0);
+ *
+ * 	second_fd = __drm_open_driver_another(1, DRIVER_ANY);
+ * 	igt_require(second_fd >= 0);
+ *
+ * 	if (can_do_foo(first_fd, second_fd))
+ * 		igt_dynamic("first-to-second")
+ * 			test_basic_from_to(first_fd, second_fd);
+ *
+ * 	if (can_do_foo(second_fd, first_fd))
+ * 		igt_dynamic("second-to-first")
+ * 			test_basic_from_to(second_fd, first_fd);
+ *
+ * 	close(first_fd);
+ * 	close(second_fd);
+ * }
+ * ]|
+ *
+ * Returns:
+ * An open DRM fd or -1 on error
+ */
+int __drm_open_driver_another(int idx, int chipset)
+{
+	int fd = -1;
+	if (igt_device_filter_count() > idx) {
+		bool found;
+		struct igt_device_card card;
+
+		found = __get_card_for_nth_filter(idx, &card);
+
+		if (!found || !strlen(card.card))
+			igt_warn("No card matches the filter!\n");
+		else if (_is_already_opened(card.card, idx))
+			igt_warn("card maching filter %d is already opened\n", idx);
+		else
+			fd = __open_driver_exact(card.card, chipset);
+
+	} else {
+		/* no filter for device idx, let's open whatever is available */
+		fd = __open_driver("/dev/dri/card", 0, chipset, idx);
+	}
+
+	if (fd >= 0)
+		_set_opened_fd(idx, fd);
+
+	return fd;
+}
+
 /**
  * __drm_open_driver:
  * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
@@ -354,19 +483,7 @@ static bool __get_the_first_card(struct igt_device_card *card)
  */
 int __drm_open_driver(int chipset)
 {
-	if (igt_device_filter_count() > 0) {
-		bool found;
-		struct igt_device_card card;
-
-		found = __get_the_first_card(&card);
-
-		if (!found || !strlen(card.card))
-			return -1;
-
-		return __open_driver_exact(card.card, chipset);
-	}
-
-	return __open_driver("/dev/dri/card", 0, chipset);
+	return __drm_open_driver_another(0, chipset);
 }
 
 int __drm_open_driver_render(int chipset)
@@ -375,7 +492,7 @@ int __drm_open_driver_render(int chipset)
 		bool found;
 		struct igt_device_card card;
 
-		found = __get_the_first_card(&card);
+		found = __get_card_for_nth_filter(0, &card);
 
 		if (!found || !strlen(card.render))
 			return -1;
@@ -383,7 +500,7 @@ int __drm_open_driver_render(int chipset)
 		return __open_driver_exact(card.render, chipset);
 	}
 
-	return __open_driver("/dev/dri/renderD", 128, chipset);
+	return __open_driver("/dev/dri/renderD", 128, chipset, 0);
 }
 
 static int at_exit_drm_fd = -1;
lib/drmtest.h +1 -0
index 632c616b..d5f0fc25 100644
@@ -90,6 +90,7 @@ void __set_forced_driver(const char *name);
 int drm_open_driver(int chipset);
 int drm_open_driver_master(int chipset);
 int drm_open_driver_render(int chipset);
+int __drm_open_driver_another(int idx, int chipset);
 int __drm_open_driver(int chipset);
 int __drm_open_driver_render(int chipset);
 
tests/kms_prime.c +67 -40

178 lines not on this page · raw message

Signature · 6 lines
2.25.2

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

Re: [igt-dev] [PATCH i-g-t 2/2] lib/drmtest: Introduce __drm_open_driver_another

Quoted 10 lines · Arkadiusz Hiler

__drm_open_driver_another(int idx, ...) is a counterpart to __drm_open_driver(..) with the following changes:

If device filters are provided the idx-th filter is used and the first matching device is selected.

Consecutive calls to it, with increasing idx (starting from zero) are guaranteed to return fd of a different /dev/dri/ node than the previous calls or -1.

Quoted 5 lines

Counterparts to other existing drm_open_*() should be introduced in similar fashion as the need arises.

kms_prime test is converted to use this new call and dumb buffers directly.

If there's going to be new revisions of this series, can the kms_prime changes be split to a separate patch?

Quoted 185 lines
Cc Petri Latvala <[email protected]>
Cc Mika Kahola <[email protected]>
---
 lib/drmtest.c     | 163 +++++++++++++++++++++++++++++++++++++++-------
 lib/drmtest.h     |   1 +
 tests/kms_prime.c | 107 ++++++++++++++++++------------
 3 files changed, 208 insertions(+), 63 deletions(-)
lib/drmtest.c +120 -8
index 7b2fd337..538fcf65 100644
@@ -246,7 +246,51 @@ err:
 	return -1;
 }
 
-static int __search_and_open(const char *base, int offset, unsigned int chipset)
+static struct {
+	int fd;
+	struct stat stat;
+}_opened_fds[64];
+
+static int _opened_fds_count;
+
+static void _set_opened_fd(int idx, int fd)
+{
+	assert(idx < ARRAY_SIZE(_opened_fds));
+	assert(idx <= _opened_fds_count);
+
+	_opened_fds[idx].fd = fd;
+
+	assert(fstat(fd, &_opened_fds[idx].stat) == 0);
+
+	_opened_fds_count = idx+1;
+}
+
+static bool _is_already_opened(const char *path, int as_idx)
+{
+	struct stat new;
+
+	assert(as_idx < ARRAY_SIZE(_opened_fds));
+	assert(as_idx <= _opened_fds_count);
+
+	/*
+	 * we cannot even stat the device, so it's of no use - let's claim it's
+	 * already opened
+	 */
+	if (stat(path, &new) != 0)
+		return true;
+
+	for (int i = 0; i < as_idx; ++i) {
+		/* did we cross filesystem boundary? */
+		assert(_opened_fds[i].stat.st_dev == new.st_dev);
+
+		if (_opened_fds[i].stat.st_ino == new.st_ino)
+			return true;
+	}
+
+	return false;
+}
+
+static int __search_and_open(const char *base, int offset, unsigned int chipset, int as_idx)
 {
 	const char *forced;
 
@@ -259,6 +303,10 @@ static int __search_and_open(const char *base, int offset, unsigned int chipset)
 		int fd;
 
 		sprintf(name, "%s%u", base, i + offset);
+
+		if (_is_already_opened(name, as_idx))
+			continue;
+
 		fd = open_device(name, chipset);
 		if (fd != -1)
 			return fd;
@@ -283,17 +331,17 @@ static void __try_modprobe(unsigned int chipset)
 	pthread_mutex_unlock(&mutex);
 }
 
-static int __open_driver(const char *base, int offset, unsigned int chipset)
+static int __open_driver(const char *base, int offset, unsigned int chipset, int as_idx)
 {
 	int fd;
 
-	fd = __search_and_open(base, offset, chipset);
+	fd = __search_and_open(base, offset, chipset, as_idx);
 	if (fd != -1)
 		return fd;
 
 	__try_modprobe(chipset);
 
-	return __search_and_open(base, offset, chipset);
+	return __search_and_open(base, offset, chipset, as_idx);
 }
 
 static int __open_driver_exact(const char *name, unsigned int chipset)
@@ -320,13 +368,13 @@ static int __open_driver_exact(const char *name, unsigned int chipset)
  * True if card according to the added filter was found,
  * false othwerwise.
  */
-static bool __get_the_first_card(struct igt_device_card *card)
+static bool __get_card_for_nth_filter(int idx, struct igt_device_card *card)
 {
 	const char *filter;
 
-	if (igt_device_filter_count() > 0) {
-		filter = igt_device_filter_get(0);
-		igt_info("Looking for devices to open using filter: %s\n", filter);
+	if (igt_device_filter_count() > idx) {
+		filter = igt_device_filter_get(idx);
+		igt_info("Looking for devices to open using filter %d: %s\n", idx, filter);
 
 		if (igt_device_card_match(filter, card)) {
 			igt_info("Filter matched %s | %s\n", card->card, card->render);
@@ -339,6 +387,87 @@ static bool __get_the_first_card(struct igt_device_card *card)
 	return false;
 }
 
+/**
+ * __drm_open_driver_another:
+ * @idx: index of the device you are opening
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
+ *
+ * This function is intended to be used instead of drm_open_driver() for tests
+ * that are opening multiple /dev/dri/card* nodes, usually for the purpose of
+ * multi-GPU testing.
+ *
+ * This function opens device in the following order:
+ *
+ * 1. when --device arguments are present:
+ *   * device scanning is executed,
+ *   * idx-th filter (starting with 0, filters are semicolon separated) is used
+ *   * if there is no idx-th filter, goto 2
+ *   * first device maching the filter is selected
+ *   * if it's already opened (for indexes = 0..idx-1) we fail with -1
+ *   * otherwise open the device and return the fd
+ *
+ * 2. compatibility mode - open the first DRM device we can find that is not
+ *    already opened for indexes 0..idx-1, searching up to 16 device nodes
+ *
+ * The test is reponsible to test the interaction between devices in both
+ * directions if applicable.
+ *
+ * Example:
+ *
+ * |[<!-- language="c" -->
+ * igt_subtest_with_dynamic("basic") {
+ * 	int first_fd = -1;
+ * 	int second_fd = -1;
+ *
+ * 	first_fd = __drm_open_driver_another(0, DRIVER_ANY);
+ * 	igt_require(first_fd >= 0);
+ *
+ * 	second_fd = __drm_open_driver_another(1, DRIVER_ANY);
+ * 	igt_require(second_fd >= 0);
+ *
+ * 	if (can_do_foo(first_fd, second_fd))
+ * 		igt_dynamic("first-to-second")
+ * 			test_basic_from_to(first_fd, second_fd);
+ *
+ * 	if (can_do_foo(second_fd, first_fd))
+ * 		igt_dynamic("second-to-first")
+ * 			test_basic_from_to(second_fd, first_fd);
+ *
+ * 	close(first_fd);
+ * 	close(second_fd);
+ * }
+ * ]|
+ *
+ * Returns:
+ * An open DRM fd or -1 on error
+ */
+int __drm_open_driver_another(int idx, int chipset)
+{
+	int fd = -1;
+	if (igt_device_filter_count() > idx) {
+		bool found;
+		struct igt_device_card card;
+
+		found = __get_card_for_nth_filter(idx, &card);
+
+		if (!found || !strlen(card.card))

lib/drmtest.c static bool __get_the_first_card(struct igt_device_card *card) · line 463

Quoted 10 lines
lib/drmtest.c +10 -0
+			igt_warn("No card matches the filter!\n");
+		else if (_is_already_opened(card.card, idx))
+			igt_warn("card maching filter %d is already opened\n", idx);
+		else
+			fd = __open_driver_exact(card.card, chipset);
+
+	} else {
+		/* no filter for device idx, let's open whatever is available */
+		fd = __open_driver("/dev/dri/card", 0, chipset, idx);
+	}

Hmm, took me a while to grasp the full flow from drm_open_driver() to __try_modprobe() and pals and how that's changed with this...

The difference between drm_open_driver() and __drm_open_driver() is that the latter doesn't install i915-specific atexit() handlers. Do we need that kind of functionality for _another()?

Is it documented that anyone using device filters will need to modprobe themselves if they target a driver that we normally modprobe?

Quoted 222 lines
lib/drmtest.c +10 -15
+
+	if (fd >= 0)
+		_set_opened_fd(idx, fd);
+
+	return fd;
+}
+
 /**
  * __drm_open_driver:
  * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
@@ -354,19 +483,7 @@ static bool __get_the_first_card(struct igt_device_card *card)
  */
 int __drm_open_driver(int chipset)
 {
-	if (igt_device_filter_count() > 0) {
-		bool found;
-		struct igt_device_card card;
-
-		found = __get_the_first_card(&card);
-
-		if (!found || !strlen(card.card))
-			return -1;
-
-		return __open_driver_exact(card.card, chipset);
-	}
-
-	return __open_driver("/dev/dri/card", 0, chipset);
+	return __drm_open_driver_another(0, chipset);
 }
 
 int __drm_open_driver_render(int chipset)
@@ -375,7 +492,7 @@ int __drm_open_driver_render(int chipset)
 		bool found;
 		struct igt_device_card card;
 
-		found = __get_the_first_card(&card);
+		found = __get_card_for_nth_filter(0, &card);
 
 		if (!found || !strlen(card.render))
 			return -1;
@@ -383,7 +500,7 @@ int __drm_open_driver_render(int chipset)
 		return __open_driver_exact(card.render, chipset);
 	}
 
-	return __open_driver("/dev/dri/renderD", 128, chipset);
+	return __open_driver("/dev/dri/renderD", 128, chipset, 0);
 }
 
 static int at_exit_drm_fd = -1;
lib/drmtest.h +1 -0
index 632c616b..d5f0fc25 100644
@@ -90,6 +90,7 @@ void __set_forced_driver(const char *name);
 int drm_open_driver(int chipset);
 int drm_open_driver_master(int chipset);
 int drm_open_driver_render(int chipset);
+int __drm_open_driver_another(int idx, int chipset);
 int __drm_open_driver(int chipset);
 int __drm_open_driver_render(int chipset);
 
tests/kms_prime.c +44 -37
index 3241c514..8cb2ca2a 100644
@@ -22,12 +22,19 @@
  */
 
 #include "igt.h"
-#include "igt_vgem.h"
+#include "igt_device.h"
 
 #include <sys/ioctl.h>
 #include <sys/poll.h>
 #include <time.h>
 
+struct dumb_bo {
+	uint32_t handle;
+	uint32_t width, height;
+	uint32_t bpp, pitch;
+	uint64_t size;
+};
+
 struct crc_info {
 	igt_crc_t crc;
 	char *str;
@@ -67,23 +74,24 @@ static bool has_prime_export(int fd)
 }
 
 static igt_output_t *setup_display(int importer_fd, igt_display_t *display,
-				   enum pipe pipe)
+				   enum pipe *pipe)
 {
 	igt_output_t *output;
+	bool found = false;
 
-	igt_display_require(display, importer_fd);
-	igt_skip_on(pipe >= display->n_pipes);
-	output = igt_get_single_output_for_pipe(display, pipe);
+	for_each_pipe_with_valid_output(display, *pipe, output) {
+		found = true;
+		break;
+	}
 
-	igt_require_f(output, "No connector found for pipe %s\n",
-		      kmstest_pipe_name(pipe));
+	igt_require_f(found, "No valid connector/pipe found\n");
 
 	igt_display_reset(display);
-	igt_output_set_pipe(output, pipe);
+	igt_output_set_pipe(output, *pipe);
 	return output;
 }
 
-static void prepare_scratch(int exporter_fd, struct vgem_bo *scratch,
+static void prepare_scratch(int exporter_fd, struct dumb_bo *scratch,
 			    drmModeModeInfo *mode, uint32_t color)
 {
 	uint32_t *ptr;
@@ -91,16 +99,27 @@ static void prepare_scratch(int exporter_fd, struct vgem_bo *scratch,
 	scratch->width = mode->hdisplay;
 	scratch->height = mode->vdisplay;
 	scratch->bpp = 32;
-	vgem_create(exporter_fd, scratch);
 
-	ptr = vgem_mmap(exporter_fd, scratch, PROT_WRITE);
+	scratch->handle = kmstest_dumb_create(exporter_fd,
+			scratch->width,
+			scratch->height,
+			scratch->bpp,
+			&scratch->pitch,
+			&scratch->size);
+
+
+	ptr = kmstest_dumb_map_buffer(exporter_fd,
+				      scratch->handle,
+				      scratch->size,
+				      PROT_WRITE);
+
 	for (size_t idx = 0; idx < scratch->size / sizeof(*ptr); ++idx)
 		ptr[idx] = color;
 
 	munmap(ptr, scratch->size);
 }
 
-static void prepare_fb(int importer_fd, struct vgem_bo *scratch, struct igt_fb *fb)
+static void prepare_fb(int importer_fd, struct dumb_bo *scratch, struct igt_fb *fb)
 {
 	enum igt_color_encoding color_encoding = IGT_COLOR_YCBCR_BT709;
 	enum igt_color_range color_range = IGT_COLOR_YCBCR_LIMITED_RANGE;
@@ -126,6 +145,7 @@ static void import_fb(int importer_fd, struct igt_fb *fb,
 			    DRM_FORMAT_XRGB8888,
 			    handles, pitches, offsets,
 			    &fb->fb_id, 0);
+
 	igt_assert(ret == 0);
 }
 
@@ -162,19 +182,19 @@ static void test_crc(int exporter_fd, int importer_fd)
 	igt_display_t display;
 	igt_output_t *output;
 	igt_pipe_crc_t *pipe_crc;
-	enum pipe pipe = PIPE_A;
+	enum pipe pipe;
 	struct igt_fb fb;
 	int dmabuf_fd;
-	struct vgem_bo scratch = {}; /* despite the name, it suits for any
-				      * gem-compatible device
-				      * TODO: rename
-				      */
+	struct dumb_bo scratch = {};
+	bool crc_equal;
 	int i, j;
 	drmModeModeInfo *mode;
 
-	bool crc_equal = false;
+	igt_device_set_master(importer_fd);
+	igt_require_pipe_crc(importer_fd);
+	igt_display_require(&display, importer_fd);
 
-	output = setup_display(importer_fd, &display, pipe);
+	output = setup_display(importer_fd, &display, &pipe);
 
 	mode = igt_output_get_mode(output);
 	pipe_crc = igt_pipe_crc_new(importer_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
@@ -188,6 +208,7 @@ static void test_crc(int exporter_fd, int importer_fd)
 		import_fb(importer_fd, &fb, dmabuf_fd, scratch.pitch);
 		close(dmabuf_fd);
 
+
 		colors[i].prime_crc.name = "prime";
 		collect_crc_for_fb(importer_fd, &fb, &display, output,
 				   pipe_crc, colors[i].color, &colors[i].prime_crc);
@@ -228,29 +249,35 @@ static void test_crc(int exporter_fd, int importer_fd)
 	igt_display_fini(&display);
 }
 
-static void run_test_crc(int export_chipset, int import_chipset)
-{
-	int importer_fd = -1;
-	int exporter_fd = -1;
-
-	exporter_fd = drm_open_driver(export_chipset);
-	importer_fd = drm_open_driver_master(import_chipset);
-
-	igt_require(has_prime_export(exporter_fd));
-	igt_require(has_prime_import(importer_fd));
-	igt_require_pipe_crc(importer_fd);
-
-	test_crc(exporter_fd, importer_fd);
-	close(importer_fd);
-	close(exporter_fd);
-}
-
 igt_main
 {
-	igt_fixture {
+	igt_fixture
 		kmstest_set_vt_graphics_mode();
+
+	igt_describe("Make a dumb color buffer, export to another device and"
+		     " compare the CRCs with a buffer native to that device");

tests/kms_prime.c static void test_crc(int exporter_fd, int importer_fd) · line 268

Quoted 10 lines
tests/kms_prime.c +10 -0
+	igt_subtest_with_dynamic("basic-crc") {
+		int first_fd = -1;
+		int second_fd = -1;
+
+		/* ANY = anything that is not VGEM */
+		first_fd = __drm_open_driver_another(0, DRIVER_ANY | DRIVER_VGEM);
+		igt_require(first_fd >= 0);
+
+		second_fd = __drm_open_driver_another(1, DRIVER_ANY | DRIVER_VGEM);
+		igt_require(second_fd >= 0);

For people not using filters, we can get some predictability for this by only using DRIVER_VGEM for the second_fd, can't we?

Signature · 5 lines
Petri Latvala
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#5 lore raw

Re: [igt-dev] [PATCH i-g-t 2/2] lib/drmtest: Introduce __drm_open_driver_another

Quoted 11 lines · Petri Latvala
Quoted 10 lines · Arkadiusz Hiler

__drm_open_driver_another(int idx, ...) is a counterpart to __drm_open_driver(..) with the following changes:

If device filters are provided the idx-th filter is used and the first matching device is selected.

Consecutive calls to it, with increasing idx (starting from zero) are guaranteed to return fd of a different /dev/dri/ node than the previous calls or -1.

Quoted 8 lines
Quoted 5 lines

Counterparts to other existing drm_open_*() should be introduced in similar fashion as the need arises.

kms_prime test is converted to use this new call and dumb buffers directly.

If there's going to be new revisions of this series, can the kms_prime changes be split to a separate patch?

yep

Quoted 96 lines
Quoted 81 lines
Cc Petri Latvala <[email protected]>
Cc Mika Kahola <[email protected]>
---
 lib/drmtest.c     | 163 +++++++++++++++++++++++++++++++++++++++-------
 lib/drmtest.h     |   1 +
 tests/kms_prime.c | 107 ++++++++++++++++++------------
 3 files changed, 208 insertions(+), 63 deletions(-)
lib/drmtest.c +64 -0
index 7b2fd337..538fcf65 100644
@@ -339,6 +387,87 @@ static bool __get_the_first_card(struct igt_device_card *card)
 	return false;
 }
 
+/**
+ * __drm_open_driver_another:
+ * @idx: index of the device you are opening
+ * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
+ *
+ * This function is intended to be used instead of drm_open_driver() for tests
+ * that are opening multiple /dev/dri/card* nodes, usually for the purpose of
+ * multi-GPU testing.
+ *
+ * This function opens device in the following order:
+ *
+ * 1. when --device arguments are present:
+ *   * device scanning is executed,
+ *   * idx-th filter (starting with 0, filters are semicolon separated) is used
+ *   * if there is no idx-th filter, goto 2
+ *   * first device maching the filter is selected
+ *   * if it's already opened (for indexes = 0..idx-1) we fail with -1
+ *   * otherwise open the device and return the fd
+ *
+ * 2. compatibility mode - open the first DRM device we can find that is not
+ *    already opened for indexes 0..idx-1, searching up to 16 device nodes
+ *
+ * The test is reponsible to test the interaction between devices in both
+ * directions if applicable.
+ *
+ * Example:
+ *
+ * |[<!-- language="c" -->
+ * igt_subtest_with_dynamic("basic") {
+ * 	int first_fd = -1;
+ * 	int second_fd = -1;
+ *
+ * 	first_fd = __drm_open_driver_another(0, DRIVER_ANY);
+ * 	igt_require(first_fd >= 0);
+ *
+ * 	second_fd = __drm_open_driver_another(1, DRIVER_ANY);
+ * 	igt_require(second_fd >= 0);
+ *
+ * 	if (can_do_foo(first_fd, second_fd))
+ * 		igt_dynamic("first-to-second")
+ * 			test_basic_from_to(first_fd, second_fd);
+ *
+ * 	if (can_do_foo(second_fd, first_fd))
+ * 		igt_dynamic("second-to-first")
+ * 			test_basic_from_to(second_fd, first_fd);
+ *
+ * 	close(first_fd);
+ * 	close(second_fd);
+ * }
+ * ]|
+ *
+ * Returns:
+ * An open DRM fd or -1 on error
+ */
+int __drm_open_driver_another(int idx, int chipset)
+{
+	int fd = -1;
+	if (igt_device_filter_count() > idx) {
+		bool found;
+		struct igt_device_card card;
+
+		found = __get_card_for_nth_filter(idx, &card);
+
+		if (!found || !strlen(card.card))

lib/drmtest.c static bool __get_the_first_card(struct igt_device_card *card) · line 463

Quoted 10 lines
lib/drmtest.c +10 -0
+			igt_warn("No card matches the filter!\n");
+		else if (_is_already_opened(card.card, idx))
+			igt_warn("card maching filter %d is already opened\n", idx);
+		else
+			fd = __open_driver_exact(card.card, chipset);
+
+	} else {
+		/* no filter for device idx, let's open whatever is available */
+		fd = __open_driver("/dev/dri/card", 0, chipset, idx);
+	}

Hmm, took me a while to grasp the full flow from drm_open_driver() to __try_modprobe() and pals and how that's changed with this...

Quoted 3 lines

The difference between drm_open_driver() and __drm_open_driver() is that the latter doesn't install i915-specific atexit() handlers. Do we need that kind of functionality for _another()?

And skips if fd < 0.

Similar atexit() handler would be necessary for tests that use _another() with any workload submission, so I would say, yeah, we would eventually need it and it makes sense to have it as the default one.

It's not needed for this particular test though, so I haven't bothered to create it yet.

Quoted 2 lines

Is it documented that anyone using device filters will need to modprobe themselves if they target a driver that we normally modprobe?

Good catch, let's add:

found = __get_card_for_nth_filter(idx, &card);
+
+if (!found) {
+ __try_modprobe(chipset);
+ found = __get_card_for_nth_filter(idx, &card);
+}

Quoted 38 lines
Quoted 38 lines
tests/kms_prime.c +9 -18
index 3241c514..8cb2ca2a 100644
@@ -228,29 +249,35 @@ static void test_crc(int exporter_fd, int importer_fd)
 	igt_display_fini(&display);
 }
 
-static void run_test_crc(int export_chipset, int import_chipset)
-{
-	int importer_fd = -1;
-	int exporter_fd = -1;
-
-	exporter_fd = drm_open_driver(export_chipset);
-	importer_fd = drm_open_driver_master(import_chipset);
-
-	igt_require(has_prime_export(exporter_fd));
-	igt_require(has_prime_import(importer_fd));
-	igt_require_pipe_crc(importer_fd);
-
-	test_crc(exporter_fd, importer_fd);
-	close(importer_fd);
-	close(exporter_fd);
-}
-
 igt_main
 {
-	igt_fixture {
+	igt_fixture
 		kmstest_set_vt_graphics_mode();
+
+	igt_describe("Make a dumb color buffer, export to another device and"
+		     " compare the CRCs with a buffer native to that device");
+	igt_subtest_with_dynamic("basic-crc") {
+		int first_fd = -1;
+		int second_fd = -1;
+
+		/* ANY = anything that is not VGEM */
Quoted 8 lines

tests/kms_prime.c static void test_crc(int exporter_fd, int importer_fd) · line 268

Quoted 5 lines
tests/kms_prime.c +5 -0
+		first_fd = __drm_open_driver_another(0, DRIVER_ANY | DRIVER_VGEM);
+		igt_require(first_fd >= 0);
+
+		second_fd = __drm_open_driver_another(1, DRIVER_ANY | DRIVER_VGEM);
+		igt_require(second_fd >= 0);

For people not using filters, we can get some predictability for this by only using DRIVER_VGEM for the second_fd, can't we?

This would force strict ordering on filters - if you want to use vgem it would always need to be the second one. I would like to avoid that.

Signature · 6 lines
Cheers,
Arek
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev
#6 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for Test modeseting with imported prime buffer between any two devices

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: Test modeseting with imported prime buffer between any two devices
URL : https://patchwork.freedesktop.org/series/76734/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8392 -> IGTPW_4517
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

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

### IGT changes ###

#### Possible fixes ####

* igt@i915_selftest@live@workarounds:
- fi-bwr-2160: [INCOMPLETE][1] ([i915#489]) -> [PASS][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/fi-bwr-2160/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/fi-bwr-2160/igt@i915_selftest@[email protected]

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

[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489

Participating hosts (47 -> 41)
------------------------------

Missing (6): fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-byt-clapper

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

* CI: CI-20190529 -> None
* IGT: IGT_5614 -> IGTPW_4517

CI-20190529: 20190529
CI_DRM_8392: c5ceaac881b4dc4eca6473abeb27342663c898d3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4517: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/index.html
IGT_5614: d095827add11d4e8158b87683971ee659749d9a4 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

#7 lore raw

[igt-dev] ✗ Fi.CI.IGT: failure for Test modeseting with imported prime buffer between any two devices

In reply to Arkadiusz Hiler
== Series Details ==

== Series Details ==

Series: Test modeseting with imported prime buffer between any two devices
URL : https://patchwork.freedesktop.org/series/76734/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_8392_full -> IGTPW_4517_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_4517_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in IGTPW_4517_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_4517/index.html

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gt_pm:
- shard-apl: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl8/igt@i915_selftest@live@gt_pm.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl6/igt@i915_selftest@live@gt_pm.html

* {igt@kms_prime@basic-crc@first-to-second} (NEW):
- shard-iclb: NOTRUN -> [SKIP][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb3/igt@kms_prime@[email protected]
- shard-tglb: NOTRUN -> [SKIP][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-tglb7/igt@kms_prime@[email protected]

New tests
---------

New tests have been introduced between CI_DRM_8392_full and IGTPW_4517_full:

### New IGT tests (2) ###

* igt@kms_prime@basic-crc@first-to-second:
- Statuses : 7 skip(s)
- Exec time: [0.0, 0.00] s

* igt@kms_prime@basic-crc@second-to-first:
- Statuses : 7 pass(s)
- Exec time: [0.71, 1.32] s

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_suspend@basic-s3:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([i915#180])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl2/igt@[email protected]

* igt@i915_pm_rps@min-max-config-loaded:
- shard-iclb: [PASS][7] -> [FAIL][8] ([i915#370])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-iclb4/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb2/igt@[email protected]

* igt@kms_color@pipe-a-legacy-gamma:
- shard-glk: [PASS][9] -> [FAIL][10] ([fdo#108145] / [i915#71])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-glk4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-glk5/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-128x42-sliding:
- shard-kbl: [PASS][11] -> [FAIL][12] ([i915#54])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl1/igt@[email protected]
- shard-apl: [PASS][13] -> [FAIL][14] ([i915#54])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl3/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [PASS][15] -> [FAIL][16] ([i915#72])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-glk5/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-glk6/igt@[email protected]

* igt@kms_cursor_legacy@pipe-b-torture-bo:
- shard-iclb: [PASS][17] -> [DMESG-WARN][18] ([i915#128])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-iclb1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb7/igt@[email protected]

* igt@kms_draw_crc@draw-method-rgb565-render-ytiled:
- shard-glk: [PASS][19] -> [FAIL][20] ([i915#52] / [i915#54]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-glk6/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-glk7/igt@[email protected]

* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([i915#180]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl7/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl4/igt@[email protected]

* igt@kms_plane_cursor@pipe-a-viewport-size-128:
- shard-apl: [PASS][23] -> [FAIL][24] ([i915#1559] / [i915#95])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl1/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl6/igt@[email protected]
- shard-kbl: [PASS][25] -> [FAIL][26] ([i915#1559] / [i915#93] / [i915#95])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl2/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl7/igt@[email protected]

* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [PASS][27] -> [SKIP][28] ([fdo#109441]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb8/igt@kms_psr@psr2_cursor_plane_move.html

* igt@kms_setmode@basic:
- shard-kbl: [PASS][29] -> [FAIL][30] ([i915#31])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl7/igt@[email protected]

* igt@kms_vblank@pipe-c-ts-continuation-suspend:
- shard-glk: [PASS][31] -> [INCOMPLETE][32] ([i915#58] / [k.org#198133])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-glk7/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-glk2/igt@[email protected]
- shard-hsw: [PASS][33] -> [INCOMPLETE][34] ([i915#61])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-hsw1/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-hsw4/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_params@invalid-bsd-ring:
- shard-iclb: [SKIP][35] ([fdo#109276]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-iclb6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb1/igt@[email protected]

* igt@gen9_exec_parse@allowed-single:
- shard-kbl: [DMESG-WARN][37] ([i915#1436] / [i915#716]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl3/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen:
- shard-kbl: [FAIL][39] ([i915#54] / [i915#93] / [i915#95]) -> [PASS][40] +2 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl2/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl2/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-128x42-offscreen:
- shard-apl: [FAIL][41] ([i915#54] / [i915#95]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl8/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-a-cursor-suspend:
- shard-kbl: [DMESG-WARN][43] ([i915#165] / [i915#180]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl7/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl1/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-crc-atomic:
- shard-kbl: [FAIL][45] ([i915#1566] / [i915#93] / [i915#95]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl3/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl4/igt@[email protected]

* igt@kms_draw_crc@draw-method-rgb565-render-untiled:
- shard-glk: [FAIL][47] ([i915#52] / [i915#54]) -> [PASS][48] +2 similar issues
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-glk1/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-glk1/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb8888-mmap-cpu-untiled:
- shard-kbl: [FAIL][49] ([i915#177] / [i915#52] / [i915#54] / [i915#93] / [i915#95]) -> [PASS][50] +1 similar issue
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl1/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl2/igt@[email protected]
- shard-apl: [FAIL][51] ([i915#52] / [i915#54] / [i915#95]) -> [PASS][52] +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl8/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled:
- shard-kbl: [FAIL][53] ([fdo#108145] / [i915#177] / [i915#52] / [i915#54] / [i915#93] / [i915#95]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl7/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl4/igt@[email protected]
- shard-apl: [FAIL][55] ([fdo#108145] / [i915#52] / [i915#54] / [i915#95]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl6/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl8/igt@[email protected]

* {igt@kms_flip@flip-vs-suspend@c-dp1}:
- shard-kbl: [DMESG-WARN][57] ([i915#180]) -> [PASS][58] +4 similar issues
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl7/igt@kms_flip@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl7/igt@kms_flip@[email protected]

* igt@kms_flip_tiling@flip-changes-tiling-y:
- shard-kbl: [FAIL][59] ([i915#699] / [i915#93] / [i915#95]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl3/igt@[email protected]
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl3/igt@[email protected]

* igt@kms_hdr@bpc-switch-suspend:
- shard-apl: [DMESG-WARN][61] ([i915#180]) -> [PASS][62] +2 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl2/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl8/igt@[email protected]

* igt@kms_plane_cursor@pipe-a-viewport-size-64:
- shard-kbl: [FAIL][63] ([i915#1559] / [i915#93] / [i915#95]) -> [PASS][64]
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl1/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl2/igt@[email protected]
- shard-apl: [FAIL][65] ([i915#1559] / [i915#95]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl2/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl1/igt@[email protected]

* igt@kms_psr@psr2_primary_mmap_cpu:
- shard-iclb: [SKIP][67] ([fdo#109441]) -> [PASS][68] +1 similar issue
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-iclb1/igt@kms_psr@psr2_primary_mmap_cpu.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

* igt@perf@polling:
- shard-tglb: [SKIP][69] ([i915#405]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-tglb6/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-tglb8/igt@[email protected]
- shard-apl: [SKIP][71] ([fdo#109271]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl8/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl7/igt@[email protected]
- shard-kbl: [SKIP][73] ([fdo#109271]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl3/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl7/igt@[email protected]
- shard-hsw: [SKIP][75] ([fdo#109271]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-hsw4/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-hsw2/igt@[email protected]
- shard-iclb: [SKIP][77] ([i915#405]) -> [PASS][78]
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-iclb6/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-iclb1/igt@[email protected]

#### Warnings ####

* igt@i915_pm_dc@dc6-psr:
- shard-snb: [INCOMPLETE][79] ([i915#82]) -> [SKIP][80] ([fdo#109271])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-snb5/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-snb4/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [FAIL][81] ([i915#95]) -> [FAIL][82] ([i915#1525])
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl6/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl2/igt@[email protected]
- shard-kbl: [FAIL][83] ([i915#93] / [i915#95]) -> [FAIL][84] ([i915#64])
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl7/igt@[email protected]
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb:
- shard-apl: [FAIL][85] ([fdo#108145] / [i915#265]) -> [FAIL][86] ([fdo#108145] / [i915#265] / [i915#95])
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-apl7/igt@[email protected]
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-apl7/igt@[email protected]
- shard-kbl: [FAIL][87] ([fdo#108145] / [i915#265]) -> [FAIL][88] ([fdo#108145] / [i915#265] / [i915#93] / [i915#95])
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8392/shard-kbl2/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/shard-kbl7/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#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[i915#128]: https://gitlab.freedesktop.org/drm/intel/issues/128
[i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
[i915#1525]: https://gitlab.freedesktop.org/drm/intel/issues/1525
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#1559]: https://gitlab.freedesktop.org/drm/intel/issues/1559
[i915#1566]: https://gitlab.freedesktop.org/drm/intel/issues/1566
[i915#165]: https://gitlab.freedesktop.org/drm/intel/issues/165
[i915#177]: https://gitlab.freedesktop.org/drm/intel/issues/177
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#370]: https://gitlab.freedesktop.org/drm/intel/issues/370
[i915#405]: https://gitlab.freedesktop.org/drm/intel/issues/405
[i915#46]: https://gitlab.freedesktop.org/drm/intel/issues/46
[i915#52]: https://gitlab.freedesktop.org/drm/intel/issues/52
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#64]: https://gitlab.freedesktop.org/drm/intel/issues/64
[i915#699]: https://gitlab.freedesktop.org/drm/intel/issues/699
[i915#71]: https://gitlab.freedesktop.org/drm/intel/issues/71
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (10 -> 8)
------------------------------

Missing (2): pig-skl-6260u pig-glk-j5005

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

* CI: CI-20190529 -> None
* IGT: IGT_5614 -> IGTPW_4517
* Piglit: piglit_4509 -> None

CI-20190529: 20190529
CI_DRM_8392: c5ceaac881b4dc4eca6473abeb27342663c898d3 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_4517: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4517/index.html
IGT_5614: d095827add11d4e8158b87683971ee659749d9a4 @ 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_4517/index.html
_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev