Skip to contentSkip to conversation

Vendor agnostic gputop

PATCH Superseded Tvrtko Ursulin 5 participants 20 messages Jan 31, 2023 – May 15, 2023

Subsystems (2)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 cover Vendor agnostic gputop

From: Tvrtko Ursulin <[email protected]>

This is a pile of patches which implements a rudimentary vendor agnostic gputop tool based of the new DRM spec as documented in Documentation/gpu/drm-usage-stats.rst.

First part of the series is code refactoring which should be reasonably stable. I've tested it all while working on it both against intel_gpu_top and gputop.

Last patch is the actual tool itself. It works but it is rather rudimentary which is hopefully good enough for a start.

Fundamental difference between intel_gpu_top and gputop is that the former is centered around a single card and only shows processes belonging to it. Gputop on the other hand has an idea to show all processes with DRM file descriptors open and sort them into groups per card. It also makes no effort to provide sorting modes, well any interactivity, or any pretty names for GPUs or engines.

It looks like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DRM minor 0

    PID               NAME    render       copy       video
    3816          kwin_x11 |███▎      ||          ||          ||          |
    3523              Xorg |▊         ||          ||          ||          |
 1120449               mpv |          ||          ||▋         ||          |
 1120529          glxgears |▋         ||          ||          ||          |
 1120449               mpv |▍         ||          ||          ||          |
    3860       plasmashell |▏         ||          ||          ||          |
    4764           krunner |          ||          ||          ||          |
  575206            chrome |          ||          ||          ||          |
  833481           firefox |          ||          ||          ||          |
  892924       thunderbird |          ||          ||          ||          |

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I did test it as well with two cards and confirmed that too works.

Rob Clark also tested it with a patch which exports the respective data from the msm driver and confirmed it works fine. Christian König tested it with in progress patches for amdgpu and that worked as well.

v2:
* Fixed SPDX headers and added a bunch of code comments/docs throughout.

v3:
* Rebased and some patch titles renamed as requested. (Kamil)

Tvrtko Ursulin (8):
lib: Extract igt_drm_clients from intel_gpu_top
lib: Allow specifying custom engine map lib/igt_drm_clients: Record client drm minor lib/igt_drm_clients: Support multiple DRM cards lib/igt_drm_fdinfo: Track largest engine index lib/igt_drm_clients: Decouple hardcoded engine assumptions lib/igt_drm_clients: Enforce client status sort order in the library
gputop: Basic vendor agnostic GPU top tool

 lib/igt_drm_clients.c   | 503 +++++++++++++++++++++++++++++
 lib/igt_drm_clients.h   |  87 ++++++
 lib/igt_drm_fdinfo.c    |  50 ++-
 lib/igt_drm_fdinfo.h    |  16 +-
 lib/meson.build         |   8 +
 tests/i915/drm_fdinfo.c |  19 +-
 tools/gputop.c          | 260 +++++++++++++++
 tools/intel_gpu_top.c   | 677 +++++++++++-----------------------------
 tools/meson.build       |   7 +-
 9 files changed, 1113 insertions(+), 514 deletions(-)
 create mode 100644 lib/igt_drm_clients.c
 create mode 100644 lib/igt_drm_clients.h
 create mode 100644 tools/gputop.c
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/8 lib: Extract igt_drm_clients from intel_gpu_top

From: Tvrtko Ursulin <[email protected]>

Extract some code into a new library to prepare for further work towards making a vendor agnostic gputop tool.

---
 lib/igt_drm_clients.c | 432 ++++++++++++++++++++++++++++++++++
 lib/igt_drm_clients.h |  85 +++++++
 lib/meson.build       |   8 +
 tools/intel_gpu_top.c | 521 +++++++-----------------------------------
 tools/meson.build     |   2 +-
 5 files changed, 606 insertions(+), 442 deletions(-)
 create mode 100644 lib/igt_drm_clients.c
 create mode 100644 lib/igt_drm_clients.h
lib/igt_drm_clients.c new file +432 -0
new file mode 100644
index 000000000000..45de2d0f1cc5
@@ -0,0 +1,432 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <strings.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/sysmacros.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "igt_drm_clients.h"
+#include "igt_drm_fdinfo.h"
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
+#endif
+
+/**
+ * igt_drm_clients_init:
+ * @private_data: private data to store in the struct
+ *
+ * Allocate and initialise the clients structure to be used with further API
+ * calls.
+ */
+struct igt_drm_clients *igt_drm_clients_init(void *private_data)
+{
+	struct igt_drm_clients *clients;
+
+	clients = malloc(sizeof(*clients));
+	if (!clients)
+		return NULL;
+
+	memset(clients, 0, sizeof(*clients));
+
+	clients->private_data = private_data;
+
+	return clients;
+}
+
+static struct igt_drm_client *
+igt_drm_clients_find(struct igt_drm_clients *clients,
+		     enum igt_drm_client_status status,
+		     unsigned int id)
+{
+	unsigned int start, num;
+	struct igt_drm_client *c;
+
+	start = status == IGT_DRM_CLIENT_FREE ? clients->active_clients : 0; /* Free block at the end. */
+	num = clients->num_clients - start;
+
+	for (c = &clients->client[start]; num; c++, num--) {
+		if (status != c->status)
+			continue;
+
+		if (status == IGT_DRM_CLIENT_FREE || c->id == id)
+			return c;
+	}
+
+	return NULL;
+}
+
+static void
+igt_drm_client_update(struct igt_drm_client *c, unsigned int pid, char *name,
+		      const struct drm_client_fdinfo *info)
+{
+	unsigned int i;
+
+	/* Update client pid if it changed (fd sharing). */
+	if (c->pid != pid)
+		c->pid = pid;
+
+	/* Update client name if it changed (fd sharing). */
+	if (strcmp(c->name, name)) {
+		char *p;
+
+		strncpy(c->name, name, sizeof(c->name) - 1);
+		strncpy(c->print_name, name, sizeof(c->print_name) - 1);
+
+		p = c->print_name;
+		while (*p) {
+			if (!isprint(*p))
+				*p = '*';
+			p++;
+		}
+	}
+
+	c->last_runtime = 0;
+	c->total_runtime = 0;
+
+	for (i = 0; i < c->clients->num_classes; i++) {
+		assert(i < ARRAY_SIZE(info->busy));
+
+		if (info->busy[i] < c->last[i])
+			continue; /* It will catch up soon. */
+
+		c->total_runtime += info->busy[i];
+		c->val[i] = info->busy[i] - c->last[i];
+		c->last_runtime += c->val[i];
+		c->last[i] = info->busy[i];
+	}
+
+	c->samples++;
+	c->status = IGT_DRM_CLIENT_ALIVE;
+}
+
+static void
+igt_drm_client_add(struct igt_drm_clients *clients,
+		   const struct drm_client_fdinfo *info,
+		   unsigned int pid, char *name)
+{
+	struct igt_drm_client *c;
+
+	assert(!igt_drm_clients_find(clients, IGT_DRM_CLIENT_ALIVE, info->id));
+
+	c = igt_drm_clients_find(clients, IGT_DRM_CLIENT_FREE, 0);
+	if (!c) {
+		unsigned int idx = clients->num_clients;
+
+		/*
+		 * Grow the array a bit past the current requirement to avoid
+		 * constant reallocation when clients are dynamically appearing
+		 * and disappearing.
+		 */
+		clients->num_clients += (clients->num_clients + 2) / 2;
+		clients->client = realloc(clients->client,
+					  clients->num_clients * sizeof(*c));
+		assert(clients->client);
+
+		c = &clients->client[idx];
+		memset(c, 0, (clients->num_clients - idx) * sizeof(*c));
+	}
+
+	c->id = info->id;
+	c->clients = clients;
+	c->val = calloc(clients->num_classes, sizeof(c->val));
+	c->last = calloc(clients->num_classes, sizeof(c->last));
+	assert(c->val && c->last);
+
+	igt_drm_client_update(c, pid, name, info);
+}
+
+static
+void igt_drm_client_free(struct igt_drm_client *c, bool clear)
+{
+	free(c->val);
+	free(c->last);
+
+	if (clear)
+		memset(c, 0, sizeof(*c));
+}
+
+/**
+ * igt_drm_clients_sort:
+ * @clients: Previously initialised clients object
+ * @cmp: Client comparison callback
+ *
+ * Sort the clients array according to the passed in comparison callback which
+ * is compatible with the qsort(3) semantics.
+ *
+ * Caller has to ensure the callback is putting all active
+ * (IGT_DRM_CLIENT_ALIVE) clients in a single group at the head of the array
+ * before any other sorting criteria.
+ */
+struct igt_drm_clients *
+igt_drm_clients_sort(struct igt_drm_clients *clients,
+		     int (*cmp)(const void *, const void *))
+{
+	unsigned int active, free;
+	struct igt_drm_client *c;
+	int tmp;
+
+	if (!clients)
+		return clients;
+
+	qsort(clients->client, clients->num_clients, sizeof(*clients->client),
+	      cmp);
+
+	/* Trim excessive array space. */
+	active = 0;
+	igt_for_each_drm_client(clients, c, tmp) {
+		if (c->status != IGT_DRM_CLIENT_ALIVE)
+			break; /* Active clients are first in the array. */
+		active++;
+	}
+
+	clients->active_clients = active;
+
+	/* Trim excess free space when clients are exiting. */
+	free = clients->num_clients - active;
+	if (free > clients->num_clients / 2) {
+		active = clients->num_clients - free / 2;
+		if (active != clients->num_clients) {
+			clients->num_clients = active;
+			clients->client = realloc(clients->client,
+						  clients->num_clients *
+						  sizeof(*c));
+		}
+	}
+
+	return clients;
+}
+
+/**
+ * igt_drm_clients_free:
+ * @clients: Previously initialised clients object
+ *
+ * Free all clients and all memory associated with the clients structure.
+ */
+void igt_drm_clients_free(struct igt_drm_clients *clients)
+{
+	struct igt_drm_client *c;
+	unsigned int tmp;
+
+	igt_for_each_drm_client(clients, c, tmp)
+		igt_drm_client_free(c, false);
+
+	free(clients->client);
+	free(clients);
+}
+
+static DIR *opendirat(int at, const char *name)
+{
+	DIR *dir;
+	int fd;
+
+	fd = openat(at, name, O_DIRECTORY);
+	if (fd < 0)
+		return NULL;
+
+	dir = fdopendir(fd);
+	if (!dir)
+		close(fd);
+
+	return dir;
+}
+
+static size_t readat2buf(int at, const char *name, char *buf, const size_t sz)
+{
+	ssize_t count;
+	int fd;
+
+	fd = openat(at, name, O_RDONLY);
+	if (fd <= 0)
+		return 0;
+
+	count = read(fd, buf, sz - 1);
+	close(fd);
+
+	if (count > 0) {
+		buf[count] = 0;
+
+		return count;
+	} else {
+		buf[0] = 0;
+
+		return 0;
+	}
+}
+
+static bool get_task_name(const char *buffer, char *out, unsigned long sz)
+{
+	char *s = index(buffer, '(');
+	char *e = rindex(buffer, ')');
+	unsigned int len;
+
+	if (!s || !e)
+		return false;
+	assert(e >= s);
+
+	len = e - ++s;
+	if(!len || (len + 1) >= sz)
+		return false;
+
+	strncpy(out, s, len);
+	out[len] = 0;
+
+	return true;
+}
+
+static bool is_drm_fd(int fd_dir, const char *name)
+{
+	struct stat stat;
+	int ret;
+
+	ret = fstatat(fd_dir, name, &stat, 0);
+
+	return ret == 0 &&
+	       (stat.st_mode & S_IFMT) == S_IFCHR &&
+	       major(stat.st_rdev) == 226;
+}
+
+/**
+ * igt_drm_clients_scan:
+ * @clients: Previously initialised clients object
+ * @filter_client: Callback for client filtering
+ *
+ * Scan all open file descriptors from all processes in order to find all DRM
+ * clients and manage our internal list.
+ */
+struct igt_drm_clients *
+igt_drm_clients_scan(struct igt_drm_clients *clients,
+		     bool (*filter_client)(const struct igt_drm_clients *,
+					   const struct drm_client_fdinfo *))
+{
+	struct dirent *proc_dent;
+	struct igt_drm_client *c;
+	DIR *proc_dir;
+	int tmp;
+
+	if (!clients)
+		return clients;
+
+	/*
+	 * First mark all alive clients as 'probe' so we can figure out which
+	 * ones have existed since the previous scan.
+	 */
+	igt_for_each_drm_client(clients, c, tmp) {
+		assert(c->status != IGT_DRM_CLIENT_PROBE);
+		if (c->status == IGT_DRM_CLIENT_ALIVE)
+			c->status = IGT_DRM_CLIENT_PROBE;
+		else
+			break; /* Free block at the end of array. */
+	}
+
+	proc_dir = opendir("/proc");
+	if (!proc_dir)
+		return clients;
+
+	while ((proc_dent = readdir(proc_dir)) != NULL) {
+		int pid_dir = -1, fd_dir = -1;
+		struct dirent *fdinfo_dent;
+		char client_name[64] = { };
+		unsigned int client_pid;
+		DIR *fdinfo_dir = NULL;
+		char buf[4096];
+		size_t count;
+
+		if (proc_dent->d_type != DT_DIR)
+			continue;
+		if (!isdigit(proc_dent->d_name[0]))
+			continue;
+
+		pid_dir = openat(dirfd(proc_dir), proc_dent->d_name,
+				 O_DIRECTORY | O_RDONLY);
+		if (pid_dir < 0)
+			continue;
+
+		count = readat2buf(pid_dir, "stat", buf, sizeof(buf));
+		if (!count)
+			goto next;
+
+		client_pid = atoi(buf);
+		if (!client_pid)
+			goto next;
+
+		if (!get_task_name(buf, client_name, sizeof(client_name)))
+			goto next;
+
+		fd_dir = openat(pid_dir, "fd", O_DIRECTORY | O_RDONLY);
+		if (fd_dir < 0)
+			goto next;
+
+		fdinfo_dir = opendirat(pid_dir, "fdinfo");
+		if (!fdinfo_dir)
+			goto next;
+
+		while ((fdinfo_dent = readdir(fdinfo_dir)) != NULL) {
+			struct drm_client_fdinfo info = { };
+
+			if (fdinfo_dent->d_type != DT_REG)
+				continue;
+			if (!isdigit(fdinfo_dent->d_name[0]))
+				continue;
+
+			if (!is_drm_fd(fd_dir, fdinfo_dent->d_name))
+				continue;
+
+			if (!__igt_parse_drm_fdinfo(dirfd(fdinfo_dir),
+						    fdinfo_dent->d_name,
+						    &info))
+				continue;
+
+			if (filter_client && !filter_client(clients, &info))
+				continue;
+
+			if (igt_drm_clients_find(clients, IGT_DRM_CLIENT_ALIVE,
+						info.id))
+				continue; /* Skip duplicate fds. */
+
+			c = igt_drm_clients_find(clients, IGT_DRM_CLIENT_PROBE,
+						info.id);
+			if (!c)
+				igt_drm_client_add(clients, &info, client_pid,
+						   client_name);
+			else
+				igt_drm_client_update(c, client_pid,
+						      client_name, &info);
+		}
+
+next:
+		if (fdinfo_dir)
+			closedir(fdinfo_dir);
+		if (fd_dir >= 0)
+			close(fd_dir);
+		if (pid_dir >= 0)
+			close(pid_dir);
+	}
+
+	closedir(proc_dir);
+
+	/*
+	 * Clients still in 'probe' status after the scan have exited and need
+	 * to be freed.
+	 */
+	igt_for_each_drm_client(clients, c, tmp) {
+		if (c->status == IGT_DRM_CLIENT_PROBE)
+			igt_drm_client_free(c, true);
+		else if (c->status == IGT_DRM_CLIENT_FREE)
+			break;
+	}
+
+	return clients;
+}
lib/igt_drm_clients.h new file +85 -0

85 lines not on this page · raw message

lib/meson.build +8 -0
index d49b78ca1a12..e6529f682988 100644
@@ -23,6 +23,7 @@ lib_sources = [
 	'igt_debugfs.c',
 	'igt_device.c',
 	'igt_device_scan.c',
+	'igt_drm_clients.h',
 	'igt_drm_fdinfo.c',
 	'igt_aux.c',
 	'igt_gt.c',
@@ -250,6 +251,13 @@ lib_igt_device_scan_build = static_library('igt_device_scan',
 lib_igt_device_scan = declare_dependency(link_with : lib_igt_device_scan_build,
 				  include_directories : inc)
 
+lib_igt_drm_clients_build = static_library('igt_drm_clients',
+        ['igt_drm_clients.c'],
+        include_directories : inc)
+
+lib_igt_drm_clients = declare_dependency(link_with : lib_igt_drm_clients_build,
+				         include_directories : inc)
+
 lib_igt_drm_fdinfo_build = static_library('igt_drm_fdinfo',
 	['igt_drm_fdinfo.c'],
 	include_directories : inc)
tools/intel_gpu_top.c +80 -441

749 lines not on this page · raw message

tools/meson.build +1 -1
index d2defec87031..c6194fd15daa 100644
@@ -87,7 +87,7 @@ install_subdir('registers', install_dir : datadir)
 executable('intel_gpu_top', 'intel_gpu_top.c',
 	   install : true,
 	   install_rpath : bindir_rpathdir,
-	   dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_fdinfo,math])
+	   dependencies : [lib_igt_perf,lib_igt_device_scan,lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
 
 executable('amd_hdmi_compliance', 'amd_hdmi_compliance.c',
 	   dependencies : [tool_deps],
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 2/8 lib: Allow specifying custom engine map

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Instead of hard coding the engine names, allow a map of names to indices to either be passed in or it gets auto-detected (less efficient) while parsing.

---
 lib/igt_drm_clients.c   | 18 +++++++++++++---
 lib/igt_drm_clients.h   |  3 ++-
 lib/igt_drm_fdinfo.c    | 48 +++++++++++++++++++++++++++--------------
 lib/igt_drm_fdinfo.h    | 15 ++++++++++---
 tests/i915/drm_fdinfo.c | 19 ++++++++++++----
 tools/intel_gpu_top.c   | 16 +++++++++++---
 6 files changed, 89 insertions(+), 30 deletions(-)
lib/igt_drm_clients.c +15 -3
index 45de2d0f1cc5..eabd43773f2d 100644
@@ -302,14 +302,26 @@ static bool is_drm_fd(int fd_dir, const char *name)
  * igt_drm_clients_scan:
  * @clients: Previously initialised clients object
  * @filter_client: Callback for client filtering
+ * @name_map: Array of engine name strings
+ * @map_entries: Number of items in the @name_map array
  *
  * Scan all open file descriptors from all processes in order to find all DRM
  * clients and manage our internal list.
+ *
+ * If @name_map is provided each found engine in the fdinfo struct must
+ * correspond to one of the provided names. In this case the index of the engine
+ * stats tracked in struct igt_drm_client will be tracked under the same index
+ * as the engine name provided.
+ *
+ * If @name_map is not provided engine names will be auto-detected (this is
+ * less performant) and indices will correspond with auto-detected names as
+ * listed int clients->engine_class[].
  */
 struct igt_drm_clients *
 igt_drm_clients_scan(struct igt_drm_clients *clients,
 		     bool (*filter_client)(const struct igt_drm_clients *,
-					   const struct drm_client_fdinfo *))
+					   const struct drm_client_fdinfo *),
+		     const char **name_map, unsigned int map_entries)
 {
 	struct dirent *proc_dent;
 	struct igt_drm_client *c;
@@ -385,8 +397,8 @@ igt_drm_clients_scan(struct igt_drm_clients *clients,
 				continue;
 
 			if (!__igt_parse_drm_fdinfo(dirfd(fdinfo_dir),
-						    fdinfo_dent->d_name,
-						    &info))
+						    fdinfo_dent->d_name, &info,
+						    name_map, map_entries))
 				continue;
 
 			if (filter_client && !filter_client(clients, &info))
lib/igt_drm_clients.h +2 -1
index 969793d5b51e..bced19adb055 100644
@@ -76,7 +76,8 @@ void igt_drm_clients_free(struct igt_drm_clients *clients);
 struct igt_drm_clients *
 igt_drm_clients_scan(struct igt_drm_clients *clients,
 		     bool (*filter_client)(const struct igt_drm_clients *,
-					   const struct drm_client_fdinfo *));
+					   const struct drm_client_fdinfo *),
+		     const char **name_map, unsigned int map_entries);
 
 struct igt_drm_clients *
 igt_drm_clients_sort(struct igt_drm_clients *clients,
lib/igt_drm_fdinfo.c +32 -16

97 lines not on this page · raw message

lib/igt_drm_fdinfo.h +12 -3
index 8759471615bd..fa4982f4030e 100644
@@ -39,6 +39,7 @@ struct drm_client_fdinfo {
 
 	unsigned int num_engines;
 	unsigned int capacity[DRM_CLIENT_FDINFO_MAX_ENGINES];
+	char names[DRM_CLIENT_FDINFO_MAX_ENGINES][256];
 	uint64_t busy[DRM_CLIENT_FDINFO_MAX_ENGINES];
 };
 
@@ -47,11 +48,15 @@ struct drm_client_fdinfo {
  *
  * @drm_fd: DRM file descriptor
  * @info: Structure to populate with read data. Must be zeroed.
+ * @name_map: Optional array of strings representing engine names
+ * @map_entries: Number of strings in the names array
  *
  * Returns the number of valid drm fdinfo keys found or zero if not all
  * mandatory keys were present or no engines found.
  */
-unsigned int igt_parse_drm_fdinfo(int drm_fd, struct drm_client_fdinfo *info);
+unsigned int
+igt_parse_drm_fdinfo(int drm_fd, struct drm_client_fdinfo *info,
+		     const char **name_map, unsigned int map_entries);
 
 /**
  * __igt_parse_drm_fdinfo: Parses the drm fdinfo file
@@ -59,11 +64,15 @@ unsigned int igt_parse_drm_fdinfo(int drm_fd, struct drm_client_fdinfo *info);
  * @dir: File descriptor pointing to /proc/pid/fdinfo directory
  * @fd: String representation of the file descriptor number to parse.
  * @info: Structure to populate with read data. Must be zeroed.
+ * @name_map: Optional array of strings representing engine names
+ * @map_entries: Number of strings in the names array
  *
  * Returns the number of valid drm fdinfo keys found or zero if not all
  * mandatory keys were present or no engines found.
  */
-unsigned int __igt_parse_drm_fdinfo(int dir, const char *fd,
-				    struct drm_client_fdinfo *info);
+unsigned int
+__igt_parse_drm_fdinfo(int dir, const char *fd,
+		       struct drm_client_fdinfo *info,
+		       const char **name_map, unsigned int map_entries);
 
 #endif /* IGT_DRM_FDINFO_H */
tests/i915/drm_fdinfo.c +15 -4
index 65b8b8307c66..2f300d492853 100644
@@ -35,6 +35,14 @@ IGT_TEST_DESCRIPTION("Test the i915 drm fdinfo data");
 const double tolerance = 0.05f;
 const unsigned long batch_duration_ns = 500e6;
 
+static const char *engine_map[] = {
+	"render",
+	"copy",
+	"video",
+	"video-enhance",
+	"compute",
+};
+
 #define __assert_within_epsilon(x, ref, tol_up, tol_down) \
 	igt_assert_f((double)(x) <= (1.0 + (tol_up)) * (double)(ref) && \
 		     (double)(x) >= (1.0 - (tol_down)) * (double)(ref), \
@@ -51,7 +59,8 @@ static void basics(int i915, unsigned int num_classes)
 	struct drm_client_fdinfo info = { };
 	unsigned int ret;
 
-	ret = igt_parse_drm_fdinfo(i915, &info);
+	ret = igt_parse_drm_fdinfo(i915, &info, engine_map,
+				   ARRAY_SIZE(engine_map));
 	igt_assert(ret);
 
 	igt_assert(!strcmp(info.driver, "i915"));
@@ -182,7 +191,8 @@ static uint64_t read_busy(int i915, unsigned int class)
 {
 	struct drm_client_fdinfo info = { };
 
-	igt_assert(igt_parse_drm_fdinfo(i915, &info));
+	igt_assert(igt_parse_drm_fdinfo(i915, &info, engine_map,
+					ARRAY_SIZE(engine_map)));
 
 	return info.busy[class];
 }
@@ -268,7 +278,8 @@ static void read_busy_all(int i915, uint64_t *val)
 {
 	struct drm_client_fdinfo info = { };
 
-	igt_assert(igt_parse_drm_fdinfo(i915, &info));
+	igt_assert(igt_parse_drm_fdinfo(i915, &info, engine_map,
+					ARRAY_SIZE(engine_map)));
 
 	memcpy(val, info.busy, sizeof(info.busy));
 }
@@ -728,7 +739,7 @@ igt_main
 		i915 = __drm_open_driver(DRIVER_INTEL);
 
 		igt_require_gem(i915);
-		igt_require(igt_parse_drm_fdinfo(i915, &info));
+		igt_require(igt_parse_drm_fdinfo(i915, &info, NULL, 0));
 
 		ctx = intel_ctx_create_all_physical(i915);
 
tools/intel_gpu_top.c +13 -3
index e660f0c6c3b2..2fb9f9b757d5 100644
@@ -2053,7 +2053,7 @@ static bool has_drm_fdinfo(const struct igt_device_card *card)
 	if (fd < 0)
 		return false;
 
-	cnt = igt_parse_drm_fdinfo(fd, &info);
+	cnt = igt_parse_drm_fdinfo(fd, &info, NULL, 0);
 
 	close(fd);
 
@@ -2089,6 +2089,13 @@ int main(int argc, char **argv)
 {
 	unsigned int period_us = DEFAULT_PERIOD_MS * 1000;
 	struct igt_drm_clients *clients = NULL;
+	static const char *engine_map[] = {
+		"render",
+		"copy",
+		"video",
+		"video-enhance",
+		"compute",
+	};
 	bool physical_engines = false;
 	int con_w = -1, con_h = -1;
 	char *output_path = NULL;
@@ -2243,7 +2250,8 @@ int main(int argc, char **argv)
 	}
 
 	pmu_sample(engines);
-	igt_drm_clients_scan(clients, client_match);
+	igt_drm_clients_scan(clients, client_match, engine_map,
+			     ARRAY_SIZE(engine_map));
 	codename = igt_device_get_pretty_name(&card, false);
 
 	if (output_mode == JSON)
@@ -2278,7 +2286,9 @@ int main(int argc, char **argv)
 
 		disp_clients =
 			display_clients(igt_drm_clients_scan(clients,
-							     client_match));
+							     client_match,
+							     engine_map,
+							     ARRAY_SIZE(engine_map)));
 
 		while (!consumed) {
 			pops->open_struct(NULL);
Signature · 1 line
2.34.1
#3 lore raw

PATCH v3 3/8 lib/igt_drm_clients: Record client drm minor

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Prepare for supporting clients belonging to multiple DRM cards by storing the DRM minor in the client record.

---
 lib/igt_drm_clients.c | 22 ++++++++++++++--------
 lib/igt_drm_clients.h |  1 +
 2 files changed, 15 insertions(+), 8 deletions(-)
lib/igt_drm_clients.c +14 -8
index eabd43773f2d..c23a3fae9793 100644
@@ -115,7 +115,7 @@ igt_drm_client_update(struct igt_drm_client *c, unsigned int pid, char *name,
 static void
 igt_drm_client_add(struct igt_drm_clients *clients,
 		   const struct drm_client_fdinfo *info,
-		   unsigned int pid, char *name)
+		   unsigned int pid, char *name, unsigned int drm_minor)
 {
 	struct igt_drm_client *c;
 
@@ -140,6 +140,7 @@ igt_drm_client_add(struct igt_drm_clients *clients,
 	}
 
 	c->id = info->id;
+	c->drm_minor = drm_minor;
 	c->clients = clients;
 	c->val = calloc(clients->num_classes, sizeof(c->val));
 	c->last = calloc(clients->num_classes, sizeof(c->last));
@@ -286,16 +287,21 @@ static bool get_task_name(const char *buffer, char *out, unsigned long sz)
 	return true;
 }
 
-static bool is_drm_fd(int fd_dir, const char *name)
+static bool is_drm_fd(int fd_dir, const char *name, unsigned int *minor)
 {
 	struct stat stat;
 	int ret;
 
 	ret = fstatat(fd_dir, name, &stat, 0);
 
-	return ret == 0 &&
-	       (stat.st_mode & S_IFMT) == S_IFCHR &&
-	       major(stat.st_rdev) == 226;
+	if (ret == 0 &&
+	    (stat.st_mode & S_IFMT) == S_IFCHR &&
+	    major(stat.st_rdev) == 226) {
+		*minor = minor(stat.st_rdev);
+		return true;
+	}
+
+	return false;
 }
 
 /**
@@ -348,10 +354,10 @@ igt_drm_clients_scan(struct igt_drm_clients *clients,
 		return clients;
 
 	while ((proc_dent = readdir(proc_dir)) != NULL) {
+		unsigned int client_pid, minor = 0;
 		int pid_dir = -1, fd_dir = -1;
 		struct dirent *fdinfo_dent;
 		char client_name[64] = { };
-		unsigned int client_pid;
 		DIR *fdinfo_dir = NULL;
 		char buf[4096];
 		size_t count;
@@ -393,7 +399,7 @@ igt_drm_clients_scan(struct igt_drm_clients *clients,
 			if (!isdigit(fdinfo_dent->d_name[0]))
 				continue;
 
-			if (!is_drm_fd(fd_dir, fdinfo_dent->d_name))
+			if (!is_drm_fd(fd_dir, fdinfo_dent->d_name, &minor))
 				continue;
 
 			if (!__igt_parse_drm_fdinfo(dirfd(fdinfo_dir),
@@ -412,7 +418,7 @@ igt_drm_clients_scan(struct igt_drm_clients *clients,
 						info.id);
 			if (!c)
 				igt_drm_client_add(clients, &info, client_pid,
-						   client_name);
+						   client_name, minor);
 			else
 				igt_drm_client_update(c, client_pid,
 						      client_name, &info);
lib/igt_drm_clients.h +1 -0
index bced19adb055..ffa219c9c9fd 100644
@@ -44,6 +44,7 @@ struct igt_drm_client {
 
 	enum igt_drm_client_status status;
 	unsigned int id; /* DRM client id from fdinfo. */
+	unsigned int drm_minor; /* DRM minor of this client. */
 	unsigned int pid; /* PID which has this DRM fd open. */
 	char name[24]; /* Process name of the owning PID. */
 	char print_name[24]; /* Name without any non-printable characters. */
Signature · 1 line
2.34.1
#4 lore raw

PATCH v3 4/8 lib/igt_drm_clients: Support multiple DRM cards

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Require DRM minor match during client lookup.

---
 lib/igt_drm_clients.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
lib/igt_drm_clients.c +8 -6
index c23a3fae9793..e11c8b18188f 100644
@@ -49,7 +49,7 @@ struct igt_drm_clients *igt_drm_clients_init(void *private_data)
 static struct igt_drm_client *
 igt_drm_clients_find(struct igt_drm_clients *clients,
 		     enum igt_drm_client_status status,
-		     unsigned int id)
+		     unsigned int drm_minor, unsigned int id)
 {
 	unsigned int start, num;
 	struct igt_drm_client *c;
@@ -61,7 +61,8 @@ igt_drm_clients_find(struct igt_drm_clients *clients,
 		if (status != c->status)
 			continue;
 
-		if (status == IGT_DRM_CLIENT_FREE || c->id == id)
+		if (status == IGT_DRM_CLIENT_FREE ||
+		    (drm_minor == c->drm_minor && c->id == id))
 			return c;
 	}
 
@@ -119,9 +120,10 @@ igt_drm_client_add(struct igt_drm_clients *clients,
 {
 	struct igt_drm_client *c;
 
-	assert(!igt_drm_clients_find(clients, IGT_DRM_CLIENT_ALIVE, info->id));
+	assert(!igt_drm_clients_find(clients, IGT_DRM_CLIENT_ALIVE,
+				     drm_minor, info->id));
 
-	c = igt_drm_clients_find(clients, IGT_DRM_CLIENT_FREE, 0);
+	c = igt_drm_clients_find(clients, IGT_DRM_CLIENT_FREE, 0, 0);
 	if (!c) {
 		unsigned int idx = clients->num_clients;
 
@@ -411,11 +413,11 @@ igt_drm_clients_scan(struct igt_drm_clients *clients,
 				continue;
 
 			if (igt_drm_clients_find(clients, IGT_DRM_CLIENT_ALIVE,
-						info.id))
+						 minor, info.id))
 				continue; /* Skip duplicate fds. */
 
 			c = igt_drm_clients_find(clients, IGT_DRM_CLIENT_PROBE,
-						info.id);
+						 minor, info.id);
 			if (!c)
 				igt_drm_client_add(clients, &info, client_pid,
 						   client_name, minor);
Signature · 1 line
2.34.1
#5 lore raw

PATCH v3 5/8 lib/igt_drm_fdinfo: Track largest engine index

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Prep code for incoming work.

---
 lib/igt_drm_fdinfo.c | 2 ++
 lib/igt_drm_fdinfo.h | 1 +
 2 files changed, 3 insertions(+)
lib/igt_drm_fdinfo.c +2 -0
index 68c89ad2c17e..b850d2210ae7 100644
@@ -162,6 +162,8 @@ __igt_parse_drm_fdinfo(int dir, const char *fd, struct drm_client_fdinfo *info,
 					info->capacity[idx] = 1;
 				info->busy[idx] = val;
 				info->num_engines++;
+				if (idx > info->last_engine_index)
+					info->last_engine_index = idx;
 			}
 		} else if (!strncmp(l, "drm-engine-capacity-", 20)) {
 			idx = parse_engine(l, info,
lib/igt_drm_fdinfo.h +1 -0
index fa4982f4030e..6284e05e868a 100644
@@ -38,6 +38,7 @@ struct drm_client_fdinfo {
 	unsigned long id;
 
 	unsigned int num_engines;
+	unsigned int last_engine_index;
 	unsigned int capacity[DRM_CLIENT_FDINFO_MAX_ENGINES];
 	char names[DRM_CLIENT_FDINFO_MAX_ENGINES][256];
 	uint64_t busy[DRM_CLIENT_FDINFO_MAX_ENGINES];
Signature · 1 line
2.34.1
#6 lore raw

PATCH v3 6/8 lib/igt_drm_clients: Decouple hardcoded engine assumptions

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Intel_gpu_top gets it's main engine configuration data via PMU probe and uses that for per client view as well. Furthemore code so far assumed only clients belonging from a single DRM card would be tracked in a single clients list.

Break this inter-dependency by moving the engine data to be per client and also have libdrmclient probe the engine configuration independently using the previously added libdrmfdinfo facilities.

---
 lib/igt_drm_clients.c |  38 +++++++++++--
 lib/igt_drm_clients.h |  14 ++---
 tools/intel_gpu_top.c | 127 +++++++++++++++++++++++++++++++-----------
 3 files changed, 134 insertions(+), 45 deletions(-)
lib/igt_drm_clients.c +34 -4
index e11c8b18188f..d507c07fec87 100644
@@ -97,7 +97,7 @@ igt_drm_client_update(struct igt_drm_client *c, unsigned int pid, char *name,
 	c->last_runtime = 0;
 	c->total_runtime = 0;
 
-	for (i = 0; i < c->clients->num_classes; i++) {
+	for (i = 0; i <= c->engines->max_engine_id; i++) {
 		assert(i < ARRAY_SIZE(info->busy));
 
 		if (info->busy[i] < c->last[i])
@@ -119,6 +119,7 @@ igt_drm_client_add(struct igt_drm_clients *clients,
 		   unsigned int pid, char *name, unsigned int drm_minor)
 {
 	struct igt_drm_client *c;
+	unsigned int i;
 
 	assert(!igt_drm_clients_find(clients, IGT_DRM_CLIENT_ALIVE,
 				     drm_minor, info->id));
@@ -144,8 +145,28 @@ igt_drm_client_add(struct igt_drm_clients *clients,
 	c->id = info->id;
 	c->drm_minor = drm_minor;
 	c->clients = clients;
-	c->val = calloc(clients->num_classes, sizeof(c->val));
-	c->last = calloc(clients->num_classes, sizeof(c->last));
+	c->engines = malloc(sizeof(*c->engines));
+	assert(c->engines);
+	memset(c->engines, 0, sizeof(*c->engines));
+	c->engines->capacity = calloc(info->last_engine_index + 1,
+				      sizeof(*c->engines->capacity));
+	assert(c->engines->capacity);
+	c->engines->names = calloc(info->last_engine_index + 1,
+				   sizeof(*c->engines->names));
+	assert(c->engines->names);
+
+	for (i = 0; i <= info->last_engine_index; i++) {
+		if (!info->capacity[i])
+			continue;
+
+		c->engines->capacity[i] = info->capacity[i];
+		c->engines->names[i] = strdup(info->names[i]);
+		assert(c->engines->names[i]);
+		c->engines->num_engines++;
+		c->engines->max_engine_id = i;
+	}
+	c->val = calloc(c->engines->max_engine_id + 1, sizeof(c->val));
+	c->last = calloc(c->engines->max_engine_id + 1, sizeof(c->last));
 	assert(c->val && c->last);
 
 	igt_drm_client_update(c, pid, name, info);
@@ -154,6 +175,15 @@ igt_drm_client_add(struct igt_drm_clients *clients,
 static
 void igt_drm_client_free(struct igt_drm_client *c, bool clear)
 {
+	unsigned int i;
+
+	if (c->engines) {
+		for (i = 0; i <= c->engines->max_engine_id; i++)
+			free(c->engines->names[i]);
+		free(c->engines->capacity);
+		free(c->engines->names);
+	}
+	free(c->engines);
 	free(c->val);
 	free(c->last);
 
@@ -323,7 +353,7 @@ static bool is_drm_fd(int fd_dir, const char *name, unsigned int *minor)
  *
  * If @name_map is not provided engine names will be auto-detected (this is
  * less performant) and indices will correspond with auto-detected names as
- * listed int clients->engine_class[].
+ * listed int clients->engines->names[].
  */
 struct igt_drm_clients *
 igt_drm_clients_scan(struct igt_drm_clients *clients,
lib/igt_drm_clients.h +7 -7
index ffa219c9c9fd..0a903b431eaa 100644
@@ -31,10 +31,12 @@ enum igt_drm_client_status {
 	IGT_DRM_CLIENT_PROBE
 };
 
-struct igt_drm_client_engine_class {
-	unsigned int engine_class;
-	const char *name;
-	unsigned int num_engines;
+struct igt_drm_client_engines {
+	unsigned int num_engines; /* Number of discovered active engines. */
+	unsigned int max_engine_id; /* Largest engine index discovered.
+				       (Can differ from num_engines - 1 when using the engine map facility.) */
+	unsigned int *capacity; /* Array of engine capacities as parsed from fdinfo. */
+	char **names; /* Array of engine names, either auto-detected or from the passed in engine map. */
 };
 
 struct igt_drm_clients;
@@ -43,6 +45,7 @@ struct igt_drm_client {
 	struct igt_drm_clients *clients; /* Owning list. */
 
 	enum igt_drm_client_status status;
+	struct igt_drm_client_engines *engines; /* Engines used by this client, to map with busynees data. */
 	unsigned int id; /* DRM client id from fdinfo. */
 	unsigned int drm_minor; /* DRM minor of this client. */
 	unsigned int pid; /* PID which has this DRM fd open. */
@@ -59,9 +62,6 @@ struct igt_drm_clients {
 	unsigned int num_clients;
 	unsigned int active_clients;
 
-	unsigned int num_classes;
-	struct igt_drm_client_engine_class *engine_class;
-
 	void *private_data;
 
 	struct igt_drm_client *client; /* Must be last. */
tools/intel_gpu_top.c +93 -34

287 lines not on this page · raw message

Signature · 1 line
2.34.1
#7 lore raw

PATCH v3 7/8 lib/igt_drm_clients: Enforce client status sort order in the library

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Some libdrmclient operations require that inactive clients are last in the list. Rather than relying on callers of the library sort routine to implement their comparison callbacks correctly, enforce this order directly in the library and let callers comparison callbacks concern themselves only with ordering they are interested in.

---
 lib/igt_drm_clients.c | 37 +++++++++++++++-----
 lib/igt_drm_clients.h |  2 +-
 tools/intel_gpu_top.c | 81 +++++++++++++++++++------------------------
 3 files changed, 65 insertions(+), 55 deletions(-)
lib/igt_drm_clients.c +29 -8
index d507c07fec87..b3eda39cd226 100644
@@ -191,22 +191,38 @@ void igt_drm_client_free(struct igt_drm_client *c, bool clear)
 		memset(c, 0, sizeof(*c));
 }
 
+struct sort_context
+{
+	int (*user_cmp)(const void *, const void *, void *);
+};
+
+static int sort_cmp(const void *_a, const void *_b, void *_ctx)
+{
+	const struct sort_context *ctx = _ctx;
+	const struct igt_drm_client *a = _a;
+	const struct igt_drm_client *b = _b;
+	int cmp = b->status - a->status;
+
+	if (cmp == 0)
+		return ctx->user_cmp(_a, _b, _ctx);
+	else
+		return cmp;
+}
+
 /**
  * igt_drm_clients_sort:
  * @clients: Previously initialised clients object
  * @cmp: Client comparison callback
  *
  * Sort the clients array according to the passed in comparison callback which
- * is compatible with the qsort(3) semantics.
- *
- * Caller has to ensure the callback is putting all active
- * (IGT_DRM_CLIENT_ALIVE) clients in a single group at the head of the array
- * before any other sorting criteria.
+ * is compatible with the qsort(3) semantics, with the third void * argument
+ * being unused.
  */
 struct igt_drm_clients *
 igt_drm_clients_sort(struct igt_drm_clients *clients,
-		     int (*cmp)(const void *, const void *))
+		     int (*cmp)(const void *, const void *, void *))
 {
+	struct sort_context ctx = { .user_cmp = cmp };
 	unsigned int active, free;
 	struct igt_drm_client *c;
 	int tmp;
@@ -214,8 +230,13 @@ igt_drm_clients_sort(struct igt_drm_clients *clients,
 	if (!clients)
 		return clients;
 
-	qsort(clients->client, clients->num_clients, sizeof(*clients->client),
-	      cmp);
+	/*
+	 * Enforce client->status ordering (active followed by free) by running
+	 * the user provided comparison callback wrapped in the one internal
+	 * to the library.
+	 */
+	qsort_r(clients->client, clients->num_clients, sizeof(*clients->client),
+	      sort_cmp, &ctx);
 
 	/* Trim excessive array space. */
 	active = 0;
lib/igt_drm_clients.h +1 -1
index 0a903b431eaa..df8022d42098 100644
@@ -82,6 +82,6 @@ igt_drm_clients_scan(struct igt_drm_clients *clients,
 
 struct igt_drm_clients *
 igt_drm_clients_sort(struct igt_drm_clients *clients,
-		     int (*cmp)(const void *, const void *));
+		     int (*cmp)(const void *, const void *, void *));
 
 #endif /* IGT_DRM_CLIENTS_H */
tools/intel_gpu_top.c +35 -46

127 lines not on this page · raw message

Signature · 1 line
2.34.1
#8 lore raw

PATCH v3 8/8 gputop: Basic vendor agnostic GPU top tool

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

---
 tools/gputop.c    | 260 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/meson.build |   5 +
 2 files changed, 265 insertions(+)
 create mode 100644 tools/gputop.c
tools/gputop.c new file +260 -0
new file mode 100644
index 000000000000..d259cac1ab17
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <poll.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>
+#include <sys/sysmacros.h>
+#include <stdbool.h>
+
+#include "igt_drm_clients.h"
+#include "igt_drm_fdinfo.h"
+
+static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+
+static void n_spaces(const unsigned int n)
+{
+	unsigned int i;
+
+	for (i = 0; i < n; i++)
+		putchar(' ');
+}
+
+static void print_percentage_bar(double percent, int max_len)
+{
+	int bar_len, i, len = max_len - 2;
+	const int w = 8;
+
+	assert(max_len > 0);
+
+	bar_len = ceil(w * percent * len / 100.0);
+	if (bar_len > w * len)
+		bar_len = w * len;
+
+	putchar('|');
+
+	for (i = bar_len; i >= w; i -= w)
+		printf("%s", bars[w]);
+	if (i)
+		printf("%s", bars[i]);
+
+	len -= (bar_len + (w - 1)) / w;
+	n_spaces(len);
+
+	putchar('|');
+}
+
+static int
+print_client_header(struct igt_drm_client *c, int lines, int con_w, int con_h,
+		    int *engine_w)
+{
+	const char *pidname = "    PID               NAME ";
+	int ret, len = strlen(pidname);
+
+	if (lines++ >= con_h || len >= con_w)
+		return lines;
+	printf("\033[7m");
+	ret = printf("DRM minor %u", c->drm_minor);
+	n_spaces(con_w - ret);
+
+	if (lines++ >= con_h)
+		return lines;
+	printf("\n%s", pidname);
+
+	if (c->engines->num_engines) {
+		unsigned int i;
+		int width;
+
+		*engine_w = width = (con_w - len) / c->engines->num_engines;
+
+		for (i = 0; i <= c->engines->max_engine_id; i++) {
+			const char *name = c->engines->names[i];
+			int name_len = strlen(name);
+			int pad = (width - name_len) / 2;
+			int spaces = width - pad - name_len;
+
+			if (!name)
+				continue;
+
+			if (pad < 0 || spaces < 0)
+				continue;
+
+			n_spaces(pad);
+			printf("%s", name);
+			n_spaces(spaces);
+			len += pad + name_len + spaces;
+		}
+	}
+
+	n_spaces(con_w - len);
+	printf("\033[0m\n");
+
+	return lines;
+}
+
+
+static bool
+newheader(const struct igt_drm_client *c, const struct igt_drm_client *pc)
+{
+	return !pc || c->drm_minor != pc->drm_minor;
+}
+
+static int
+print_client(struct igt_drm_client *c, struct igt_drm_client **prevc,
+	     double t, int lines, int con_w, int con_h,
+	     unsigned int period_us, int *engine_w)
+{
+	unsigned int i;
+
+	/* Filter out idle clients. */
+	if (!c->total_runtime || c->samples < 2)
+		return lines;
+
+	/* Print header when moving to a different DRM card. */
+	if (newheader(c, *prevc)) {
+		lines = print_client_header(c, lines, con_w, con_h, engine_w);
+		if (lines >= con_h)
+			return lines;
+	}
+
+	*prevc = c;
+
+	printf("%8u %17s ", c->pid, c->print_name);
+	lines++;
+
+	for (i = 0; c->samples > 1 && i <= c->engines->max_engine_id; i++) {
+		double pct;
+
+		if (!c->engines->capacity[i])
+			continue;
+
+		pct = (double)c->val[i] / period_us / 1e3 * 100 /
+		      c->engines->capacity[i];
+
+		/*
+		 * Guard against fluctuations between our scanning period and
+		 * GPU times as exported by the kernel in fdinfo.
+		 */
+		if (pct > 100.0)
+			pct = 100.0;
+
+		print_percentage_bar(pct, *engine_w);
+	}
+
+	putchar('\n');
+
+	return lines;
+}
+
+static int
+__client_id_cmp(const struct igt_drm_client *a,
+		const struct igt_drm_client *b)
+{
+	if (a->id > b->id)
+		return 1;
+	else if (a->id < b->id)
+		return -1;
+	else
+		return 0;
+}
+
+static int client_cmp(const void *_a, const void *_b, void *unused)
+{
+	const struct igt_drm_client *a = _a;
+	const struct igt_drm_client *b = _b;
+	long val_a, val_b;
+
+	/* DRM cards into consecutive buckets first. */
+	val_a = a->drm_minor;
+	val_b = b->drm_minor;
+	if (val_a > val_b)
+		return 1;
+	else if (val_b > val_a)
+		return -1;
+
+	/*
+	 * Within buckets sort by last sampling period aggregated runtime, with
+	 * client id as a tie-breaker.
+	 */
+	val_a = a->last_runtime;
+	val_b = b->last_runtime;
+	if (val_a == val_b)
+		return __client_id_cmp(a, b);
+	else if (val_b > val_a)
+		return 1;
+	else
+		return -1;
+
+}
+
+int main(int argc, char **argv)
+{
+	unsigned int period_us = 2e6;
+	struct igt_drm_clients *clients = NULL;
+	int con_w = -1, con_h = -1;
+
+	clients = igt_drm_clients_init(NULL);
+	if (!clients)
+		exit(1);
+
+	igt_drm_clients_scan(clients, NULL, NULL, 0);
+
+	for (;;) {
+		struct igt_drm_client *c, *prevc = NULL;
+		int i, engine_w = 0, lines = 0;
+		struct winsize ws;
+
+		if (ioctl(0, TIOCGWINSZ, &ws) != -1) {
+			con_w = ws.ws_col;
+			con_h = ws.ws_row;
+			if (con_w == 0 && con_h == 0) {
+				/* Serial console. */
+				con_w = 80;
+				con_h = 24;
+			}
+		}
+
+		igt_drm_clients_scan(clients, NULL, NULL, 0);
+		igt_drm_clients_sort(clients, client_cmp);
+
+		printf("\033[H\033[J");
+
+		igt_for_each_drm_client(clients, c, i) {
+			assert(c->status != IGT_DRM_CLIENT_PROBE);
+			if (c->status != IGT_DRM_CLIENT_ALIVE)
+				break; /* Active clients are first in the array. */
+
+			lines = print_client(c, &prevc, (double)period_us / 1e6,
+					     lines, con_w, con_h, period_us,
+					     &engine_w);
+			if (lines >= con_h)
+				break;
+		}
+
+		if (lines++ < con_h)
+			printf("\n");
+
+		usleep(period_us);
+	}
+
+	return 0;
+}
tools/meson.build +5 -0
index c6194fd15daa..0a3973dee90d 100644
@@ -65,6 +65,11 @@ if libudev.found()
 		   install : true)
 endif
 
+executable('gputop', 'gputop.c',
+           install : true,
+           install_rpath : bindir_rpathdir,
+           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
+
 intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
 executable('intel_l3_parity', sources : intel_l3_parity_src,
 	   dependencies : tool_deps,
Signature · 1 line
2.34.1
#9 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Hi Tvrtko,

Quoted 10 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

Quoted 7 lines

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

I run it with:

# ./gputop

but it do not work on my Skylake card, I see no output, kernel 5.19.0-29-generic, ubuntu 22.10

# ./lsgpu
card0                    Intel Skylake (Gen9)              drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128

Please add some options like debug, version, debug with high verbose level, help. It seems like q or Q do not exit.

Regards,
Kamil

Quoted 291 lines
---
 tools/gputop.c    | 260 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/meson.build |   5 +
 2 files changed, 265 insertions(+)
 create mode 100644 tools/gputop.c
tools/gputop.c new file +260 -0
new file mode 100644
index 000000000000..d259cac1ab17
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <poll.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>
+#include <sys/sysmacros.h>
+#include <stdbool.h>
+
+#include "igt_drm_clients.h"
+#include "igt_drm_fdinfo.h"
+
+static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+
+static void n_spaces(const unsigned int n)
+{
+	unsigned int i;
+
+	for (i = 0; i < n; i++)
+		putchar(' ');
+}
+
+static void print_percentage_bar(double percent, int max_len)
+{
+	int bar_len, i, len = max_len - 2;
+	const int w = 8;
+
+	assert(max_len > 0);
+
+	bar_len = ceil(w * percent * len / 100.0);
+	if (bar_len > w * len)
+		bar_len = w * len;
+
+	putchar('|');
+
+	for (i = bar_len; i >= w; i -= w)
+		printf("%s", bars[w]);
+	if (i)
+		printf("%s", bars[i]);
+
+	len -= (bar_len + (w - 1)) / w;
+	n_spaces(len);
+
+	putchar('|');
+}
+
+static int
+print_client_header(struct igt_drm_client *c, int lines, int con_w, int con_h,
+		    int *engine_w)
+{
+	const char *pidname = "    PID               NAME ";
+	int ret, len = strlen(pidname);
+
+	if (lines++ >= con_h || len >= con_w)
+		return lines;
+	printf("\033[7m");
+	ret = printf("DRM minor %u", c->drm_minor);
+	n_spaces(con_w - ret);
+
+	if (lines++ >= con_h)
+		return lines;
+	printf("\n%s", pidname);
+
+	if (c->engines->num_engines) {
+		unsigned int i;
+		int width;
+
+		*engine_w = width = (con_w - len) / c->engines->num_engines;
+
+		for (i = 0; i <= c->engines->max_engine_id; i++) {
+			const char *name = c->engines->names[i];
+			int name_len = strlen(name);
+			int pad = (width - name_len) / 2;
+			int spaces = width - pad - name_len;
+
+			if (!name)
+				continue;
+
+			if (pad < 0 || spaces < 0)
+				continue;
+
+			n_spaces(pad);
+			printf("%s", name);
+			n_spaces(spaces);
+			len += pad + name_len + spaces;
+		}
+	}
+
+	n_spaces(con_w - len);
+	printf("\033[0m\n");
+
+	return lines;
+}
+
+
+static bool
+newheader(const struct igt_drm_client *c, const struct igt_drm_client *pc)
+{
+	return !pc || c->drm_minor != pc->drm_minor;
+}
+
+static int
+print_client(struct igt_drm_client *c, struct igt_drm_client **prevc,
+	     double t, int lines, int con_w, int con_h,
+	     unsigned int period_us, int *engine_w)
+{
+	unsigned int i;
+
+	/* Filter out idle clients. */
+	if (!c->total_runtime || c->samples < 2)
+		return lines;
+
+	/* Print header when moving to a different DRM card. */
+	if (newheader(c, *prevc)) {
+		lines = print_client_header(c, lines, con_w, con_h, engine_w);
+		if (lines >= con_h)
+			return lines;
+	}
+
+	*prevc = c;
+
+	printf("%8u %17s ", c->pid, c->print_name);
+	lines++;
+
+	for (i = 0; c->samples > 1 && i <= c->engines->max_engine_id; i++) {
+		double pct;
+
+		if (!c->engines->capacity[i])
+			continue;
+
+		pct = (double)c->val[i] / period_us / 1e3 * 100 /
+		      c->engines->capacity[i];
+
+		/*
+		 * Guard against fluctuations between our scanning period and
+		 * GPU times as exported by the kernel in fdinfo.
+		 */
+		if (pct > 100.0)
+			pct = 100.0;
+
+		print_percentage_bar(pct, *engine_w);
+	}
+
+	putchar('\n');
+
+	return lines;
+}
+
+static int
+__client_id_cmp(const struct igt_drm_client *a,
+		const struct igt_drm_client *b)
+{
+	if (a->id > b->id)
+		return 1;
+	else if (a->id < b->id)
+		return -1;
+	else
+		return 0;
+}
+
+static int client_cmp(const void *_a, const void *_b, void *unused)
+{
+	const struct igt_drm_client *a = _a;
+	const struct igt_drm_client *b = _b;
+	long val_a, val_b;
+
+	/* DRM cards into consecutive buckets first. */
+	val_a = a->drm_minor;
+	val_b = b->drm_minor;
+	if (val_a > val_b)
+		return 1;
+	else if (val_b > val_a)
+		return -1;
+
+	/*
+	 * Within buckets sort by last sampling period aggregated runtime, with
+	 * client id as a tie-breaker.
+	 */
+	val_a = a->last_runtime;
+	val_b = b->last_runtime;
+	if (val_a == val_b)
+		return __client_id_cmp(a, b);
+	else if (val_b > val_a)
+		return 1;
+	else
+		return -1;
+
+}
+
+int main(int argc, char **argv)
+{
+	unsigned int period_us = 2e6;
+	struct igt_drm_clients *clients = NULL;
+	int con_w = -1, con_h = -1;
+
+	clients = igt_drm_clients_init(NULL);
+	if (!clients)
+		exit(1);
+
+	igt_drm_clients_scan(clients, NULL, NULL, 0);
+
+	for (;;) {
+		struct igt_drm_client *c, *prevc = NULL;
+		int i, engine_w = 0, lines = 0;
+		struct winsize ws;
+
+		if (ioctl(0, TIOCGWINSZ, &ws) != -1) {
+			con_w = ws.ws_col;
+			con_h = ws.ws_row;
+			if (con_w == 0 && con_h == 0) {
+				/* Serial console. */
+				con_w = 80;
+				con_h = 24;
+			}
+		}
+
+		igt_drm_clients_scan(clients, NULL, NULL, 0);
+		igt_drm_clients_sort(clients, client_cmp);
+
+		printf("\033[H\033[J");
+
+		igt_for_each_drm_client(clients, c, i) {
+			assert(c->status != IGT_DRM_CLIENT_PROBE);
+			if (c->status != IGT_DRM_CLIENT_ALIVE)
+				break; /* Active clients are first in the array. */
+
+			lines = print_client(c, &prevc, (double)period_us / 1e6,
+					     lines, con_w, con_h, period_us,
+					     &engine_w);
+			if (lines >= con_h)
+				break;
+		}
+
+		if (lines++ < con_h)
+			printf("\n");
+
+		usleep(period_us);
+	}
+
+	return 0;
+}
tools/meson.build +5 -0
index c6194fd15daa..0a3973dee90d 100644
@@ -65,6 +65,11 @@ if libudev.found()
 		   install : true)
 endif
 
+executable('gputop', 'gputop.c',
+           install : true,
+           install_rpath : bindir_rpathdir,
+           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
+
 intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
 executable('intel_l3_parity', sources : intel_l3_parity_src,
 	   dependencies : tool_deps,
Signature · 1 line
2.34.1
#10 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Quoted 21 lines · Kamil Konieczny

Hi Tvrtko,

Quoted 10 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

Quoted 7 lines

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 5 lines

I run it with:

# ./gputop

but it do not work on my Skylake card, I see no output, kernel 5.19.0-29-generic, ubuntu 22.10

Odd, 5.19 should have the support. Intel_gpu_top works - it is showing the individual clients?

Quoted 7 lines
# ./lsgpu
card0                    Intel Skylake (Gen9)              drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128

Please add some options like debug, version, debug with high verbose level, help. It seems like q or Q do not exit.

As the cover letter hints I was only set out to demonstrate an extremely rudimentary vendor agnostic tool. To quote the cover letter more - "..It also makes no effort to provide sorting modes, well any interactivity, or any pretty names for GPUs or engines..". I have no scope presently to make it better or nicer.

The tool however can serve as a starting point and people had reported it working as-is with a few other drivers, AMD, msm and most recently I believe etnaviv. So perhaps a pool of people to further improve it will be found there in the future.

In summary I think it's worth reviewing so that the common code gets extracted from intel_gpu_top into respective libraries. After that I was hoping other people start contributing further improvements.

Regards,

Tvrtko

#11 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Hi Tvrtko,

Quoted 23 lines · Tvrtko Ursulin
Quoted 21 lines · Kamil Konieczny

Hi Tvrtko,

Quoted 17 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 8 lines
Quoted 5 lines

I run it with:

# ./gputop

but it do not work on my Skylake card, I see no output, kernel 5.19.0-29-generic, ubuntu 22.10

Odd, 5.19 should have the support. Intel_gpu_top works - it is showing the individual clients?

There is no display nor any gpu app running, when I run some igt tests then it does sometimes prints some activity. Intel_gpu_top works and shows headers and zero activity so it mislead me.

Quoted 20 lines
Quoted 8 lines

# ./lsgpu
card0                    Intel Skylake (Gen9)              drm:/dev/dri/card0
└─renderD128                                               drm:/dev/dri/renderD128

Please add some options like debug, version, debug with high verbose level, help. It seems like q or Q do not exit.

As the cover letter hints I was only set out to demonstrate an extremely rudimentary vendor agnostic tool. To quote the cover letter more - "..It also makes no effort to provide sorting modes, well any interactivity, or any pretty names for GPUs or engines..". I have no scope presently to make it better or nicer.

The tool however can serve as a starting point and people had reported it working as-is with a few other drivers, AMD, msm and most recently I believe etnaviv. So perhaps a pool of people to further improve it will be found there in the future.

Quoted 7 lines

In summary I think it's worth reviewing so that the common code gets extracted from intel_gpu_top into respective libraries. After that I was hoping other people start contributing further improvements.

Regards,

Tvrtko

I agree it is good starting point, it may have something like overall gpu activity, imho something which shows gpu % usage (mem % and power %) for all GPUs present.

Regards,
Kamil

Reviewed-by on v3 8/8
#12 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

In reply to Tvrtko Ursulin
Quoted 11 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

Quoted 7 lines

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 291 lines
---
 tools/gputop.c    | 260 ++++++++++++++++++++++++++++++++++++++++++++++
 tools/meson.build |   5 +
 2 files changed, 265 insertions(+)
 create mode 100644 tools/gputop.c
tools/gputop.c new file +260 -0
new file mode 100644
index 000000000000..d259cac1ab17
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <poll.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>
+#include <sys/sysmacros.h>
+#include <stdbool.h>
+
+#include "igt_drm_clients.h"
+#include "igt_drm_fdinfo.h"
+
+static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+
+static void n_spaces(const unsigned int n)
+{
+       unsigned int i;
+
+       for (i = 0; i < n; i++)
+               putchar(' ');
+}
+
+static void print_percentage_bar(double percent, int max_len)
+{
+       int bar_len, i, len = max_len - 2;
+       const int w = 8;
+
+       assert(max_len > 0);
+
+       bar_len = ceil(w * percent * len / 100.0);
+       if (bar_len > w * len)
+               bar_len = w * len;
+
+       putchar('|');
+
+       for (i = bar_len; i >= w; i -= w)
+               printf("%s", bars[w]);
+       if (i)
+               printf("%s", bars[i]);
+
+       len -= (bar_len + (w - 1)) / w;
+       n_spaces(len);
+
+       putchar('|');
+}
+
+static int
+print_client_header(struct igt_drm_client *c, int lines, int con_w, int con_h,
+                   int *engine_w)
+{
+       const char *pidname = "    PID               NAME ";
+       int ret, len = strlen(pidname);
+
+       if (lines++ >= con_h || len >= con_w)
+               return lines;
+       printf("\033[7m");
+       ret = printf("DRM minor %u", c->drm_minor);
+       n_spaces(con_w - ret);
+
+       if (lines++ >= con_h)
+               return lines;
+       printf("\n%s", pidname);
+
+       if (c->engines->num_engines) {
+               unsigned int i;
+               int width;
+
+               *engine_w = width = (con_w - len) / c->engines->num_engines;
+
+               for (i = 0; i <= c->engines->max_engine_id; i++) {
+                       const char *name = c->engines->names[i];
+                       int name_len = strlen(name);
+                       int pad = (width - name_len) / 2;
+                       int spaces = width - pad - name_len;
+
+                       if (!name)
+                               continue;
+
+                       if (pad < 0 || spaces < 0)
+                               continue;
+
+                       n_spaces(pad);
+                       printf("%s", name);
+                       n_spaces(spaces);
+                       len += pad + name_len + spaces;
+               }
+       }
+
+       n_spaces(con_w - len);
+       printf("\033[0m\n");
+
+       return lines;
+}
+
+
+static bool
+newheader(const struct igt_drm_client *c, const struct igt_drm_client *pc)
+{
+       return !pc || c->drm_minor != pc->drm_minor;
+}
+
+static int
+print_client(struct igt_drm_client *c, struct igt_drm_client **prevc,
+            double t, int lines, int con_w, int con_h,
+            unsigned int period_us, int *engine_w)
+{
+       unsigned int i;
+
+       /* Filter out idle clients. */
+       if (!c->total_runtime || c->samples < 2)
+               return lines;
+
+       /* Print header when moving to a different DRM card. */
+       if (newheader(c, *prevc)) {
+               lines = print_client_header(c, lines, con_w, con_h, engine_w);
+               if (lines >= con_h)
+                       return lines;
+       }
+
+       *prevc = c;
+
+       printf("%8u %17s ", c->pid, c->print_name);
+       lines++;
+
+       for (i = 0; c->samples > 1 && i <= c->engines->max_engine_id; i++) {
+               double pct;
+
+               if (!c->engines->capacity[i])
+                       continue;
+
+               pct = (double)c->val[i] / period_us / 1e3 * 100 /
+                     c->engines->capacity[i];
+
+               /*
+                * Guard against fluctuations between our scanning period and
+                * GPU times as exported by the kernel in fdinfo.
+                */
+               if (pct > 100.0)
+                       pct = 100.0;
+
+               print_percentage_bar(pct, *engine_w);
+       }
+
+       putchar('\n');
+
+       return lines;
+}
+
+static int
+__client_id_cmp(const struct igt_drm_client *a,
+               const struct igt_drm_client *b)
+{
+       if (a->id > b->id)
+               return 1;
+       else if (a->id < b->id)
+               return -1;
+       else
+               return 0;
+}
+
+static int client_cmp(const void *_a, const void *_b, void *unused)
+{
+       const struct igt_drm_client *a = _a;
+       const struct igt_drm_client *b = _b;
+       long val_a, val_b;
+
+       /* DRM cards into consecutive buckets first. */
+       val_a = a->drm_minor;
+       val_b = b->drm_minor;
+       if (val_a > val_b)
+               return 1;
+       else if (val_b > val_a)
+               return -1;
+
+       /*
+        * Within buckets sort by last sampling period aggregated runtime, with
+        * client id as a tie-breaker.
+        */
+       val_a = a->last_runtime;
+       val_b = b->last_runtime;
+       if (val_a == val_b)
+               return __client_id_cmp(a, b);
+       else if (val_b > val_a)
+               return 1;
+       else
+               return -1;
+
+}
+
+int main(int argc, char **argv)
+{
+       unsigned int period_us = 2e6;
+       struct igt_drm_clients *clients = NULL;
+       int con_w = -1, con_h = -1;
+
+       clients = igt_drm_clients_init(NULL);
+       if (!clients)
+               exit(1);
+
+       igt_drm_clients_scan(clients, NULL, NULL, 0);
+
+       for (;;) {
+               struct igt_drm_client *c, *prevc = NULL;
+               int i, engine_w = 0, lines = 0;
+               struct winsize ws;
+
+               if (ioctl(0, TIOCGWINSZ, &ws) != -1) {
+                       con_w = ws.ws_col;
+                       con_h = ws.ws_row;
+                       if (con_w == 0 && con_h == 0) {
+                               /* Serial console. */
+                               con_w = 80;
+                               con_h = 24;
+                       }
+               }
+
+               igt_drm_clients_scan(clients, NULL, NULL, 0);
+               igt_drm_clients_sort(clients, client_cmp);
+
+               printf("\033[H\033[J");
+
+               igt_for_each_drm_client(clients, c, i) {
+                       assert(c->status != IGT_DRM_CLIENT_PROBE);
+                       if (c->status != IGT_DRM_CLIENT_ALIVE)
+                               break; /* Active clients are first in the array. */
+
+                       lines = print_client(c, &prevc, (double)period_us / 1e6,
+                                            lines, con_w, con_h, period_us,
+                                            &engine_w);
+                       if (lines >= con_h)
+                               break;
+               }
+
+               if (lines++ < con_h)
+                       printf("\n");
+
+               usleep(period_us);
+       }
+
+       return 0;
+}
tools/meson.build +5 -1
index c6194fd15daa..0a3973dee90d 100644
@@ -65,6 +65,11 @@ if libudev.found()
                   install : true)
 endif
 
+executable('gputop', 'gputop.c',
+           install : true,
+           install_rpath : bindir_rpathdir,
+           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
+
 intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
 executable('intel_l3_parity', sources : intel_l3_parity_src,
           dependencies : tool_deps,
--

2.34.1

#13 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Quoted 16 lines · Rob Clark
Quoted 14 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 6 lines
Quoted 4 lines

Presumably for 8/8 only?

The rest of the series does not apply any more by now. I need to rebase..

Regards,

Tvrtko

Quoted 292 lines
Quoted 292 lines
---
  tools/gputop.c    | 260 ++++++++++++++++++++++++++++++++++++++++++++++
  tools/meson.build |   5 +
  2 files changed, 265 insertions(+)

create mode 100644 tools/gputop.c

tools/gputop.c new file +260 -0
new file mode 100644
index 000000000000..d259cac1ab17
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <poll.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>
+#include <sys/sysmacros.h>
+#include <stdbool.h>
+
+#include "igt_drm_clients.h"
+#include "igt_drm_fdinfo.h"
+
+static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+
+static void n_spaces(const unsigned int n)
+{
+       unsigned int i;
+
+       for (i = 0; i < n; i++)
+               putchar(' ');
+}
+
+static void print_percentage_bar(double percent, int max_len)
+{
+       int bar_len, i, len = max_len - 2;
+       const int w = 8;
+
+       assert(max_len > 0);
+
+       bar_len = ceil(w * percent * len / 100.0);
+       if (bar_len > w * len)
+               bar_len = w * len;
+
+       putchar('|');
+
+       for (i = bar_len; i >= w; i -= w)
+               printf("%s", bars[w]);
+       if (i)
+               printf("%s", bars[i]);
+
+       len -= (bar_len + (w - 1)) / w;
+       n_spaces(len);
+
+       putchar('|');
+}
+
+static int
+print_client_header(struct igt_drm_client *c, int lines, int con_w, int con_h,
+                   int *engine_w)
+{
+       const char *pidname = "    PID               NAME ";
+       int ret, len = strlen(pidname);
+
+       if (lines++ >= con_h || len >= con_w)
+               return lines;
+       printf("\033[7m");
+       ret = printf("DRM minor %u", c->drm_minor);
+       n_spaces(con_w - ret);
+
+       if (lines++ >= con_h)
+               return lines;
+       printf("\n%s", pidname);
+
+       if (c->engines->num_engines) {
+               unsigned int i;
+               int width;
+
+               *engine_w = width = (con_w - len) / c->engines->num_engines;
+
+               for (i = 0; i <= c->engines->max_engine_id; i++) {
+                       const char *name = c->engines->names[i];
+                       int name_len = strlen(name);
+                       int pad = (width - name_len) / 2;
+                       int spaces = width - pad - name_len;
+
+                       if (!name)
+                               continue;
+
+                       if (pad < 0 || spaces < 0)
+                               continue;
+
+                       n_spaces(pad);
+                       printf("%s", name);
+                       n_spaces(spaces);
+                       len += pad + name_len + spaces;
+               }
+       }
+
+       n_spaces(con_w - len);
+       printf("\033[0m\n");
+
+       return lines;
+}
+
+
+static bool
+newheader(const struct igt_drm_client *c, const struct igt_drm_client *pc)
+{
+       return !pc || c->drm_minor != pc->drm_minor;
+}
+
+static int
+print_client(struct igt_drm_client *c, struct igt_drm_client **prevc,
+            double t, int lines, int con_w, int con_h,
+            unsigned int period_us, int *engine_w)
+{
+       unsigned int i;
+
+       /* Filter out idle clients. */
+       if (!c->total_runtime || c->samples < 2)
+               return lines;
+
+       /* Print header when moving to a different DRM card. */
+       if (newheader(c, *prevc)) {
+               lines = print_client_header(c, lines, con_w, con_h, engine_w);
+               if (lines >= con_h)
+                       return lines;
+       }
+
+       *prevc = c;
+
+       printf("%8u %17s ", c->pid, c->print_name);
+       lines++;
+
+       for (i = 0; c->samples > 1 && i <= c->engines->max_engine_id; i++) {
+               double pct;
+
+               if (!c->engines->capacity[i])
+                       continue;
+
+               pct = (double)c->val[i] / period_us / 1e3 * 100 /
+                     c->engines->capacity[i];
+
+               /*
+                * Guard against fluctuations between our scanning period and
+                * GPU times as exported by the kernel in fdinfo.
+                */
+               if (pct > 100.0)
+                       pct = 100.0;
+
+               print_percentage_bar(pct, *engine_w);
+       }
+
+       putchar('\n');
+
+       return lines;
+}
+
+static int
+__client_id_cmp(const struct igt_drm_client *a,
+               const struct igt_drm_client *b)
+{
+       if (a->id > b->id)
+               return 1;
+       else if (a->id < b->id)
+               return -1;
+       else
+               return 0;
+}
+
+static int client_cmp(const void *_a, const void *_b, void *unused)
+{
+       const struct igt_drm_client *a = _a;
+       const struct igt_drm_client *b = _b;
+       long val_a, val_b;
+
+       /* DRM cards into consecutive buckets first. */
+       val_a = a->drm_minor;
+       val_b = b->drm_minor;
+       if (val_a > val_b)
+               return 1;
+       else if (val_b > val_a)
+               return -1;
+
+       /*
+        * Within buckets sort by last sampling period aggregated runtime, with
+        * client id as a tie-breaker.
+        */
+       val_a = a->last_runtime;
+       val_b = b->last_runtime;
+       if (val_a == val_b)
+               return __client_id_cmp(a, b);
+       else if (val_b > val_a)
+               return 1;
+       else
+               return -1;
+
+}
+
+int main(int argc, char **argv)
+{
+       unsigned int period_us = 2e6;
+       struct igt_drm_clients *clients = NULL;
+       int con_w = -1, con_h = -1;
+
+       clients = igt_drm_clients_init(NULL);
+       if (!clients)
+               exit(1);
+
+       igt_drm_clients_scan(clients, NULL, NULL, 0);
+
+       for (;;) {
+               struct igt_drm_client *c, *prevc = NULL;
+               int i, engine_w = 0, lines = 0;
+               struct winsize ws;
+
+               if (ioctl(0, TIOCGWINSZ, &ws) != -1) {
+                       con_w = ws.ws_col;
+                       con_h = ws.ws_row;
+                       if (con_w == 0 && con_h == 0) {
+                               /* Serial console. */
+                               con_w = 80;
+                               con_h = 24;
+                       }
+               }
+
+               igt_drm_clients_scan(clients, NULL, NULL, 0);
+               igt_drm_clients_sort(clients, client_cmp);
+
+               printf("\033[H\033[J");
+
+               igt_for_each_drm_client(clients, c, i) {
+                       assert(c->status != IGT_DRM_CLIENT_PROBE);
+                       if (c->status != IGT_DRM_CLIENT_ALIVE)
+                               break; /* Active clients are first in the array. */
+
+                       lines = print_client(c, &prevc, (double)period_us / 1e6,
+                                            lines, con_w, con_h, period_us,
+                                            &engine_w);
+                       if (lines >= con_h)
+                               break;
+               }
+
+               if (lines++ < con_h)
+                       printf("\n");
+
+               usleep(period_us);
+       }
+
+       return 0;
+}
tools/meson.build +5 -1
index c6194fd15daa..0a3973dee90d 100644
@@ -65,6 +65,11 @@ if libudev.found()
                    install : true)
  endif
 
+executable('gputop', 'gputop.c',
+           install : true,
+           install_rpath : bindir_rpathdir,
+           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
+
  intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
  executable('intel_l3_parity', sources : intel_l3_parity_src,
            dependencies : tool_deps,
--

2.34.1

#14 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Quoted 24 lines · Tvrtko Ursulin
Quoted 21 lines · Rob Clark
Quoted 18 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 5 lines
Quoted 1 line

Presumably for 8/8 only?

The rest of the series does not apply any more by now. I need to rebase..

I didn't look closely at the rest of the series (was kinda assuming that was mostly just moving things around).. but I see you rebased it so I can take a look.

BR,
-R

Quoted 296 lines

Regards,

Tvrtko

Quoted 292 lines
Quoted 292 lines
---
  tools/gputop.c    | 260 ++++++++++++++++++++++++++++++++++++++++++++++
  tools/meson.build |   5 +
  2 files changed, 265 insertions(+)

create mode 100644 tools/gputop.c

tools/gputop.c new file +260 -0
new file mode 100644
index 000000000000..d259cac1ab17
@@ -0,0 +1,260 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2022 Intel Corporation
+ */
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
+#include <limits.h>
+#include <locale.h>
+#include <math.h>
+#include <poll.h>
+#include <signal.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <termios.h>
+#include <sys/sysmacros.h>
+#include <stdbool.h>
+
+#include "igt_drm_clients.h"
+#include "igt_drm_fdinfo.h"
+
+static const char *bars[] = { " ", "▏", "▎", "▍", "▌", "▋", "▊", "▉", "█" };
+
+static void n_spaces(const unsigned int n)
+{
+       unsigned int i;
+
+       for (i = 0; i < n; i++)
+               putchar(' ');
+}
+
+static void print_percentage_bar(double percent, int max_len)
+{
+       int bar_len, i, len = max_len - 2;
+       const int w = 8;
+
+       assert(max_len > 0);
+
+       bar_len = ceil(w * percent * len / 100.0);
+       if (bar_len > w * len)
+               bar_len = w * len;
+
+       putchar('|');
+
+       for (i = bar_len; i >= w; i -= w)
+               printf("%s", bars[w]);
+       if (i)
+               printf("%s", bars[i]);
+
+       len -= (bar_len + (w - 1)) / w;
+       n_spaces(len);
+
+       putchar('|');
+}
+
+static int
+print_client_header(struct igt_drm_client *c, int lines, int con_w, int con_h,
+                   int *engine_w)
+{
+       const char *pidname = "    PID               NAME ";
+       int ret, len = strlen(pidname);
+
+       if (lines++ >= con_h || len >= con_w)
+               return lines;
+       printf("\033[7m");
+       ret = printf("DRM minor %u", c->drm_minor);
+       n_spaces(con_w - ret);
+
+       if (lines++ >= con_h)
+               return lines;
+       printf("\n%s", pidname);
+
+       if (c->engines->num_engines) {
+               unsigned int i;
+               int width;
+
+               *engine_w = width = (con_w - len) / c->engines->num_engines;
+
+               for (i = 0; i <= c->engines->max_engine_id; i++) {
+                       const char *name = c->engines->names[i];
+                       int name_len = strlen(name);
+                       int pad = (width - name_len) / 2;
+                       int spaces = width - pad - name_len;
+
+                       if (!name)
+                               continue;
+
+                       if (pad < 0 || spaces < 0)
+                               continue;
+
+                       n_spaces(pad);
+                       printf("%s", name);
+                       n_spaces(spaces);
+                       len += pad + name_len + spaces;
+               }
+       }
+
+       n_spaces(con_w - len);
+       printf("\033[0m\n");
+
+       return lines;
+}
+
+
+static bool
+newheader(const struct igt_drm_client *c, const struct igt_drm_client *pc)
+{
+       return !pc || c->drm_minor != pc->drm_minor;
+}
+
+static int
+print_client(struct igt_drm_client *c, struct igt_drm_client **prevc,
+            double t, int lines, int con_w, int con_h,
+            unsigned int period_us, int *engine_w)
+{
+       unsigned int i;
+
+       /* Filter out idle clients. */
+       if (!c->total_runtime || c->samples < 2)
+               return lines;
+
+       /* Print header when moving to a different DRM card. */
+       if (newheader(c, *prevc)) {
+               lines = print_client_header(c, lines, con_w, con_h, engine_w);
+               if (lines >= con_h)
+                       return lines;
+       }
+
+       *prevc = c;
+
+       printf("%8u %17s ", c->pid, c->print_name);
+       lines++;
+
+       for (i = 0; c->samples > 1 && i <= c->engines->max_engine_id; i++) {
+               double pct;
+
+               if (!c->engines->capacity[i])
+                       continue;
+
+               pct = (double)c->val[i] / period_us / 1e3 * 100 /
+                     c->engines->capacity[i];
+
+               /*
+                * Guard against fluctuations between our scanning period and
+                * GPU times as exported by the kernel in fdinfo.
+                */
+               if (pct > 100.0)
+                       pct = 100.0;
+
+               print_percentage_bar(pct, *engine_w);
+       }
+
+       putchar('\n');
+
+       return lines;
+}
+
+static int
+__client_id_cmp(const struct igt_drm_client *a,
+               const struct igt_drm_client *b)
+{
+       if (a->id > b->id)
+               return 1;
+       else if (a->id < b->id)
+               return -1;
+       else
+               return 0;
+}
+
+static int client_cmp(const void *_a, const void *_b, void *unused)
+{
+       const struct igt_drm_client *a = _a;
+       const struct igt_drm_client *b = _b;
+       long val_a, val_b;
+
+       /* DRM cards into consecutive buckets first. */
+       val_a = a->drm_minor;
+       val_b = b->drm_minor;
+       if (val_a > val_b)
+               return 1;
+       else if (val_b > val_a)
+               return -1;
+
+       /*
+        * Within buckets sort by last sampling period aggregated runtime, with
+        * client id as a tie-breaker.
+        */
+       val_a = a->last_runtime;
+       val_b = b->last_runtime;
+       if (val_a == val_b)
+               return __client_id_cmp(a, b);
+       else if (val_b > val_a)
+               return 1;
+       else
+               return -1;
+
+}
+
+int main(int argc, char **argv)
+{
+       unsigned int period_us = 2e6;
+       struct igt_drm_clients *clients = NULL;
+       int con_w = -1, con_h = -1;
+
+       clients = igt_drm_clients_init(NULL);
+       if (!clients)
+               exit(1);
+
+       igt_drm_clients_scan(clients, NULL, NULL, 0);
+
+       for (;;) {
+               struct igt_drm_client *c, *prevc = NULL;
+               int i, engine_w = 0, lines = 0;
+               struct winsize ws;
+
+               if (ioctl(0, TIOCGWINSZ, &ws) != -1) {
+                       con_w = ws.ws_col;
+                       con_h = ws.ws_row;
+                       if (con_w == 0 && con_h == 0) {
+                               /* Serial console. */
+                               con_w = 80;
+                               con_h = 24;
+                       }
+               }
+
+               igt_drm_clients_scan(clients, NULL, NULL, 0);
+               igt_drm_clients_sort(clients, client_cmp);
+
+               printf("\033[H\033[J");
+
+               igt_for_each_drm_client(clients, c, i) {
+                       assert(c->status != IGT_DRM_CLIENT_PROBE);
+                       if (c->status != IGT_DRM_CLIENT_ALIVE)
+                               break; /* Active clients are first in the array. */
+
+                       lines = print_client(c, &prevc, (double)period_us / 1e6,
+                                            lines, con_w, con_h, period_us,
+                                            &engine_w);
+                       if (lines >= con_h)
+                               break;
+               }
+
+               if (lines++ < con_h)
+                       printf("\n");
+
+               usleep(period_us);
+       }
+
+       return 0;
+}
tools/meson.build +5 -1
index c6194fd15daa..0a3973dee90d 100644
@@ -65,6 +65,11 @@ if libudev.found()
                    install : true)
  endif
 
+executable('gputop', 'gputop.c',
+           install : true,
+           install_rpath : bindir_rpathdir,
+           dependencies : [lib_igt_drm_clients,lib_igt_drm_fdinfo,math])
+
  intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ]
  executable('intel_l3_parity', sources : intel_l3_parity_src,
            dependencies : tool_deps,
--

2.34.1

#15 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Quoted 28 lines · Rob Clark
Quoted 26 lines · Tvrtko Ursulin
Quoted 22 lines · Rob Clark
Quoted 11 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

Quoted 7 lines

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 7 lines
Quoted 3 lines

Presumably for 8/8 only?

The rest of the series does not apply any more by now. I need to rebase..

I didn't look closely at the rest of the series (was kinda assuming that was mostly just moving things around).. but I see you rebased it so I can take a look.

There's a lot in there - first patch is extracting some code into a library, with the corresponding renames, but then there are six patches of tweaks and feature additions which finally make gputop possible.

Hopefully you can penetrate the concepts. It was all at least Valgrind clean back in the day I first did it.

Regards,

Tvrtko

#16 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Quoted 39 lines · Tvrtko Ursulin
Quoted 28 lines · Rob Clark
Quoted 26 lines · Tvrtko Ursulin
Quoted 22 lines · Rob Clark
Quoted 11 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

Quoted 7 lines

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 7 lines
Quoted 3 lines

Presumably for 8/8 only?

The rest of the series does not apply any more by now. I need to rebase..

I didn't look closely at the rest of the series (was kinda assuming that was mostly just moving things around).. but I see you rebased it so I can take a look.

Quoted 7 lines

There's a lot in there - first patch is extracting some code into a library, with the corresponding renames, but then there are six patches of tweaks and feature additions which finally make gputop possible.

Hopefully you can penetrate the concepts. It was all at least Valgrind clean back in the day I first did it.

by now I've read (and rebased locally) the series, and even added a couple things on top.. so r-b for the series, we should get this landed

BR,
-R

#17 lore raw

Re: [igt-dev] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool

Quoted 45 lines · Rob Clark
Quoted 43 lines · Tvrtko Ursulin
Quoted 28 lines · Rob Clark
Quoted 26 lines · Tvrtko Ursulin
Quoted 22 lines · Rob Clark
Quoted 11 lines · Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs.

Borrows a bit of code from intel_gpu_top but for now omits the fancy features like interactive functionality, card selection, client aggregation, sort modes, JSON output and pretty engine names. Also no support for global GPU or system metrics.

Quoted 7 lines

On the other hand it shows clients from all DRM cards which intel_gpu_top does not do.

Quoted 7 lines
Quoted 3 lines

Presumably for 8/8 only?

The rest of the series does not apply any more by now. I need to rebase..

I didn't look closely at the rest of the series (was kinda assuming that was mostly just moving things around).. but I see you rebased it so I can take a look.

There's a lot in there - first patch is extracting some code into a library, with the corresponding renames, but then there are six patches of tweaks and feature additions which finally make gputop possible.

Quoted 7 lines
Quoted 3 lines

Hopefully you can penetrate the concepts. It was all at least Valgrind clean back in the day I first did it.

by now I've read (and rebased locally) the series, and even added a couple things on top.. so r-b for the series, we should get this landed

Thanks for the reviews, pushed!

Lets see if the future holds for this small tool.

Regards,

Tvrtko

#18 lore raw

[igt-dev] ✓ Fi.CI.BAT: success for Vendor agnostic gputop (rev5)

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: Vendor agnostic gputop (rev5)
URL : https://patchwork.freedesktop.org/series/102175/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12672 -> IGTPW_8420
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (26 -> 25)
------------------------------

Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size:
- fi-bsw-n3050: [PASS][1] -> [FAIL][2] ([i915#6298])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/fi-bsw-n3050/igt@kms_cursor_legacy@basic-busy-flip-before-cursor@atomic-transitions-varying-size.html

#### Possible fixes ####

* igt@fbdev@write:
- fi-blb-e6850: [SKIP][3] ([fdo#109271]) -> [PASS][4] +4 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/fi-blb-e6850/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/fi-blb-e6850/igt@[email protected]

* igt@i915_pm_rpm@basic-rte:
- {bat-adlp-6}: [ABORT][5] ([i915#7977]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/bat-adlp-6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/bat-adlp-6/igt@[email protected]

* igt@i915_selftest@live@hangcheck:
- {bat-dg2-8}: [ABORT][7] -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/bat-dg2-8/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/bat-dg2-8/igt@i915_selftest@[email protected]

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

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6298]: https://gitlab.freedesktop.org/drm/intel/issues/6298
[i915#6311]: https://gitlab.freedesktop.org/drm/intel/issues/6311
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#6997]: https://gitlab.freedesktop.org/drm/intel/issues/6997
[i915#7359]: https://gitlab.freedesktop.org/drm/intel/issues/7359
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7977]: https://gitlab.freedesktop.org/drm/intel/issues/7977

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

* CI: CI-20190529 -> None
* IGT: IGT_7143 -> IGTPW_8420

CI-20190529: 20190529
CI_DRM_12672: df5c31e78609626a1278ad79305cd408f403ceac @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8420: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/index.html
IGT_7143: c7b12dcc460fc2348e1fa7f4dcb791bb82e29e44 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

Testlist changes
----------------

-igt@perf@barrier-race
-igt@perf@open-race

== Logs ==

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

#19 lore raw

[igt-dev] ✓ Fi.CI.IGT: success for Vendor agnostic gputop (rev5)

In reply to Tvrtko Ursulin
== Series Details ==

== Series Details ==

Series: Vendor agnostic gputop (rev5)
URL : https://patchwork.freedesktop.org/series/102175/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12672_full -> IGTPW_8420_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

No changes in participating hosts

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

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

### IGT changes ###

#### Suppressed ####

The following results come from untrusted machines, tests, or statuses. They do not affect the overall result.

* igt@drm_fdinfo@busy-check-all:
- {shard-dg1}: NOTRUN -> [SKIP][1] +5 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-dg1-13/igt@[email protected]

* igt@drm_fdinfo@most-busy-check-all:
- {shard-dg1}: [SKIP][2] ([i915#5563]) -> [SKIP][3] +5 similar issues
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-dg1-17/igt@[email protected]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-dg1-18/igt@[email protected]

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-none-share@rcs0:
- shard-glk: [PASS][4] -> [FAIL][5] ([i915#2842]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-glk4/igt@gem_exec_fair@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-glk2/igt@gem_exec_fair@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][6] -> [FAIL][7] ([i915#79])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-glk4/igt@kms_flip@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-glk4/igt@kms_flip@[email protected]

#### Possible fixes ####

* igt@drm_read@empty-nonblock:
- {shard-tglu}: [SKIP][8] ([i915#1845] / [i915#7651]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-tglu-6/igt@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-tglu-7/igt@[email protected]

* igt@drm_read@invalid-buffer:
- {shard-tglu}: [SKIP][10] ([i915#1845]) -> [PASS][11] +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-tglu-6/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-tglu-3/igt@[email protected]

* igt@fbdev@pan:
- {shard-rkl}: [SKIP][12] ([i915#2582]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-3/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-3/igt@[email protected]

* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}: [FAIL][14] ([i915#6268]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-1/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][16] ([i915#2842]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-glk9/igt@gem_exec_fair@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-glk6/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-throttle@rcs0:
- {shard-rkl}: [FAIL][18] ([i915#2842]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-5/igt@gem_exec_fair@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_reloc@basic-wc-read-noreloc:
- {shard-rkl}: [SKIP][20] ([i915#3281]) -> [PASS][21] +7 similar issues
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-3/igt@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-5/igt@[email protected]

* igt@gem_pwrite_snooped:
- {shard-rkl}: [SKIP][22] ([i915#3282]) -> [PASS][23] +6 similar issues
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-3/igt@gem_pwrite_snooped.html
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-5/igt@gem_pwrite_snooped.html

* igt@gen9_exec_parse@bb-start-out:
- {shard-rkl}: [SKIP][24] ([i915#2527]) -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-6/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-5/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-idle@vcs0:
- {shard-rkl}: [WARN][26] ([i915#2681]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-5/igt@i915_pm_rc6_residency@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-1/igt@i915_pm_rc6_residency@[email protected]

* igt@i915_pm_rpm@pm-tiling:
- {shard-rkl}: [SKIP][28] ([fdo#109308]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-6/igt@[email protected]

* igt@kms_atomic@atomic_plane_damage:
- {shard-rkl}: [SKIP][30] ([i915#4098]) -> [PASS][31] +1 similar issue
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@kms_atomic@atomic_plane_damage.html
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-6/igt@kms_atomic@atomic_plane_damage.html

* igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc:
- {shard-tglu}: [SKIP][32] ([i915#7651]) -> [PASS][33] +6 similar issues
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-tglu-6/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc.html
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-tglu-4/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc.html

* igt@kms_fbcon_fbt@psr-suspend:
- {shard-rkl}: [SKIP][34] ([fdo#110189] / [i915#3955]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-1/igt@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt:
- {shard-rkl}: [SKIP][36] ([i915#1849] / [i915#4098]) -> [PASS][37] +12 similar issues
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-gtt.html

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render:
- {shard-tglu}: [SKIP][38] ([i915#1849]) -> [PASS][39] +2 similar issues
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-tglu-6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-tglu-1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-render.html

* igt@kms_plane@plane-position-covered@pipe-a-planes:
- {shard-tglu}: [SKIP][40] ([i915#1849] / [i915#3558]) -> [PASS][41] +1 similar issue
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-tglu-6/igt@kms_plane@[email protected]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-tglu-8/igt@kms_plane@[email protected]

* igt@kms_psr@sprite_plane_move:
- {shard-rkl}: [SKIP][42] ([i915#1072]) -> [PASS][43] +2 similar issues
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@kms_psr@sprite_plane_move.html
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-6/igt@kms_psr@sprite_plane_move.html

* igt@kms_pwrite_crc:
- {shard-rkl}: [SKIP][44] ([i915#1845] / [i915#4098]) -> [PASS][45] +20 similar issues
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@kms_pwrite_crc.html
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-6/igt@kms_pwrite_crc.html

* igt@perf@gen12-oa-tlb-invalidate:
- {shard-rkl}: [SKIP][46] ([fdo#109289]) -> [PASS][47] +1 similar issue
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-5/igt@[email protected]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-1/igt@[email protected]

* igt@perf_pmu@idle@rcs0:
- {shard-rkl}: [FAIL][48] ([i915#4349]) -> [PASS][49]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12672/shard-rkl-4/igt@perf_pmu@[email protected]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/shard-rkl-5/igt@perf_pmu@[email protected]

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

[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109291]: https://bugs.freedesktop.org/show_bug.cgi?id=109291
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109308]: https://bugs.freedesktop.org/show_bug.cgi?id=109308
[fdo#109312]: https://bugs.freedesktop.org/show_bug.cgi?id=109312
[fdo#109313]: https://bugs.freedesktop.org/show_bug.cgi?id=109313
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111644]: https://bugs.freedesktop.org/show_bug.cgi?id=111644
[fdo#111656]: https://bugs.freedesktop.org/show_bug.cgi?id=111656
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#1722]: https://gitlab.freedesktop.org/drm/intel/issues/1722
[i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2532]: https://gitlab.freedesktop.org/drm/intel/issues/2532
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
[i915#315]: https://gitlab.freedesktop.org/drm/intel/issues/315
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301
[i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3936]: https://gitlab.freedesktop.org/drm/intel/issues/3936
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#404]: https://gitlab.freedesktop.org/drm/intel/issues/404
[i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#426]: https://gitlab.freedesktop.org/drm/intel/issues/426
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4275]: https://gitlab.freedesktop.org/drm/intel/issues/4275
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4387]: https://gitlab.freedesktop.org/drm/intel/issues/4387
[i915#4391]: https://gitlab.freedesktop.org/drm/intel/issues/4391
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4879]: https://gitlab.freedesktop.org/drm/intel/issues/4879
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#4884]: https://gitlab.freedesktop.org/drm/intel/issues/4884
[i915#4958]: https://gitlab.freedesktop.org/drm/intel/issues/4958
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
[i915#5439]: https://gitlab.freedesktop.org/drm/intel/issues/5439
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6245]: https://gitlab.freedesktop.org/drm/intel/issues/6245
[i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
[i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6301]: https://gitlab.freedesktop.org/drm/intel/issues/6301
[i915#6335]: https://gitlab.freedesktop.org/drm/intel/issues/6335
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6768]: https://gitlab.freedesktop.org/drm/intel/issues/6768
[i915#6944]: https://gitlab.freedesktop.org/drm/intel/issues/6944
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7037]: https://gitlab.freedesktop.org/drm/intel/issues/7037
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7128]: https://gitlab.freedesktop.org/drm/intel/issues/7128
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7651]: https://gitlab.freedesktop.org/drm/intel/issues/7651
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7701]: https://gitlab.freedesktop.org/drm/intel/issues/7701
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7949]: https://gitlab.freedesktop.org/drm/intel/issues/7949
[i915#7957]: https://gitlab.freedesktop.org/drm/intel/issues/7957

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

* CI: CI-20190529 -> None
* IGT: IGT_7143 -> IGTPW_8420

CI-20190529: 20190529
CI_DRM_12672: df5c31e78609626a1278ad79305cd408f403ceac @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_8420: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8420/index.html
IGT_7143: c7b12dcc460fc2348e1fa7f4dcb791bb82e29e44 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

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