Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
To: intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [PATCH i-g-t v2 2/4] lib/igt_drm_clients: Add pdev and driver info
Date: Thu, 19 Dec 2024 16:37:32 -0800	[thread overview]
Message-ID: <20241220003734.69174-3-vinay.belgaumkar@intel.com> (raw)
In-Reply-To: <20241220003734.69174-1-vinay.belgaumkar@intel.com>

This will be used for gathering PMU event information.

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

This will be used for gathering PMU event information.

Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@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


  parent reply	other threads:[~2024-12-20  0:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-20  0:37 [PATCH i-g-t v2 0/4] tools/gputop: Add PMU stats Vinay Belgaumkar
2024-12-20  0:37 ` [PATCH i-g-t v2 1/4] tools/gputop: Define data structs for " Vinay Belgaumkar
2024-12-20  0:37 ` Vinay Belgaumkar [this message]
2024-12-20  0:37 ` [PATCH i-g-t v2 3/4] lib/igt_perf: Add utils to extract PMU event info Vinay Belgaumkar
2024-12-20  0:37 ` [PATCH i-g-t v2 4/4] tools/gputop: Add GT freq and c6 stats Vinay Belgaumkar
2024-12-20 10:15 ` [PATCH i-g-t v2 0/4] tools/gputop: Add PMU stats Tvrtko Ursulin
2024-12-20 19:13   ` Rodrigo Vivi
2024-12-20 19:32     ` Lucas De Marchi
2024-12-22 17:47       ` Tvrtko Ursulin
2025-01-13 23:19       ` Belgaumkar, Vinay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241220003734.69174-3-vinay.belgaumkar@intel.com \
    --to=vinay.belgaumkar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox