[PATCH i-g-t v2 2/4] lib/igt_drm_clients: Add pdev and driver info

Vinay Belgaumkar vinay.belgaumkar at intel.com
Fri Dec 20 00:37:32 UTC 2024


This will be used for gathering PMU event information.

Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>

This will be used for gathering PMU event information.

Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
/igt_debugfs.c.orig
---
 lib/igt_drm_clients.c | 6 ++++++
 lib/igt_drm_clients.h | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/lib/igt_drm_clients.c b/lib/igt_drm_clients.c
index 858cd3645..e30e3243e 100644
--- a/lib/igt_drm_clients.c
+++ b/lib/igt_drm_clients.c
@@ -190,6 +190,12 @@ igt_drm_client_add(struct igt_drm_clients *clients,
 	c->drm_minor = drm_minor;
 	c->clients = clients;
 
+	/* Save driver and pdev info for later use */
+	if (info->driver && info->pdev) {
+		strncpy(c->driver, info->driver, sizeof(c->driver));
+		strncpy(c->pdev, info->pdev, sizeof(c->pdev));
+	}
+
 	/* Engines */
 	c->engines = calloc(1, sizeof(*c->engines));
 	assert(c->engines);
diff --git a/lib/igt_drm_clients.h b/lib/igt_drm_clients.h
index 946d709de..6d2a48997 100644
--- a/lib/igt_drm_clients.h
+++ b/lib/igt_drm_clients.h
@@ -86,6 +86,10 @@ struct igt_drm_client {
 		uint64_t last_total_cycles; /* Engine total cycles data as parsed from fdinfo. */
 	} *utilization; /* Array of engine utilization */
 
+	void *pmu_info; /* Pointer to structure that holds client PMU info */
+	char driver[128];
+	char pdev[128];
+
 	struct drm_client_meminfo *memory; /* Array of region memory utilisation as parsed from fdinfo. */
 };
 
-- 
2.38.1



More information about the igt-dev mailing list