public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API
@ 2019-12-02 12:25 Arkadiusz Hiler
  2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 2/3] Introduce device selection lsgpu tool Arkadiusz Hiler
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2019-12-02 12:25 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

The new device selection API based on scanning DRM subsystem using udev.

It provides a set of functions for enumerating and filtering available
graphic cards to get the corresponding /dev/dri nodes.

For details check the top level documentation in igt_device_scan.c

To be used in lsgpu tool and internally by drm_open_driver*() functions
(see the following patches).

v2 (Arek):
 * drop most of the glib code in favor of igt_list and plain C
 * make sysfs paths handling non-special - introduce sys: filter
 * drop multiple filter_* structs in favor of just two:
   - filter_class for defining filters types (e.g. sys:)
   - filter for "filter instance" - the data provided by the user
 * promote many macros to real functions for type safety
 * rename devs->devs to devs->all
 * rename devs->view to devs->filtered
 * don't expose "chip" (e.g. DRIVER_ANY) as it's unreadable as int
 * update docs to reflect those changes
 * move open functions that open igt_device_card to this patch
 * remove platform filter class for now
 * use only a single filter

v3 (Arek):
 * fix some memory leaks and setting to NULL after free() (Zbigniew)
 * fix even more missing free() (Petri)
 * use the new igt_list API
 * fix null pointer dereference on filter->class

Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
---
 .../igt-gpu-tools/igt-gpu-tools-docs.xml      |    1 +
 lib/Makefile.sources                          |    2 +
 lib/igt_device_scan.c                         | 1203 +++++++++++++++++
 lib/igt_device_scan.h                         |   64 +
 lib/meson.build                               |    1 +
 5 files changed, 1271 insertions(+)
 create mode 100644 lib/igt_device_scan.c
 create mode 100644 lib/igt_device_scan.h

diff --git a/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml b/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
index 2edb4adf..454d64e5 100644
--- a/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
+++ b/docs/reference/igt-gpu-tools/igt-gpu-tools-docs.xml
@@ -23,6 +23,7 @@
     <xi:include href="xml/igt_core.xml"/>
     <xi:include href="xml/igt_debugfs.xml"/>
     <xi:include href="xml/igt_device.xml"/>
+    <xi:include href="xml/igt_device_scan.xml"/>
     <xi:include href="xml/igt_draw.xml"/>
     <xi:include href="xml/igt_dummyload.xml"/>
     <xi:include href="xml/igt_fb.xml"/>
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index 9d1a4e06..750e630b 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -25,6 +25,8 @@ lib_source_list =	 	\
 	igt_debugfs.h		\
 	igt_device.c		\
 	igt_device.h		\
+	igt_device_scan.c	\
+	igt_device_scan.h	\
 	igt_aux.c		\
 	igt_aux.h		\
 	igt_color_encoding.c	\
diff --git a/lib/igt_device_scan.c b/lib/igt_device_scan.c
new file mode 100644
index 00000000..b3f79c81
--- /dev/null
+++ b/lib/igt_device_scan.c
@@ -0,0 +1,1203 @@
+/*
+ * Copyright © 2019 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "igt.h"
+#include "igt_list.h"
+#include "igt_sysfs.h"
+#include "igt_device.h"
+#include "igt_device_scan.h"
+#include <glib.h>
+#include <libudev.h>
+#include <linux/limits.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <dirent.h>
+#include <fcntl.h>
+
+/**
+ * SECTION:igt_device_scan
+ * @short_description: Device scanning and selection
+ * @title: Device selection
+ * @include: igt.h
+ *
+ * # Device scanning
+ *
+ * Device scanning iterates over DRM subsystem using udev library
+ * to acquire DRM devices.
+ * For each DRM device we also get and store its parent to allow device
+ * selection happen in a more contextual way.
+ *
+ * Parent devices are bus devices (like PCI, platform, etc.) and contain a lot
+ * of extra data on top of the DRM device itself.
+ *
+ * # Filters
+ *
+ * Device selection can be done using filters that are using the data collected
+ * udev + some syntactic sugar.
+ *
+ * Direct device selection filter uses sysfs path to find the device:
+ *
+ * |[<!-- language="plain" -->
+ * sys:/sys/path/to/device/or/parent
+ * ]|
+ *
+ * Examples:
+ * |[<!-- language="plain" -->
+ * - sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
+ * - sys:/sys/devices/pci0000:00/0000:00:02.0
+ * - sys:/sys/devices/platform/vgem
+ * ]|
+ *
+ * The alternative is to use other implemented filters:
+ *
+ * - drm: get drm /dev/dri/... device directly
+ *
+ *   |[<!-- language="plain" -->
+ *   drm:/dev/dri/...
+ *   ]|
+ *
+ *   Loading drivers in different order can cause different ordering of
+ *   /dev/dri/card nodes which be problematic for reliable and reproducible
+ *   device selection, e.g. in automated execution setting. In such scenarios
+ *   please consider using sys, pci or platform filters instead.
+ *
+ * - pci: select device using PCI vendor and device properties
+ *   |[<!-- language="plain" -->
+ *   pci:[vendor=%04x/name][,device=%04x][,card=%d]
+ *   ]|
+ *
+ *   Filter allows device selection using vendor (hex or name), device id
+ *   (hex) and nth-card from all matches. For example if there are 4 PCI cards
+ *   installed (let two cards have 1234 and other two 1235 device id, all of
+ *   them of vendor Intel) you can select one using:
+ *
+ *   |[<!-- language="plain" -->
+ *   pci:vendor=Intel,device=1234,card=0
+ *   ]|
+ *
+ *   or
+ *
+ *   |[<!-- language="plain" -->
+ *   pci:vendor=8086,device=1234,card=0
+ *   ]|
+ *
+ *   This takes first device with 1234 id for Intel vendor (8086).
+ *
+ *   |[<!-- language="plain" -->
+ *   pci:vendor=Intel,device=1234,card=1
+ *   ]|
+ *
+ *   or
+ *
+ *   |[<!-- language="plain" -->
+ *   pci:vendor=8086,device=1234,card=1
+ *   ]|
+ *
+ *   It selects the second one.
+ *
+ *   As order the on PCI bus doesn't change (unless you'll add new device or
+ *   reorder existing one) device selection using this filter will always
+ *   return you same device regardless the order of enumeration.
+ *
+ *   Simple syntactic sugar over using the sysfs paths.
+ */
+
+#ifdef DEBUG_DEVICE_SCAN
+#define DBG(...) \
+{ \
+	struct timeval tm; \
+	gettimeofday(&tm, NULL); \
+	printf("%10ld.%03ld: ", tm.tv_sec, tm.tv_usec); \
+	printf(__VA_ARGS__); \
+}
+
+#else
+#define DBG(...) {}
+#endif
+
+static inline bool strequal(const char *a, const char *b)
+{
+	if (a == NULL || b == NULL)
+		return false;
+
+	return strcmp(a, b) == 0;
+}
+
+struct igt_device {
+	/* Filled for drm devices */
+	struct igt_device *parent;
+
+	/* Point to vendor spec if can be found */
+
+	/* Properties / sysattrs rewriten from udev lists */
+	GHashTable *props_ht;
+	GHashTable *attrs_ht;
+
+	/* Most usable variables from udev device */
+	char *subsystem;
+	char *syspath;
+	char *devnode;
+
+	/* /dev/dri/... paths */
+	char *drm_card;
+	char *drm_render;
+
+	/* For pci subsystem */
+	char *vendor;
+	char *device;
+
+	struct igt_list_head link;
+};
+
+/* Scanned devices */
+static struct {
+	struct igt_list_head all;
+	struct igt_list_head filtered;
+	bool devs_scanned;
+} igt_devs;
+
+static struct {
+	const char *name;
+	const char *vendor_id;
+} pci_vendor_mapping[] = {
+	{ "intel", "8086" },
+	{ "amd", "1002" },
+	{ NULL, },
+};
+
+static const char *get_pci_vendor_id_by_name(const char *name)
+{
+	for (typeof(*pci_vendor_mapping) *vm = pci_vendor_mapping; vm->name; vm++)
+	{
+		if (!strcasecmp(name, vm->name))
+			return vm->vendor_id;
+	}
+
+	return NULL;
+}
+
+/* Reading sysattr values can take time (even seconds),
+ * we want to avoid reading such keys.
+ */
+static bool is_on_blacklist(const char *what)
+{
+	static const char *keys[] = { "config", "modalias", "modes",
+				      "resource",
+				      "resource0", "resource1", "resource2",
+				      "resource3", "resource4", "resource5",
+				      "resource0_wc", "resource1_wc", "resource2_wc",
+				      "resource3_wc", "resource4_wc", "resource5_wc",
+				      "driver",
+				      "uevent", NULL};
+	const char *key;
+	int i = 0;
+
+	if (what == NULL)
+		return false;
+
+	while ((key = keys[i++])) {
+		if (strcmp(key, what) == 0)
+			return true;
+	}
+
+	return false;
+
+}
+
+static struct igt_device *igt_device_new(void)
+{
+	struct igt_device *dev;
+
+	dev = calloc(1, sizeof(struct igt_device));
+	if (!dev)
+		return NULL;
+
+	dev->attrs_ht = g_hash_table_new_full(g_str_hash, g_str_equal,
+					      free, free);
+	dev->props_ht = g_hash_table_new_full(g_str_hash, g_str_equal,
+					      free, free);
+
+	if (dev->attrs_ht && dev->props_ht)
+		return dev;
+
+	free(dev);
+
+	return NULL;
+}
+
+static void igt_device_add_prop(struct igt_device *dev,
+				const char *key, const char *value)
+{
+	if (!key || !value)
+		return;
+
+	g_hash_table_insert(dev->props_ht, strdup(key), strdup(value));
+}
+
+static void igt_device_add_attr(struct igt_device *dev,
+				const char *key, const char *value)
+{
+	const char *v = value;
+
+	if (!key)
+		return;
+
+	/* It's possible we have symlink at key filename, but udev
+	 * library resolves only few of them
+	 */
+	if (!v) {
+		struct stat st;
+		char path[PATH_MAX];
+		char linkto[PATH_MAX];
+		int len;
+
+		snprintf(path, sizeof(path), "%s/%s", dev->syspath, key);
+		if (lstat(path, &st) != 0)
+			return;
+
+		len = readlink(path, linkto, sizeof(linkto));
+		if (len <= 0 || len == (ssize_t) sizeof(linkto))
+			return;
+		linkto[len] = '\0';
+		v = strrchr(linkto, '/');
+		if (v == NULL)
+			return;
+		v++;
+	}
+
+	g_hash_table_insert(dev->attrs_ht, strdup(key), strdup(v));
+}
+
+/* Iterate over udev properties list and rewrite it to igt_device properties
+ * hash table for instant access.
+ */
+static void get_props(struct udev_device *dev, struct igt_device *idev)
+{
+	struct udev_list_entry *entry;
+
+	entry = udev_device_get_properties_list_entry(dev);
+	while (entry) {
+		const char *name = udev_list_entry_get_name(entry);
+		const char *value = udev_list_entry_get_value(entry);
+
+		igt_device_add_prop(idev, name, value);
+		entry = udev_list_entry_get_next(entry);
+		DBG("prop: %s, val: %s\n", name, value);
+	}
+}
+
+/* Same as get_props(), but rewrites sysattrs. Resolves symbolic links
+ * not handled by udev get_sysattr_value().
+ * Function skips sysattrs from blacklist ht (acquiring some values can take
+ * seconds).
+ */
+static void get_attrs(struct udev_device *dev, struct igt_device *idev)
+{
+	struct udev_list_entry *entry;
+
+	entry = udev_device_get_sysattr_list_entry(dev);
+	while (entry) {
+		const char *key = udev_list_entry_get_name(entry);
+		const char *value;
+
+		if (is_on_blacklist(key)) {
+			entry = udev_list_entry_get_next(entry);
+			continue;
+		}
+
+		value = udev_device_get_sysattr_value(dev, key);
+		igt_device_add_attr(idev, key, value);
+		entry = udev_list_entry_get_next(entry);
+		DBG("attr: %s, val: %s\n", key, value);
+	}
+}
+
+#define get_prop(dev, prop) ((char *) g_hash_table_lookup(dev->props_ht, prop))
+#define get_attr(dev, attr) ((char *) g_hash_table_lookup(dev->attrs_ht, attr))
+#define get_prop_subsystem(dev) get_prop(dev, "SUBSYSTEM")
+#define is_drm_subsystem(dev)  (strequal(get_prop_subsystem(dev), "drm"))
+#define is_pci_subsystem(dev)  (strequal(get_prop_subsystem(dev), "pci"))
+
+/* Gets PCI_ID property, splits to xxxx:yyyy and stores
+ * xxxx to dev->vendor and yyyy to dev->device for
+ * faster access.
+ */
+static void set_vendor_device(struct igt_device *dev)
+{
+	const char *pci_id = get_prop(dev, "PCI_ID");
+
+	if (!pci_id || strlen(pci_id) != 9)
+		return;
+	dev->vendor = strndup(pci_id, 4);
+	dev->device = strndup(pci_id + 5, 4);
+}
+
+/* Allocate arrays for keeping scanned devices */
+static bool prepare_scan(void)
+{
+	if (igt_devs.all.prev == NULL || igt_devs.all.next == NULL)
+		IGT_INIT_LIST_HEAD(&igt_devs.all);
+
+	if (igt_devs.filtered.prev == NULL || igt_devs.filtered.next == NULL)
+		IGT_INIT_LIST_HEAD(&igt_devs.filtered);
+
+	return true;
+}
+
+static char* strdup_nullsafe(const char* str)
+{
+	if (str == NULL)
+		return NULL;
+
+	return strdup(str);
+}
+
+/* Create new igt_device from udev device.
+ * Fills structure with most usable udev device variables, properties
+ * and sysattrs.
+ */
+static struct igt_device *igt_device_new_from_udev(struct udev_device *dev)
+{
+	struct igt_device *idev = igt_device_new();
+
+	igt_assert(idev);
+	idev->syspath = strdup_nullsafe(udev_device_get_syspath(dev));
+	idev->subsystem = strdup_nullsafe(udev_device_get_subsystem(dev));
+	idev->devnode = strdup_nullsafe(udev_device_get_devnode(dev));
+
+	if (idev->devnode && strstr(idev->devnode, "/dev/dri/card"))
+		idev->drm_card = strdup(idev->devnode);
+	else if (idev->devnode && strstr(idev->devnode, "/dev/dri/render"))
+		idev->drm_render = strdup(idev->devnode);
+
+	get_props(dev, idev);
+	get_attrs(dev, idev);
+
+	return idev;
+}
+
+/* Iterate over all igt_devices array and find one matched to
+ * subsystem and syspath.
+ */
+static struct igt_device *igt_device_find(const char *subsystem,
+					  const char *syspath)
+{
+	struct igt_device *dev;
+
+	igt_list_for_each_entry(dev, &igt_devs.all, link)
+	{
+		if (strcmp(dev->subsystem, subsystem) == 0 &&
+			strcmp(dev->syspath, syspath) == 0)
+			return dev;
+	}
+
+	return NULL;
+}
+
+static struct igt_device *igt_device_from_syspath(const char *syspath)
+{
+	struct igt_device *dev;
+
+	igt_list_for_each_entry(dev, &igt_devs.all, link)
+	{
+		if (strcmp(dev->syspath, syspath) == 0)
+			return dev;
+	}
+
+	return NULL;
+}
+
+/* For each drm igt_device add or update its parent igt_device to the array.
+ * As card/render drm devices mostly have same parent (vkms is an exception)
+ * link to it and update corresponding drm_card / drm_render fields.
+ */
+static void update_or_add_parent(struct udev_device *dev,
+				 struct igt_device *idev)
+{
+	struct udev_device *parent_dev;
+	struct igt_device *parent_idev;
+	const char *subsystem, *syspath, *devname;
+
+	parent_dev = udev_device_get_parent(dev);
+	igt_assert(parent_dev);
+
+	subsystem = udev_device_get_subsystem(parent_dev);
+	syspath = udev_device_get_syspath(parent_dev);
+
+	parent_idev = igt_device_find(subsystem, syspath);
+	if (!parent_idev) {
+		parent_idev = igt_device_new_from_udev(parent_dev);
+		if (is_pci_subsystem(parent_idev)) {
+			set_vendor_device(parent_idev);
+		}
+		igt_list_add_tail(&parent_idev->link, &igt_devs.all);
+	}
+	devname = udev_device_get_devnode(dev);
+	if (devname != NULL && strstr(devname, "/dev/dri/card"))
+		parent_idev->drm_card = strdup(devname);
+	else if (devname != NULL && strstr(devname, "/dev/dri/render"))
+		parent_idev->drm_render = strdup(devname);
+
+	idev->parent = parent_idev;
+}
+
+static struct igt_device *duplicate_device(struct igt_device *dev) {
+	struct igt_device *dup = malloc(sizeof(*dup));
+	memcpy(dup, dev, sizeof(*dev));
+	dup->link.prev = NULL;
+	dup->link.next = NULL;
+	return dup;
+}
+
+static gint devs_compare(const void *a, const void *b)
+{
+	struct igt_device *dev1, *dev2;
+	int ret;
+
+	dev1 = *(struct igt_device **) a;
+	dev2 = *(struct igt_device **) b;
+	ret = strcmp(dev1->subsystem, dev2->subsystem);
+	if (ret)
+		return ret;
+
+	return strcmp(dev1->syspath, dev2->syspath);
+}
+
+static void sort_all_devices(void)
+{
+	struct igt_device *dev, *tmp;
+	int len = igt_list_length(&igt_devs.all);
+	struct igt_device **devs = malloc(len * sizeof(*dev));
+
+	int i = 0;
+	igt_list_for_each_entry_safe(dev, tmp, &igt_devs.all, link) {
+		devs[i] = dev;
+		igt_assert(i++ < len);
+		igt_list_del(&dev->link);
+	}
+
+	qsort(devs, len, sizeof(*devs), devs_compare);
+
+	for (i = 0; i < len; ++i) {
+		igt_list_add_tail(&devs[i]->link, &igt_devs.all);
+	}
+
+	free(devs);
+}
+
+/* Core scanning function.
+ *
+ * All scanned devices are kept inside igt_devs.all pointer array.
+ * Each added device is igt_device structure, which contrary to udev device
+ * has properties / sysattrs stored inside hash table instead of list.
+ *
+ * Function iterates over devices on 'drm' subsystem. For each drm device
+ * its parent is taken (bus device) and stored inside same array.
+ * Function sorts all found devices to keep same order of bus devices
+ * for providing predictable search.
+ */
+static void scan_drm_devices(void)
+{
+	struct udev *udev;
+	struct udev_enumerate *enumerate;
+	struct udev_list_entry *devices, *dev_list_entry;
+	struct igt_device *dev;
+	int ret;
+
+	udev = udev_new();
+	igt_assert(udev);
+
+	enumerate = udev_enumerate_new(udev);
+	igt_assert(enumerate);
+
+	DBG("Scanning drm subsystem\n");
+	ret = udev_enumerate_add_match_subsystem(enumerate, "drm");
+	igt_assert(!ret);
+
+	udev_enumerate_add_match_property(enumerate, "DEVNAME", "/dev/dri/*");
+	igt_assert(!ret);
+
+	ret = udev_enumerate_scan_devices(enumerate);
+	igt_assert(!ret);
+
+	devices = udev_enumerate_get_list_entry(enumerate);
+	if (!devices)
+		return;
+
+	udev_list_entry_foreach(dev_list_entry, devices) {
+		const char *path;
+		struct udev_device *udev_dev;
+		struct igt_device *idev;
+
+		path = udev_list_entry_get_name(dev_list_entry);
+		udev_dev = udev_device_new_from_syspath(udev, path);
+		idev = igt_device_new_from_udev(udev_dev);
+		update_or_add_parent(udev_dev, idev);
+		igt_list_add_tail(&idev->link, &igt_devs.all);
+
+		udev_device_unref(udev_dev);
+	}
+	udev_enumerate_unref(enumerate);
+	udev_unref(udev);
+
+	sort_all_devices();
+
+	igt_list_for_each_entry(dev, &igt_devs.all, link) {
+		struct igt_device *dev_dup = duplicate_device(dev);
+		igt_list_add_tail(&dev_dup->link, &igt_devs.filtered);
+	}
+}
+
+static void igt_device_free(struct igt_device *dev)
+{
+	free(dev->devnode);
+	free(dev->subsystem);
+	free(dev->syspath);
+	free(dev->drm_card);
+	free(dev->drm_render);
+	free(dev->vendor);
+	free(dev->device);
+	g_hash_table_destroy(dev->attrs_ht);
+	g_hash_table_destroy(dev->props_ht);
+}
+
+/**
+ * igt_devices_scan
+ * @force: enforce scanning devices
+ *
+ * Function scans udev in search of gpu devices. For first run it can be
+ * called with @force = false. If something changes during the the test
+ * or test does some module loading (new drm devices occurs during execution)
+ * function must be called again with @force = true to refresh device array.
+ */
+void igt_devices_scan(bool force)
+{
+	if (force && igt_devs.devs_scanned) {
+		struct igt_device *dev, *tmp;
+		igt_list_for_each_entry_safe(dev, tmp, &igt_devs.all, link) {
+			igt_device_free(dev);
+			free(dev);
+		}
+
+		igt_devs.devs_scanned = false;
+	}
+
+	if (igt_devs.devs_scanned)
+		return;
+
+	prepare_scan();
+	scan_drm_devices();
+
+	igt_devs.devs_scanned = true;
+}
+
+static inline void _pr_simple(const char *k, const char *v)
+{
+	printf("    %-16s: %s\n", k, v);
+}
+
+static inline void _pr_simple2(const char *k, const char *v1, const char *v2)
+{
+	printf("    %-16s: %s:%s\n", k, v1, v2);
+}
+
+static void igt_devs_print_simple(struct igt_list_head *view)
+{
+	struct igt_device *dev;
+
+	if (!view)
+		return;
+
+	if (igt_list_empty(view)) {
+		printf("No GPU devices found\n");
+		return;
+	}
+
+	igt_list_for_each_entry(dev, view, link) {
+		printf("sys:%s\n", dev->syspath);
+		if (dev->subsystem)
+			_pr_simple("subsystem", dev->subsystem);
+		if (dev->drm_card)
+			_pr_simple("drm card", dev->drm_card);
+		if (dev->drm_render)
+			_pr_simple("drm render", dev->drm_render);
+		if (is_drm_subsystem(dev)) {
+			_pr_simple2("parent", "sys",
+				   dev->parent->syspath);
+		} else {
+			if (is_pci_subsystem(dev)) {
+				_pr_simple("vendor", dev->vendor);
+				_pr_simple("device", dev->device);
+			}
+		}
+		printf("\n");
+	}
+}
+
+static inline void _print_key_value(const char* k, const char *v)
+{
+	printf("%-32s: %s\n", k, v);
+}
+
+static void print_ht(GHashTable *ht)
+{
+	GList *keys = g_hash_table_get_keys(ht);
+
+	keys = g_list_sort(keys, (GCompareFunc) strcmp);
+	while (keys) {
+		char *k = (char *) keys->data;
+		char *v = g_hash_table_lookup(ht, k);
+
+		_print_key_value(k, v);
+		keys = g_list_next(keys);
+	}
+	g_list_free(keys);
+}
+
+static void igt_devs_print_detail(struct igt_list_head *view)
+{
+	struct igt_device *dev;
+
+	if (!view)
+		return;
+
+	if (igt_list_empty(view)) {
+		printf("No GPU devices found\n");
+		return;
+	}
+
+	igt_list_for_each_entry(dev, view, link) {
+		printf("========== %s:%s ==========\n",
+		       dev->subsystem, dev->syspath);
+		if (!is_drm_subsystem(dev)) {
+			_print_key_value("card device", dev->drm_card);
+			_print_key_value("render device", dev->drm_render);
+		}
+
+		printf("\n[properties]\n");
+		print_ht(dev->props_ht);
+		printf("\n[attributes]\n");
+		print_ht(dev->attrs_ht);
+		printf("\n");
+	}
+}
+
+static struct print_func {
+	void (*prn)(struct igt_list_head *view);
+} print_functions[] = {
+	[IGT_PRINT_SIMPLE] = { .prn = igt_devs_print_simple },
+	[IGT_PRINT_DETAIL] = { .prn = igt_devs_print_detail },
+};
+
+/**
+ * igt_devices_print
+ * @printtype: IGT_PRINT_SIMPLE or IGT_PRINT_DETAIL
+ *
+ * Function can be used by external tool to print device array in simple
+ * or detailed form. This function is added here to avoid exposing
+ * internal implementation data structures.
+ */
+void igt_devices_print(enum igt_devices_print_type printtype)
+{
+	print_functions[printtype].prn(&igt_devs.filtered);
+}
+
+/**
+ * igt_devices_print_vendors
+ *
+ * Print pci id -> vendor mappings. Vendor names printed by this function
+ * can be used for filters like pci which allows passing vendor - like
+ * vendor id (8086) or as a string (Intel).
+ */
+void igt_devices_print_vendors(void)
+{
+	printf("Recognized vendors:\n");
+	printf("%-8s %-16s\n", "PCI ID", "vendor");
+	for (typeof(*pci_vendor_mapping) *vm = pci_vendor_mapping; vm->name; vm++) {
+		printf("%-8s %-16s\n", vm->vendor_id, vm->name);
+	}
+}
+
+struct filter;
+
+/* ------------------------------------------------------------------------- */
+struct filter_class {
+	struct igt_list_head *(*filter_function)(const struct filter_class *fcls,
+						 const struct filter *filter);
+	bool (*is_valid)(const struct filter_class *fcls,
+			 const struct filter *filter);
+	const char *name;
+	const char *help;
+	const char *detail;
+};
+
+#define FILTER_NAME_LEN 32
+#define FILTER_DATA_LEN 256
+
+struct filter {
+	struct filter_class *class;
+
+	char raw_data[FILTER_DATA_LEN];
+
+	struct {
+		char *vendor;
+		char *device;
+		char *card;
+		char *drm;
+		char *driver;
+	} data;
+};
+
+static void fill_filter_data(struct filter *filter, const char *key, const char *value)
+{
+	if (key == NULL || value == NULL) {
+		return;
+	}
+
+#define __fill_key(name) if (strcmp(key, #name) == 0) \
+	filter->data.name = strdup(value)
+	__fill_key(vendor);
+	__fill_key(device);
+	__fill_key(card);
+	__fill_key(drm);
+	__fill_key(driver);
+#undef __fill_key
+
+}
+
+static void split_filter_data(struct filter *filter)
+{
+	char *property, *key, *data, *dup;
+
+	dup = strdup(filter->raw_data);
+	data = dup;
+
+	while ((property = strsep(&data, ","))) {
+		key = strsep(&property, "=");
+		fill_filter_data(filter, key, property);
+	}
+
+	free(dup);
+}
+
+static struct filter_class *get_filter_class(const char *class_name, const struct filter *filter);
+
+static bool parse_filter(const char *fstr, struct filter *filter)
+{
+	char class_name[32];
+	if (!fstr || !filter)
+		return false;
+
+	memset(filter, 0, sizeof(*filter));
+
+	if (sscanf(fstr, "%31[^:]:%255s", class_name, filter->raw_data) >= 1) {
+		filter->class = get_filter_class(class_name, filter);
+		split_filter_data(filter);
+		return true;
+	}
+
+	return false;
+}
+
+static bool is_vendor_matched(struct igt_device *dev, const char *vendor)
+{
+	const char *vendor_id;
+
+	if (!dev->vendor || !vendor)
+		return false;
+
+	/* First we compare vendor id, like 8086 */
+	if (!strcasecmp(dev->vendor, vendor))
+		return true;
+
+	/* Likely we have vendor string instead of id */
+	vendor_id = get_pci_vendor_id_by_name(vendor);
+	if (!vendor_id)
+		return false;
+
+	return !strcasecmp(dev->vendor, vendor_id);
+}
+
+/* Filter which matches subsystem:/sys/... path.
+ * Used as first filter in chain.
+ */
+static struct igt_list_head *filter_sys(const struct filter_class *fcls,
+					const struct filter *filter)
+{
+	struct igt_device *dev;
+	(void) fcls;
+
+	DBG("filter sys\n");
+	if (!strlen(filter->raw_data))
+		return &igt_devs.filtered;
+
+	dev = igt_device_from_syspath(filter->raw_data);
+	if (dev) {
+		struct igt_device *dup = duplicate_device(dev);
+		igt_list_add_tail(&dup->link, &igt_devs.filtered);
+	}
+
+	return &igt_devs.filtered;
+}
+
+/* Find drm device using direct path to /dev/dri/.
+ * It extends filter_sys to allow using drm:/dev/dri/cardX and
+ * drm:/dev/dri/renderDX filter syntax.
+ */
+static struct igt_list_head *filter_drm(const struct filter_class *fcls,
+					const struct filter *filter)
+{
+	struct igt_device *dev;
+	(void) fcls;
+
+	DBG("filter drm\n");
+	if (!strlen(filter->raw_data))
+		return &igt_devs.filtered;
+
+	igt_list_for_each_entry(dev, &igt_devs.all, link) {
+		if (!is_drm_subsystem(dev))
+			continue;
+
+		if (strequal(dev->syspath, filter->raw_data) ||
+			strequal(dev->drm_card, filter->raw_data) ||
+			strequal(dev->drm_render, filter->raw_data)) {
+			struct igt_device *dup = duplicate_device(dev);
+			igt_list_add_tail(&dup->link, &igt_devs.filtered);
+			break;
+		}
+	}
+
+
+	return &igt_devs.filtered;
+}
+
+/* Find appropriate pci device matching vendor/device/card filter arguments.
+ */
+static struct igt_list_head *filter_pci(const struct filter_class *fcls,
+					const struct filter *filter)
+{
+	struct igt_device *dev;
+	int card = -1;
+	(void) fcls;
+
+	DBG("filter pci\n");
+
+	if (filter->data.card) {
+		sscanf(filter->data.card, "%d", &card);
+		if (card < 0) {
+			return &igt_devs.filtered;
+		}
+	} else {
+		card = 0;
+	}
+
+	igt_list_for_each_entry(dev, &igt_devs.all, link) {
+		if (!is_pci_subsystem(dev))
+			continue;
+
+		/* Skip if 'vendor' doesn't match (hex or name) */
+		if (filter->data.vendor && !is_vendor_matched(dev, filter->data.vendor))
+			continue;
+
+		/* Skip if 'device' doesn't match */
+		if (filter->data.device && strcasecmp(filter->data.device, dev->device))
+			continue;
+
+		/* We get n-th card */
+		if (!card) {
+			struct igt_device *dup = duplicate_device(dev);
+			igt_list_add_tail(&dup->link, &igt_devs.filtered);
+			break;
+		}
+		card--;
+	}
+
+	DBG("Filter pci filtered size: %d\n", igt_list_length(&igt_devs.filtered));
+
+	return &igt_devs.filtered;
+}
+
+static bool sys_path_valid(const struct filter_class *fcls,
+			   const struct filter *filter)
+{
+	struct stat st;
+
+	if (stat(filter->raw_data, &st)) {
+		igt_warn("sys_path_valid: syspath [%s], err: %s\n",
+			 filter->raw_data, strerror(errno));
+		return false;
+	}
+
+	return true;
+}
+
+
+static struct filter_class filter_definition_list[] = {
+	{
+		.name = "sys",
+		.is_valid = sys_path_valid,
+		.filter_function = filter_sys,
+		.help = "sys:/sys/devices/pci0000:00/0000:00:02.0",
+		.detail = "find device byt its sysfs path\n",
+	},
+	{
+		.name = "drm",
+		.filter_function = filter_drm,
+		.help = "drm:/dev/dri/* path",
+		.detail = "find drm device by /dev/dri/* node\n",
+	},
+	{
+		.name = "pci",
+		.filter_function = filter_pci,
+		.help = "pci:[vendor=%04x/name][,device=%04x][,card=%d]",
+		.detail = "vendor is hex number or vendor name\n",
+	},
+	{
+		.name = NULL,
+	},
+};
+
+static struct filter_class *get_filter_class(const char *class_name, const struct filter *filter)
+{
+	struct filter_class *fcls = NULL;
+	int i = 0;
+
+	while ((fcls = &filter_definition_list[i++])->name != NULL) {
+		if (strcmp(class_name, fcls->name) == 0)
+			return fcls;
+	}
+
+	return NULL;
+}
+
+/**
+ * @igt_device_print_filter_types
+ *
+ * Print all filters syntax for device selection.
+ */
+void igt_device_print_filter_types(void)
+{
+	const struct filter_class *filter = NULL;
+	int i = 0;
+
+	printf("Filter types:\n---\n");
+	printf("%-12s  %s\n---\n", "filter", "syntax");
+
+	while ((filter = &filter_definition_list[i++])->name != NULL) {
+		printf("%-12s  %s\n", filter->name, filter->help);
+		printf("%-12s  %s\n", "", filter->detail);
+	}
+}
+
+static char *device_filter;
+
+/**
+ * igt_device_is_filter_set
+ *
+ * Returns whether we have a filter set.
+ */
+bool igt_device_is_filter_set(void)
+{
+	return device_filter != NULL;
+}
+
+/* Check does filter is valid. It checks:
+ * 1. /sys/... path first
+ * 2. filter name from filter definition
+ */
+static bool is_filter_valid(const char *fstr)
+{
+	struct filter filter;
+	int ret;
+
+	ret = parse_filter(fstr, &filter);
+	if (!ret)
+		return false;
+
+	if (filter.class == NULL) {
+		igt_warn("No filter class matching [%s]\n", fstr);
+		return false;
+	}
+
+	if (filter.class->is_valid != NULL && !filter.class->is_valid(filter.class, &filter))
+	{
+		igt_warn("Filter not valid [%s:%s]\n", filter.class->name, filter.raw_data);
+		return false;
+	}
+
+	return true;
+}
+
+/**
+ * igt_device_filter_set
+ * @filter: filter that should be set globally
+ */
+void igt_device_filter_set(const char *filter)
+{
+	if (!is_filter_valid(filter)) {
+		igt_warn("Invalid filter: %s\n", filter);
+		return;
+	}
+
+	if (device_filter != NULL)
+		free(device_filter);
+
+	device_filter = strdup(filter);
+}
+
+/**
+ * igt_device_filter_free
+ *
+ * Free the filter that we store internally, effectively unsetting it.
+ */
+void igt_device_filter_free(void)
+{
+	if (device_filter != NULL)
+		free(device_filter);
+
+	device_filter = NULL;
+}
+
+/**
+ * igt_device_filter_get
+ *
+ * Returns filter string or NULL if not set
+ */
+const char *igt_device_filter_get(void)
+{
+	return device_filter;
+}
+
+static bool igt_device_filter_apply(const char *fstr)
+{
+	struct igt_device *dev, *tmp;
+	struct filter filter;
+	bool ret;
+
+	if (!fstr)
+		return false;
+
+	ret = parse_filter(fstr, &filter);
+	if (!ret) {
+		igt_warn("Can't split filter [%s]\n", fstr);
+		return false;
+	}
+
+	/* Clean the filtered list */
+	igt_list_for_each_entry_safe(dev, tmp, &igt_devs.filtered, link) {
+		igt_list_del(&dev->link);
+		free(dev);
+	}
+
+	/* If filter.data contains "/sys" use direct path instead
+	 * contextual filter.
+	 */
+
+	if (!filter.class) {
+		igt_warn("No filter class matching [%s]\n", fstr);
+		return false;
+	}
+	filter.class->filter_function(filter.class, &filter);
+
+	return true;
+}
+
+/**
+ * igt_device_card_match
+ * @filter: filter string
+ * @card: pointer to igt_device_card struct
+ *
+ * Function applies filter to match device from device array.
+ *
+ * Returns:
+ * false - no card pointer was passed or card wasn't matched,
+ * true - card matched and returned.
+ */
+bool igt_device_card_match(const char *filter, struct igt_device_card *card)
+{
+	struct igt_device *dev = NULL;
+
+	if (!card)
+		return false;
+	memset(card, 0, sizeof(*card));
+
+	igt_devices_scan(false);
+
+	if (igt_device_filter_apply(filter) == false)
+		return false;
+
+	if (igt_list_empty(&igt_devs.filtered))
+		return false;
+
+	/* We take first one if more than one card matches filter */
+	dev = igt_list_first_entry(&igt_devs.filtered, dev, link);
+
+	if (dev->subsystem != NULL)
+		strncpy(card->subsystem, dev->subsystem,
+			     sizeof(card->subsystem) - 1);
+
+	if (dev->drm_card != NULL)
+		strncpy(card->card, dev->drm_card,
+			     sizeof(card->card) - 1);
+
+	if (dev->drm_render != NULL)
+		strncpy(card->render, dev->drm_render,
+			     sizeof(card->render) - 1);
+
+	return true;
+}
+
+/**
+ * igt_open_card:
+ * @card: pointer to igt_device_card structure
+ *
+ * Open /dev/dri/cardX device represented by igt_device_card structure.
+ * Requires filled @card argument (see igt_device_card_match() function).
+ *
+ * An open DRM fd or -1 on error
+ */
+int igt_open_card(struct igt_device_card *card)
+{
+	if (!card || !strlen(card->card))
+		return -1;
+
+	return open(card->card, O_RDWR);
+}
+
+/**
+ * igt_open_render:
+ * @card: pointer to igt_device_card structure
+ *
+ * Open /dev/dri/renderDX device represented by igt_device_card structure.
+ * Requires filled @card argument (see igt_device_card_match() function).
+ *
+ * An open DRM fd or -1 on error
+ */
+int igt_open_render(struct igt_device_card *card)
+{
+	if (!card || !strlen(card->render))
+		return -1;
+
+	return open(card->render, O_RDWR);
+}
diff --git a/lib/igt_device_scan.h b/lib/igt_device_scan.h
new file mode 100644
index 00000000..44c99dec
--- /dev/null
+++ b/lib/igt_device_scan.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright © 2019 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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.
+ *
+ */
+
+#ifndef __IGT_DEVICE_SCAN_H__
+#define __IGT_DEVICE_SCAN_H__
+
+#include <limits.h>
+#include <igt.h>
+
+enum igt_devices_print_type {
+	IGT_PRINT_SIMPLE,
+	IGT_PRINT_DETAIL,
+};
+
+struct igt_device_card {
+	char subsystem[NAME_MAX];
+	char card[NAME_MAX];
+	char render[NAME_MAX];
+};
+
+void igt_devices_scan(bool force);
+
+void igt_devices_print(enum igt_devices_print_type printtype);
+void igt_devices_print_vendors(void);
+void igt_device_print_filter_types(void);
+
+/*
+ * Handle device filter collection array.
+ * 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);
+
+/* Use filter to match the device and fill card structure */
+bool igt_device_card_match(const char *filter, struct igt_device_card *card);
+
+int igt_open_card(struct igt_device_card *card);
+int igt_open_render(struct igt_device_card *card);
+
+#endif /* __IGT_DEVICE_SCAN_H__ */
diff --git a/lib/meson.build b/lib/meson.build
index 3f908912..62d61654 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -10,6 +10,7 @@ lib_sources = [
 	'igt_color_encoding.c',
 	'igt_debugfs.c',
 	'igt_device.c',
+	'igt_device_scan.c',
 	'igt_aux.c',
 	'igt_gt.c',
 	'igt_halffloat.c',
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t 2/3] Introduce device selection lsgpu tool
  2019-12-02 12:25 [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API Arkadiusz Hiler
@ 2019-12-02 12:25 ` Arkadiusz Hiler
  2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 3/3] Add device selection in IGT Arkadiusz Hiler
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2019-12-02 12:25 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

Tool uses device selection API to scan and display GPU devices.
It can be used to check filter correctness as well as order
of applying the filters (.igtrc, IGT_DEVICE and --device argument).

v2 (Arek):
 * don't print chip as it's no longer there
 * make it a second patch, before any alterations to igt_core or drmtest
 * use only a single filter

v3 (Arek):
 * use igt_load_igtrc() (Petri)
 * add usage example (Chris)
 * general logic cleanup

LONG EXAMPLE:

$ ./build/tools/lsgpu --help
  usage: lsgpu [options]

  Options:
    -p, --print-details         Print devices with details
    -v, --list-vendors          List recognized vendors
    -l, --list-filter-types     List registered device filters types
    -d, --device filter         Device filter, can be given multiple times
    -h, --help                  Show this help message and exit

$ ./build/tools/lsgpu
  sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
      subsystem       : drm
      drm card        : /dev/dri/card0
      parent          : sys:/sys/devices/pci0000:00/0000:00:02.0

  sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
      subsystem       : drm
      drm render      : /dev/dri/renderD128
      parent          : sys:/sys/devices/pci0000:00/0000:00:02.0

  sys:/sys/devices/platform/vgem/drm/card1
      subsystem       : drm
      drm card        : /dev/dri/card1
      parent          : sys:/sys/devices/platform/vgem

  sys:/sys/devices/platform/vgem/drm/renderD129
      subsystem       : drm
      drm render      : /dev/dri/renderD129
      parent          : sys:/sys/devices/platform/vgem

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

  sys:/sys/devices/platform/vgem
      subsystem       : platform
      drm card        : /dev/dri/card1
      drm render      : /dev/dri/renderD129

$ ./build/tools/lsgpu -l
  Filter types:
  ---
  filter        syntax
  ---
  sys           sys:/sys/devices/pci0000:00/0000:00:02.0
                find device by its sysfs path

  drm           drm:/dev/dri/* path
                find drm device by /dev/dri/* node

  pci           pci:[vendor=%04x/name][,device=%04x][,card=%d]
                vendor is hex number or vendor name

$ ./build/tools/lsgpu -d pci:vendor=Intel
  Notice: Using --device filters
  === Device filter ===
  pci:vendor=Intel

  === Testing device open ===
  Device detail:
  subsystem   : pci
  drm card    : /dev/dri/card0
  drm render  : /dev/dri/renderD128
  Device /dev/dri/card0 successfully opened
  Device /dev/dri/renderD128 successfully opened
  -------------------------------------------

  $ ./build/tools/lsgpu -d pci:vendor=intel
  Notice: Using --device filters
  === Device filter ===
  pci:vendor=intel

  === Testing device open ===
  Device detail:
  subsystem   : pci
  drm card    : /dev/dri/card0
  drm render  : /dev/dri/renderD128
  Device /dev/dri/card0 successfully opened
  Device /dev/dri/renderD128 successfully opened
  -------------------------------------------

$ ./build/tools/lsgpu -d pci:vendor=intel -p
  Notice: Using --device filters
  === Device filter ===
  pci:vendor=intel

  === Testing device open ===
  Device detail:
  subsystem   : pci
  drm card    : /dev/dri/card0
  drm render  : /dev/dri/renderD128
  Device /dev/dri/card0 successfully opened
  Device /dev/dri/renderD128 successfully opened

  ========== pci:/sys/devices/pci0000:00/0000:00:02.0 ==========
  card device                     : /dev/dri/card0
  render device                   : /dev/dri/renderD128

  [properties]
  DEVPATH                         : /devices/pci0000:00/0000:00:02.0
  DRIVER                          : i915
  FWUPD_GUID                      : 0x8086:0x5927
  ID_MODEL_FROM_DATABASE          : Iris Plus Graphics 650
  ID_PCI_CLASS_FROM_DATABASE      : Display controller
  ID_PCI_INTERFACE_FROM_DATABASE  : VGA controller
  ID_PCI_SUBCLASS_FROM_DATABASE   : VGA compatible controller
  ID_VENDOR_FROM_DATABASE         : Intel Corporation
  MODALIAS                        : pci:v00008086d00005927sv00008086sd00002068bc03sc00i00
  PCI_CLASS                       : 30000
  PCI_ID                          : 8086:5927
  PCI_SLOT_NAME                   : 0000:00:02.0
  PCI_SUBSYS_ID                   : 8086:2068
  SUBSYSTEM                       : pci
  USEC_INITIALIZED                : 22881171

  [attributes]
  ari_enabled                     : 0
  boot_vga                        : 1
  broken_parity_status            : 0
  class                           : 0x030000
  consistent_dma_mask_bits        : 39
  current_link_speed              : Unknown speed
  current_link_width              : 0
  d3cold_allowed                  : 1
  device                          : 0x5927
  dma_mask_bits                   : 39
  driver_override                 : (null)
  enable                          : 1
  firmware_node                   : LNXVIDEO:00
  index                           : 1
  irq                             : 129
  label                           :  CPU
  local_cpulist                   : 0-3
  local_cpus                      : f
  max_link_speed                  : Unknown speed
  max_link_width                  : 255
  msi_bus                         : 1
  numa_node                       : -1
  revision                        : 0x06
  subsystem                       : pci
  subsystem_device                : 0x2068
  subsystem_vendor                : 0x8086
  vendor                          : 0x8086

  -------------------------------------------

Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
---
 tools/Makefile.sources |   1 +
 tools/lsgpu.c          | 250 +++++++++++++++++++++++++++++++++++++++++
 tools/meson.build      |   1 +
 3 files changed, 252 insertions(+)
 create mode 100644 tools/lsgpu.c

diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index d764895d..b7a43d47 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -33,6 +33,7 @@ tools_prog_lists =		\
 	intel_watermark		\
 	intel_gem_info		\
 	intel_gvtg_test     \
+	lsgpu			\
 	$(NULL)
 
 dist_bin_SCRIPTS = intel_gpu_abrt
diff --git a/tools/lsgpu.c b/tools/lsgpu.c
new file mode 100644
index 00000000..2541d1c2
--- /dev/null
+++ b/tools/lsgpu.c
@@ -0,0 +1,250 @@
+/*
+ * Copyright © 2019 Intel Corporation
+ *
+ * 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 (including the next
+ * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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_device_scan.h"
+#include "igt.h"
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <signal.h>
+#include <glib.h>
+
+/**
+ * SECTION:lsgpu
+ * @short_description: lsgpu
+ * @title: lsgpu
+ * @include: lsgpu.c
+ *
+ * # lsgpu
+ *
+ * The devices can be scanned and displayed using 'lsgpu' tool. Tool also
+ * displays properties and sysattrs (-p switch, means print detail) which
+ * can be used during filter implementation.
+ *
+ * Tool can also be used to try out filters.
+ * To select device use '-d' or '--device' argument like:
+ *
+ * |[<!-- language="plain" -->
+ * ./lsgpu -d 'pci:vendor=Intel'
+ * === Device filter list ===
+ * [ 0]: pci:vendor=Intel
+
+ * === Testing device open ===
+ * subsystem   : pci
+ * drm card    : /dev/dri/card0
+ * drm render  : /dev/dri/renderD128
+ * Device /dev/dri/card0 successfully opened
+ * Device /dev/dri/renderD128 successfully opened
+ * ]|
+ *
+ * NOTE: When using filters only the first matching device is printed.
+ *
+ * Additionally lsgpu tries to open the card and render nodes to verify
+ * permissions. It also uses IGT variable search order:
+ * - use --device first (it overrides IGT_DEVICE and .igtrc Common::Device
+ *   settings)
+ * - use IGT_DEVICE enviroment variable if no --device are passed
+ * - use .igtrc Common::Device if no --device nor IGT_DEVICE are passed
+ */
+
+enum {
+	OPT_PRINT_DETAIL   = 'p',
+	OPT_LIST_VENDORS   = 'v',
+	OPT_LIST_FILTERS   = 'l',
+	OPT_DEVICE         = 'd',
+	OPT_HELP           = 'h'
+};
+
+static bool g_show_vendors;
+static bool g_list_filters;
+static bool g_help;
+static char *igt_device;
+
+static const char *usage_str =
+	"usage: lsgpu [options]\n\n"
+	"Options:\n"
+	"  -p, --print-details         Print devices with details\n"
+	"  -v, --list-vendors          List recognized vendors\n"
+	"  -l, --list-filter-types     List registered device filters types\n"
+	"  -d, --device filter         Device filter, can be given multiple times\n"
+	"  -h, --help                  Show this help message and exit\n";
+
+static void test_device_open(struct igt_device_card *card)
+{
+	int fd;
+
+	if (!card)
+		return;
+
+	fd = igt_open_card(card);
+	if (fd >= 0) {
+		printf("Device %s successfully opened\n", card->card);
+		close(fd);
+	} else {
+		if (strlen(card->card))
+			printf("Cannot open card %s device\n", card->card);
+		else
+			printf("Cannot open card device, empty name\n");
+	}
+
+	fd = igt_open_render(card);
+	if (fd >= 0) {
+		printf("Device %s successfully opened\n", card->render);
+		close(fd);
+	} else {
+		if (strlen(card->render))
+			printf("Cannot open render %s device\n", card->render);
+		else
+			printf("Cannot open render device, empty name\n");
+	}
+}
+
+static void print_card(struct igt_device_card *card)
+{
+	if (!card)
+		return;
+
+	printf("subsystem   : %s\n", card->subsystem);
+	printf("drm card    : %s\n", card->card);
+	printf("drm render  : %s\n", card->render);
+}
+
+static char *get_device_from_rc(void)
+{
+	char *rc_device = NULL;
+	GError *error = NULL;
+	GKeyFile *key_file = igt_load_igtrc();
+
+	if (key_file == NULL)
+		return NULL;
+
+	rc_device = g_key_file_get_string(key_file, "Common",
+					  "Device", &error);
+
+	g_clear_error(&error);
+
+	return rc_device;
+}
+
+int main(int argc, char *argv[])
+{
+	static struct option long_options[] = {
+		{"print-detail",      no_argument,       NULL, OPT_PRINT_DETAIL},
+		{"list-vendors",      no_argument,       NULL, OPT_LIST_VENDORS},
+		{"list-filter-types", no_argument,       NULL, OPT_LIST_FILTERS},
+		{"device",            required_argument, NULL, OPT_DEVICE},
+		{"help",              no_argument,       NULL, OPT_HELP},
+		{0, 0, 0, 0}
+	};
+	int c, index = 0;
+	char *env_device = NULL, *opt_device = NULL, *rc_device = NULL;
+	enum igt_devices_print_type printtype = IGT_PRINT_SIMPLE;
+
+	while ((c = getopt_long(argc, argv, "pvld:h",
+				long_options, &index)) != -1) {
+		switch(c) {
+
+		case OPT_PRINT_DETAIL:
+			printtype = IGT_PRINT_DETAIL;
+			break;
+		case OPT_LIST_VENDORS:
+			g_show_vendors = true;
+			break;
+		case OPT_LIST_FILTERS:
+			g_list_filters = true;
+			break;
+		case OPT_DEVICE:
+			opt_device = strdup(optarg);
+			break;
+		case OPT_HELP:
+			g_help = true;
+			break;
+		}
+	}
+
+	if (g_help) {
+		printf("%s\n", usage_str);
+		exit(0);
+	}
+
+	if (g_show_vendors) {
+		igt_devices_print_vendors();
+		return 0;
+	}
+
+	if (g_list_filters) {
+		igt_device_print_filter_types();
+		return 0;
+	}
+
+	env_device = getenv("IGT_DEVICE");
+	rc_device = get_device_from_rc();
+
+	if (opt_device != NULL) {
+		igt_device = opt_device;
+		printf("Notice: Using filter supplied via --device\n");
+	}
+	else if (env_device != NULL) {
+		igt_device = env_device;
+		printf("Notice: Using filter from IGT_DEVICE env variable\n");
+	}
+	else if (rc_device != NULL) {
+		igt_device = rc_device;
+		printf("Notice: Using filter from .igtrc\n");
+	}
+
+	igt_devices_scan(false);
+
+	if (igt_device != NULL) {
+		struct igt_device_card card;
+
+		printf("=== Device filter ===\n");
+		printf("%s\n\n", igt_device);
+
+		printf("=== Testing device open ===\n");
+
+		if (!igt_device_card_match(igt_device, &card)) {
+			printf("No device found for the filter\n\n");
+			return -1;
+		}
+
+		printf("Device detail:\n");
+		print_card(&card);
+		test_device_open(&card);
+		if (printtype == IGT_PRINT_DETAIL) {
+			printf("\n");
+			igt_devices_print(printtype);
+		}
+		printf("-------------------------------------------\n");
+
+	} else {
+		igt_devices_print(printtype);
+	}
+
+	free(rc_device);
+	free(opt_device);
+
+	return 0;
+}
diff --git a/tools/meson.build b/tools/meson.build
index eecb122b..74822a33 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -36,6 +36,7 @@ tools_progs = [
 	'intel_gem_info',
 	'intel_gvtg_test',
 	'dpcd_reg',
+	'lsgpu',
 ]
 tool_deps = igt_deps
 
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] [PATCH i-g-t 3/3] Add device selection in IGT
  2019-12-02 12:25 [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API Arkadiusz Hiler
  2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 2/3] Introduce device selection lsgpu tool Arkadiusz Hiler
@ 2019-12-02 12:25 ` Arkadiusz Hiler
  2019-12-02 13:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] Introduce device selection API Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2019-12-02 12:25 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

From: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>

New IGT command line argument --device, IGT_DEVICE enviroment and .igtrc
Common::Device were added to allow selecting device using device
selection API. See generated docs for device selection and lsgpu for
more details on filters.

NOTE: IGT_FORCE_DRIVER still works if no filter is selected. We may want
      to deprecate it later.

NOTE2: This does not work with tests that open 2 or more devices (e.g.
       kms_prime). The core is capable of doing multiple filtering
       passes but we need to figure out how we want *open*() functions
       to expose this capability.

v2 (Arek):
 * remove functions acting on igt_device_card
 * use only a single filter
v3 (Arek):
 * typos, misspellings (Petri)
 * add notes on IGT_FORCE_DRIVER and opening 2 or more devices

Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
---
 .../igt-gpu-tools/igt_test_programs.xml       |  7 ++
 lib/drmtest.c                                 | 94 +++++++++++++++++--
 lib/drmtest.h                                 |  2 +
 lib/igt_core.c                                | 47 ++++++++++
 4 files changed, 142 insertions(+), 8 deletions(-)

diff --git a/docs/reference/igt-gpu-tools/igt_test_programs.xml b/docs/reference/igt-gpu-tools/igt_test_programs.xml
index 3c1e18ee..92bc33ba 100644
--- a/docs/reference/igt-gpu-tools/igt_test_programs.xml
+++ b/docs/reference/igt-gpu-tools/igt_test_programs.xml
@@ -43,6 +43,13 @@
             </para></listitem>
           </varlistentry>
 
+          <varlistentry>
+            <term><option>--device filter</option></term>
+            <listitem><para>
+                select device using filter (see "Device selection" for details)
+            </para></listitem>
+          </varlistentry>
+
           <varlistentry>
             <term><option>--help-description</option></term>
             <listitem><para>
diff --git a/lib/drmtest.c b/lib/drmtest.c
index c379a7b7..1fc39925 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -55,6 +55,7 @@
 #include "igt_gt.h"
 #include "igt_kmod.h"
 #include "igt_sysfs.h"
+#include "igt_device_scan.h"
 #include "version.h"
 #include "config.h"
 #include "intel_reg.h"
@@ -266,14 +267,9 @@ static int __search_and_open(const char *base, int offset, unsigned int chipset)
 	return -1;
 }
 
-static int __open_driver(const char *base, int offset, unsigned int chipset)
+static void __try_modprobe(unsigned int chipset)
 {
 	static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
-	int fd;
-
-	fd = __search_and_open(base, offset, chipset);
-	if (fd != -1)
-		return fd;
 
 	pthread_mutex_lock(&mutex);
 	for (const struct module *m = modules; m->module; m++) {
@@ -285,26 +281,108 @@ static int __open_driver(const char *base, int offset, unsigned int chipset)
 		}
 	}
 	pthread_mutex_unlock(&mutex);
+}
+
+static int __open_driver(const char *base, int offset, unsigned int chipset)
+{
+	int fd;
+
+	fd = __search_and_open(base, offset, chipset);
+	if (fd != -1)
+		return fd;
+
+	__try_modprobe(chipset);
 
 	return __search_and_open(base, offset, chipset);
 }
 
+static int __open_driver_exact(const char *name, unsigned int chipset)
+{
+	int fd;
+
+	fd = open_device(name, chipset);
+	if (fd != -1)
+		return fd;
+
+	__try_modprobe(chipset);
+
+	return open_device(name, chipset);
+}
+
+/*
+ * A helper to get the first matching card in case a filter is set.
+ * It does all the extra logging around the filters for us.
+ *
+ * @card: pointer to the igt_device_card structure to be filled
+ * when a card is found.
+ *
+ * Returns:
+ * True if card according to the added filter was found,
+ * false othwerwise.
+ */
+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();
+		igt_info("Looking for devices to open using filter: %s\n", filter);
+
+		if (igt_device_card_match(filter, card)) {
+			igt_info("Filter matched %s | %s\n", card->card, card->render);
+			return true;
+		}
+
+		igt_warn("No card matches the filter!\n");
+	}
+
+	return false;
+}
+
 /**
  * __drm_open_driver:
  * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
  *
- * Open the first DRM device we can find, searching up to 16 device nodes
+ * Function opens device in the following order:
+ * 1. when --device arguments are present device scanning will be executed,
+ * then filter argument is used to find matching one.
+ * 2. compatibility mode - open the first DRM device we can find,
+ * searching up to 16 device nodes.
  *
  * Returns:
  * An open DRM fd or -1 on error
  */
 int __drm_open_driver(int chipset)
 {
+	if (igt_device_is_filter_set()) {
+		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);
 }
 
-static int __drm_open_driver_render(int chipset)
+int __drm_open_driver_render(int chipset)
 {
+	if (igt_device_is_filter_set()) {
+		bool found;
+		struct igt_device_card card;
+
+		found = __get_the_first_card(&card);
+
+		if (!found || !strlen(card.render))
+			return -1;
+
+		return __open_driver_exact(card.render, chipset);
+	}
+
 	return __open_driver("/dev/dri/renderD", 128, chipset);
 }
 
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 05eb0860..632c616b 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -50,6 +50,7 @@
 #define DRIVER_AMDGPU	(1 << 3)
 #define DRIVER_V3D	(1 << 4)
 #define DRIVER_PANFROST	(1 << 5)
+
 /*
  * Exclude DRVER_VGEM from DRIVER_ANY since if you run on a system
  * with vgem as well as a supported driver, you can end up with a
@@ -90,6 +91,7 @@ int drm_open_driver(int chipset);
 int drm_open_driver_master(int chipset);
 int drm_open_driver_render(int chipset);
 int __drm_open_driver(int chipset);
+int __drm_open_driver_render(int chipset);
 
 void gem_quiescent_gpu(int fd);
 
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 99aa0bee..c705be1e 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -71,6 +71,7 @@
 #include "igt_sysrq.h"
 #include "igt_rc.h"
 #include "igt_list.h"
+#include "igt_device_scan.h"
 
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
@@ -247,6 +248,9 @@
  *	[Common]
  *	FrameDumpPath=/tmp # The path to dump frames that fail comparison checks
  *
+ *	&num; Device selection filter
+ *	Device=pci:vendor=8086,card=0;vgem:
+ *
  *	&num; The following section is used for configuring the Device Under Test.
  *	&num; It is not mandatory and allows overriding default values.
  *	[DUT]
@@ -312,6 +316,7 @@ enum {
 	OPT_INTERACTIVE_DEBUG,
 	OPT_SKIP_CRC,
 	OPT_TRACE_OOPS,
+	OPT_DEVICE,
 	OPT_HELP = 'h'
 };
 
@@ -328,6 +333,7 @@ static pthread_mutex_t log_buffer_mutex = PTHREAD_MUTEX_INITIALIZER;
 GKeyFile *igt_key_file;
 
 char *igt_frame_dump_path;
+char *igt_rc_device;
 
 static bool stderr_needs_sentinel = false;
 
@@ -657,6 +663,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"
 		   "  --help|-h\n");
 	if (help_str)
 		fprintf(f, "%s\n", help_str);
@@ -746,6 +753,31 @@ static void common_init_config(void)
 
 	if (ret != 0)
 		igt_set_autoresume_delay(ret);
+
+	/* Adding filters, order .igtrc, IGT_DEVICE, --device filter */
+	if (igt_device_is_filter_set())
+		igt_debug("Notice: using --device filters:\n");
+	else {
+		if (igt_rc_device) {
+			igt_debug("Notice: using IGT_DEVICE env:\n");
+		} else {
+			igt_rc_device =	g_key_file_get_string(igt_key_file,
+							      "Common",
+							      "Device", &error);
+			g_clear_error(&error);
+			if (igt_rc_device)
+				igt_debug("Notice: using .igtrc "
+					  "Common::Device:\n");
+		}
+		if (igt_rc_device) {
+			igt_device_filter_set(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());
 }
 
 static void common_init_env(void)
@@ -780,6 +812,11 @@ static void common_init_env(void)
 	if (env) {
 		__set_forced_driver(env);
 	}
+
+	env = getenv("IGT_DEVICE");
+	if (env) {
+		igt_rc_device = strdup(env);
+	}
 }
 
 static int common_init(int *argc, char **argv,
@@ -800,6 +837,7 @@ static int common_init(int *argc, char **argv,
 		{"interactive-debug", optional_argument, NULL, OPT_INTERACTIVE_DEBUG},
 		{"skip-crc-compare",  no_argument,       NULL, OPT_SKIP_CRC},
 		{"trace-on-oops",     no_argument,       NULL, OPT_TRACE_OOPS},
+		{"device",            required_argument, NULL, OPT_DEVICE},
 		{"help",              no_argument,       NULL, OPT_HELP},
 		{0, 0, 0, 0}
 	};
@@ -930,6 +968,15 @@ static int common_init(int *argc, char **argv,
 		case OPT_TRACE_OOPS:
 			show_ftrace = true;
 			goto out;
+		case OPT_DEVICE:
+			assert(optarg);
+			/* if set by env IGT_DEVICE we need to free it */
+			if (igt_rc_device) {
+				free(igt_rc_device);
+				igt_rc_device = NULL;
+			}
+			igt_device_filter_set(optarg);
+			break;
 		case OPT_HELP:
 			print_usage(help_str, false);
 			ret = -1;
-- 
2.23.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] Introduce device selection API
  2019-12-02 12:25 [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API Arkadiusz Hiler
  2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 2/3] Introduce device selection lsgpu tool Arkadiusz Hiler
  2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 3/3] Add device selection in IGT Arkadiusz Hiler
@ 2019-12-02 13:45 ` Patchwork
  2019-12-03  9:05 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
  2019-12-03 13:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-12-02 13:45 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] Introduce device selection API
URL   : https://patchwork.freedesktop.org/series/70285/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7460 -> IGTPW_3793
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3793 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3793, 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_3793/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770r:       [PASS][1] -> [DMESG-FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-hsw-4770r/igt@i915_selftest@live_blt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-hsw-4770r/igt@i915_selftest@live_blt.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-bwr-2160:        [PASS][3] -> [INCOMPLETE][4] ([i915#695])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-bwr-2160/igt@i915_module_load@reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-bwr-2160/igt@i915_module_load@reload.html

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-6770hq:      [PASS][5] -> [FAIL][6] ([i915#178])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_sanitycheck:
    - fi-skl-lmem:        [PASS][7] -> [DMESG-WARN][8] ([i915#592])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-skl-lmem/igt@i915_selftest@live_sanitycheck.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-skl-lmem/igt@i915_selftest@live_sanitycheck.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-icl-u2:          [PASS][9] -> [DMESG-WARN][10] ([i915#109])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-icl-u2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-icl-u2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload-with-fault-injection:
    - {fi-kbl-7560u}:     [INCOMPLETE][11] ([i915#243] / [i915#609]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-kbl-7560u/igt@i915_module_load@reload-with-fault-injection.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-kbl-7560u/igt@i915_module_load@reload-with-fault-injection.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          [FAIL][13] ([i915#49]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  
#### Warnings ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-kbl-x1275:       [DMESG-WARN][15] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][16] ([i915#62] / [i915#92]) +4 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-kbl-x1275/igt@i915_pm_rpm@basic-pci-d3-state.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-kbl-x1275/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-kbl-x1275:       [DMESG-WARN][17] ([i915#62] / [i915#92]) -> [DMESG-WARN][18] ([i915#62] / [i915#92] / [i915#95]) +5 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

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

  [i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
  [i915#178]: https://gitlab.freedesktop.org/drm/intel/issues/178
  [i915#243]: https://gitlab.freedesktop.org/drm/intel/issues/243
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
  [i915#609]: https://gitlab.freedesktop.org/drm/intel/issues/609
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#695]: https://gitlab.freedesktop.org/drm/intel/issues/695
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (50 -> 46)
------------------------------

  Additional (1): fi-tgl-y 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5320 -> IGTPW_3793

  CI-20190529: 20190529
  CI_DRM_7460: 9cd639929b6ad1efb35e90ee862cf37a9b6f6348 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3793: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/index.html
  IGT_5320: 06833ffeaf7621c3fef097166539bbe999a33e9c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] Introduce device selection API
  2019-12-02 12:25 [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API Arkadiusz Hiler
                   ` (2 preceding siblings ...)
  2019-12-02 13:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] Introduce device selection API Patchwork
@ 2019-12-03  9:05 ` Patchwork
  2019-12-03 13:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-12-03  9:05 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] Introduce device selection API
URL   : https://patchwork.freedesktop.org/series/70285/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7460 -> IGTPW_3793
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@i915_module_load@reload:
    - fi-bwr-2160:        [PASS][1] -> [INCOMPLETE][2] ([i915#695])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-bwr-2160/igt@i915_module_load@reload.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-bwr-2160/igt@i915_module_load@reload.html

  * igt@i915_pm_rpm@module-reload:
    - fi-skl-6770hq:      [PASS][3] -> [FAIL][4] ([i915#178])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770r:       [PASS][5] -> [DMESG-FAIL][6] ([i915#683])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-hsw-4770r/igt@i915_selftest@live_blt.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-hsw-4770r/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_sanitycheck:
    - fi-skl-lmem:        [PASS][7] -> [DMESG-WARN][8] ([i915#592])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-skl-lmem/igt@i915_selftest@live_sanitycheck.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-skl-lmem/igt@i915_selftest@live_sanitycheck.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - fi-icl-u2:          [PASS][9] -> [DMESG-WARN][10] ([i915#109])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-icl-u2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-icl-u2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload-with-fault-injection:
    - {fi-kbl-7560u}:     [INCOMPLETE][11] ([i915#243] / [i915#609]) -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-kbl-7560u/igt@i915_module_load@reload-with-fault-injection.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-kbl-7560u/igt@i915_module_load@reload-with-fault-injection.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          [FAIL][13] ([i915#49]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  
#### Warnings ####

  * igt@i915_pm_rpm@basic-pci-d3-state:
    - fi-kbl-x1275:       [DMESG-WARN][15] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][16] ([i915#62] / [i915#92]) +4 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-kbl-x1275/igt@i915_pm_rpm@basic-pci-d3-state.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-kbl-x1275/igt@i915_pm_rpm@basic-pci-d3-state.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-kbl-x1275:       [DMESG-WARN][17] ([i915#62] / [i915#92]) -> [DMESG-WARN][18] ([i915#62] / [i915#92] / [i915#95]) +5 similar issues
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/fi-kbl-x1275/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

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

  [i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
  [i915#178]: https://gitlab.freedesktop.org/drm/intel/issues/178
  [i915#243]: https://gitlab.freedesktop.org/drm/intel/issues/243
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#592]: https://gitlab.freedesktop.org/drm/intel/issues/592
  [i915#609]: https://gitlab.freedesktop.org/drm/intel/issues/609
  [i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
  [i915#683]: https://gitlab.freedesktop.org/drm/intel/issues/683
  [i915#695]: https://gitlab.freedesktop.org/drm/intel/issues/695
  [i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
  [i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95


Participating hosts (50 -> 46)
------------------------------

  Additional (1): fi-tgl-y 
  Missing    (5): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5320 -> IGTPW_3793

  CI-20190529: 20190529
  CI_DRM_7460: 9cd639929b6ad1efb35e90ee862cf37a9b6f6348 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3793: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/index.html
  IGT_5320: 06833ffeaf7621c3fef097166539bbe999a33e9c @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

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

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

* [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/3] Introduce device selection API
  2019-12-02 12:25 [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API Arkadiusz Hiler
                   ` (3 preceding siblings ...)
  2019-12-03  9:05 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
@ 2019-12-03 13:39 ` Patchwork
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-12-03 13:39 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev

== Series Details ==

Series: series starting with [i-g-t,1/3] Introduce device selection API
URL   : https://patchwork.freedesktop.org/series/70285/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7460_full -> IGTPW_3793_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3793_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3793_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_3793/index.html

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_big_fb@x-tiled-8bpp-rotate-0:
    - shard-tglb:         NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb9/igt@kms_big_fb@x-tiled-8bpp-rotate-0.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_eio@hibernate:
    - shard-tglb:         [PASS][2] -> [INCOMPLETE][3] ([i915#456])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb7/igt@gem_eio@hibernate.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb7/igt@gem_eio@hibernate.html

  * igt@gem_eio@unwedge-stress:
    - shard-snb:          [PASS][4] -> [FAIL][5] ([i915#232]) +1 similar issue
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-snb6/igt@gem_eio@unwedge-stress.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-snb6/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_gttfill@basic:
    - shard-tglb:         [PASS][6] -> [INCOMPLETE][7] ([fdo#111593])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb3/igt@gem_exec_gttfill@basic.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb6/igt@gem_exec_gttfill@basic.html

  * igt@gem_exec_parallel@vcs0-contexts:
    - shard-hsw:          [PASS][8] -> [FAIL][9] ([i915#676])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-hsw5/igt@gem_exec_parallel@vcs0-contexts.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-hsw4/igt@gem_exec_parallel@vcs0-contexts.html

  * igt@gem_exec_schedule@preempt-bsd2:
    - shard-iclb:         [PASS][10] -> [SKIP][11] ([fdo#109276])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb4/igt@gem_exec_schedule@preempt-bsd2.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb6/igt@gem_exec_schedule@preempt-bsd2.html

  * igt@gem_exec_suspend@basic-s3:
    - shard-tglb:         [PASS][12] -> [INCOMPLETE][13] ([fdo#111736] / [i915#460])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb2/igt@gem_exec_suspend@basic-s3.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb5/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_persistent_relocs@forked-thrashing:
    - shard-hsw:          [PASS][14] -> [INCOMPLETE][15] ([i915#530] / [i915#61])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-hsw1/igt@gem_persistent_relocs@forked-thrashing.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-hsw2/igt@gem_persistent_relocs@forked-thrashing.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-glk:          [PASS][16] -> [FAIL][17] ([i915#644])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-glk6/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-glk5/igt@gem_ppgtt@flink-and-close-vma-leak.html
    - shard-kbl:          [PASS][18] -> [FAIL][19] ([i915#644])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl2/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl4/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@gem_softpin@noreloc-s3:
    - shard-apl:          [PASS][20] -> [DMESG-WARN][21] ([i915#180]) +3 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-apl4/igt@gem_softpin@noreloc-s3.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-apl4/igt@gem_softpin@noreloc-s3.html

  * igt@gem_userptr_blits@map-fixed-invalidate-busy:
    - shard-snb:          [PASS][22] -> [DMESG-WARN][23] ([fdo#111870]) +1 similar issue
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-snb6/igt@gem_userptr_blits@map-fixed-invalidate-busy.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-snb1/igt@gem_userptr_blits@map-fixed-invalidate-busy.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen:
    - shard-hsw:          [PASS][24] -> [DMESG-WARN][25] ([IGT#6])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-hsw2/igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-hsw6/igt@kms_cursor_crc@pipe-a-cursor-128x128-offscreen.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x85-random:
    - shard-kbl:          [PASS][26] -> [INCOMPLETE][27] ([fdo#103665])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-256x85-random.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-256x85-random.html

  * igt@kms_draw_crc@draw-method-xrgb2101010-blt-xtiled:
    - shard-iclb:         [PASS][28] -> [INCOMPLETE][29] ([i915#140])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb5/igt@kms_draw_crc@draw-method-xrgb2101010-blt-xtiled.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb1/igt@kms_draw_crc@draw-method-xrgb2101010-blt-xtiled.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-glk:          [PASS][30] -> [FAIL][31] ([i915#79])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-glk2/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-glk3/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt:
    - shard-iclb:         [PASS][32] -> [FAIL][33] ([i915#49])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][34] -> [DMESG-WARN][35] ([i915#180]) +3 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl3/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-tglb:         [PASS][36] -> [INCOMPLETE][37] ([i915#474])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-wc.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb9/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt:
    - shard-tglb:         [PASS][38] -> [FAIL][39] ([i915#49])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-blt.html

  * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
    - shard-tglb:         [PASS][40] -> [INCOMPLETE][41] ([i915#456] / [i915#460]) +1 similar issue
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb6/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes.html

  * igt@kms_psr@psr2_cursor_blt:
    - shard-iclb:         [PASS][42] -> [SKIP][43] ([fdo#109441]) +1 similar issue
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb2/igt@kms_psr@psr2_cursor_blt.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb3/igt@kms_psr@psr2_cursor_blt.html

  * igt@kms_setmode@basic:
    - shard-apl:          [PASS][44] -> [FAIL][45] ([i915#31])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-apl1/igt@kms_setmode@basic.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-apl3/igt@kms_setmode@basic.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@vcs1-none:
    - shard-iclb:         [SKIP][46] ([fdo#109276] / [fdo#112080]) -> [PASS][47] +1 similar issue
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb5/igt@gem_ctx_isolation@vcs1-none.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb1/igt@gem_ctx_isolation@vcs1-none.html

  * igt@gem_exec_schedule@preempt-queue-chain-vebox:
    - shard-glk:          [INCOMPLETE][48] ([i915#58] / [k.org#198133]) -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-glk7/igt@gem_exec_schedule@preempt-queue-chain-vebox.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-glk6/igt@gem_exec_schedule@preempt-queue-chain-vebox.html

  * igt@gem_exec_schedule@reorder-wide-bsd:
    - shard-iclb:         [SKIP][50] ([fdo#112146]) -> [PASS][51] +1 similar issue
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb4/igt@gem_exec_schedule@reorder-wide-bsd.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb3/igt@gem_exec_schedule@reorder-wide-bsd.html

  * igt@gem_exec_suspend@basic-s3:
    - shard-kbl:          [DMESG-WARN][52] ([i915#180]) -> [PASS][53] +6 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl7/igt@gem_exec_suspend@basic-s3.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl3/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_ppgtt@flink-and-close-vma-leak:
    - shard-apl:          [FAIL][54] ([i915#644]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-apl6/igt@gem_ppgtt@flink-and-close-vma-leak.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-apl3/igt@gem_ppgtt@flink-and-close-vma-leak.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-snb:          [DMESG-WARN][56] ([fdo#111870]) -> [PASS][57] +1 similar issue
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-snb1/igt@gem_userptr_blits@dmabuf-sync.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-snb1/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@i915_selftest@live_blt:
    - shard-hsw:          [DMESG-FAIL][58] ([i915#683]) -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-hsw7/igt@i915_selftest@live_blt.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-hsw2/igt@i915_selftest@live_blt.html

  * igt@kms_big_fb@y-tiled-8bpp-rotate-0:
    - shard-kbl:          [INCOMPLETE][60] ([fdo#103665]) -> [PASS][61] +2 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl4/igt@kms_big_fb@y-tiled-8bpp-rotate-0.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl1/igt@kms_big_fb@y-tiled-8bpp-rotate-0.html

  * igt@kms_color@pipe-a-ctm-green-to-red:
    - shard-kbl:          [FAIL][62] ([i915#129]) -> [PASS][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl2/igt@kms_color@pipe-a-ctm-green-to-red.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl1/igt@kms_color@pipe-a-ctm-green-to-red.html
    - shard-apl:          [FAIL][64] ([i915#129]) -> [PASS][65]
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-apl2/igt@kms_color@pipe-a-ctm-green-to-red.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-apl2/igt@kms_color@pipe-a-ctm-green-to-red.html

  * igt@kms_flip@flip-vs-suspend:
    - shard-tglb:         [INCOMPLETE][66] ([i915#460] / [i915#516]) -> [PASS][67]
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb4/igt@kms_flip@flip-vs-suspend.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb9/igt@kms_flip@flip-vs-suspend.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-kbl:          [DMESG-WARN][68] ([i915#180] / [i915#391]) -> [PASS][69]
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-kbl7/igt@kms_flip@flip-vs-suspend-interruptible.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-kbl6/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render:
    - shard-iclb:         [FAIL][70] ([i915#49]) -> [PASS][71]
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-indfb-scaledprimary:
    - shard-tglb:         [FAIL][72] ([i915#49]) -> [PASS][73] +1 similar issue
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb2/igt@kms_frontbuffer_tracking@fbcpsr-indfb-scaledprimary.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-indfb-scaledprimary.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-tglb:         [INCOMPLETE][74] ([fdo#112393] / [i915#435]) -> [PASS][75]
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-wc.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite:
    - shard-tglb:         [INCOMPLETE][76] ([fdo#112393]) -> [PASS][77]
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb4/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html

  * igt@kms_vblank@pipe-b-ts-continuation-suspend:
    - shard-apl:          [DMESG-WARN][78] ([i915#180]) -> [PASS][79] +1 similar issue
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-apl4/igt@kms_vblank@pipe-b-ts-continuation-suspend.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-apl6/igt@kms_vblank@pipe-b-ts-continuation-suspend.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-tglb:         [INCOMPLETE][80] ([i915#456] / [i915#460]) -> [PASS][81] +3 similar issues
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  * {igt@perf_pmu@frequency-idle}:
    - shard-hsw:          [FAIL][82] ([i915#675]) -> [PASS][83]
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-hsw4/igt@perf_pmu@frequency-idle.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-hsw2/igt@perf_pmu@frequency-idle.html

  
#### Warnings ####

  * igt@kms_atomic_transition@6x-modeset-transitions-nonblocking:
    - shard-tglb:         [SKIP][84] ([fdo#112021]) -> [SKIP][85] ([fdo#112016] / [fdo#112021])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb9/igt@kms_atomic_transition@6x-modeset-transitions-nonblocking.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb5/igt@kms_atomic_transition@6x-modeset-transitions-nonblocking.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-tglb:         [INCOMPLETE][86] ([i915#456] / [i915#460] / [i915#474]) -> [FAIL][87] ([i915#49])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7460/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/shard-tglb4/igt@kms_frontbuffer_tracking@fbc-suspend.html

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

  [IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593
  [fdo#111736]: https://bugs.freedesktop.org/show_bug.cgi?id=111736
  [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
  [fdo#112016]: https://bugs.freedesktop.org/show_bug.cgi?id=112016
  [fdo#112021]: https://bugs.freedesktop.org/show_bug.cgi?id=112021
  [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
  [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
  [fdo#112393]: https://bugs.freedesktop.org/show_bug.cgi?id=112393
  [i915#129]: https://gitlab.freedesktop.org/drm/intel/issues/129
  [i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#232]: https://gitlab.freedesktop.org/drm/intel/issues/232
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#391]: https://gitlab.freedesktop.org/drm/intel/issues/391
  [i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
  [i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
  [i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460
  [i915#474]: https://gitlab.freedesktop.org/drm/intel/issues/474
  [i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
  [i915#516]: https://gitlab.freedesktop.org/drm/intel/issues/516
  [i915#530]: https://gitlab.freedesktop.org/drm/intel/issues/530
  [i915#58]: https://gitlab.freedesktop.org/drm/intel/issues/58
  [i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
  [i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
  [i915#675]: https://gitlab.freedesktop.org/drm/intel/issues/675
  [i915#676]: https://gitlab.freedesktop.org/drm/intel/issues/676
  [i915#683]: https://gitlab.freedesktop.org/drm/intel/issues/683
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (11 -> 8)
------------------------------

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5320 -> IGTPW_3793
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_7460: 9cd639929b6ad1efb35e90ee862cf37a9b6f6348 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3793: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3793/index.html
  IGT_5320: 06833ffeaf7621c3fef097166539bbe999a33e9c @ 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_3793/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-12-03 13:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-02 12:25 [igt-dev] [PATCH i-g-t 1/3] Introduce device selection API Arkadiusz Hiler
2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 2/3] Introduce device selection lsgpu tool Arkadiusz Hiler
2019-12-02 12:25 ` [igt-dev] [PATCH i-g-t 3/3] Add device selection in IGT Arkadiusz Hiler
2019-12-02 13:45 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/3] Introduce device selection API Patchwork
2019-12-03  9:05 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-12-03 13:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox