From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t 5/8] lib/igt_drm_fdinfo: Track largest engine index Date: Tue, 31 Jan 2023 11:32:34 +0000 [thread overview] Message-ID: <20230131113237.3707217-6-tvrtko.ursulin@linux.intel.com> (raw) In-Reply-To: <20230131113237.3707217-1-tvrtko.ursulin@linux.intel.com> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Prep code for incoming work. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- lib/igt_drm_fdinfo.c | 2 ++ lib/igt_drm_fdinfo.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c index 68c89ad2c17e..b850d2210ae7 100644 --- a/lib/igt_drm_fdinfo.c +++ b/lib/igt_drm_fdinfo.c @@ -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, diff --git a/lib/igt_drm_fdinfo.h b/lib/igt_drm_fdinfo.h index fa4982f4030e..6284e05e868a 100644 --- a/lib/igt_drm_fdinfo.h +++ b/lib/igt_drm_fdinfo.h @@ -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]; -- 2.34.1
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Subject: [igt-dev] [PATCH i-g-t 5/8] lib/igt_drm_fdinfo: Track largest engine index Date: Tue, 31 Jan 2023 11:32:34 +0000 [thread overview] Message-ID: <20230131113237.3707217-6-tvrtko.ursulin@linux.intel.com> (raw) In-Reply-To: <20230131113237.3707217-1-tvrtko.ursulin@linux.intel.com> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Prep code for incoming work. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- lib/igt_drm_fdinfo.c | 2 ++ lib/igt_drm_fdinfo.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c index 68c89ad2c17e..b850d2210ae7 100644 --- a/lib/igt_drm_fdinfo.c +++ b/lib/igt_drm_fdinfo.c @@ -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, diff --git a/lib/igt_drm_fdinfo.h b/lib/igt_drm_fdinfo.h index fa4982f4030e..6284e05e868a 100644 --- a/lib/igt_drm_fdinfo.h +++ b/lib/igt_drm_fdinfo.h @@ -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]; -- 2.34.1
next prev parent reply other threads:[~2023-01-31 11:33 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-01-31 11:32 [Intel-gfx] [PATCH i-g-t v3 0/8] Vendor agnostic gputop Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 1/8] lib: Extract igt_drm_clients from intel_gpu_top Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 2/8] lib: Allow specifying custom engine map Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 3/8] lib/igt_drm_clients: Record client drm minor Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 4/8] lib/igt_drm_clients: Support multiple DRM cards Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` Tvrtko Ursulin [this message] 2023-01-31 11:32 ` [igt-dev] [PATCH i-g-t 5/8] lib/igt_drm_fdinfo: Track largest engine index Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 6/8] lib/igt_drm_clients: Decouple hardcoded engine assumptions Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 7/8] lib/igt_drm_clients: Enforce client status sort order in the library Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-01-31 11:32 ` [Intel-gfx] [PATCH i-g-t 8/8] gputop: Basic vendor agnostic GPU top tool Tvrtko Ursulin 2023-01-31 11:32 ` [igt-dev] " Tvrtko Ursulin 2023-02-03 16:42 ` [Intel-gfx] " Kamil Konieczny 2023-02-03 16:42 ` Kamil Konieczny 2023-02-06 9:19 ` [Intel-gfx] " Tvrtko Ursulin 2023-02-06 9:19 ` Tvrtko Ursulin 2023-02-06 14:04 ` [Intel-gfx] " Kamil Konieczny 2023-02-06 14:04 ` Kamil Konieczny 2023-04-05 17:57 ` [Intel-gfx] " Rob Clark 2023-04-05 17:57 ` [igt-dev] " Rob Clark 2023-04-06 11:08 ` [Intel-gfx] " Tvrtko Ursulin 2023-04-06 11:08 ` [igt-dev] " Tvrtko Ursulin 2023-04-06 14:21 ` [Intel-gfx] " Rob Clark 2023-04-06 14:21 ` Rob Clark 2023-04-06 14:31 ` [Intel-gfx] " Tvrtko Ursulin 2023-04-06 14:31 ` Tvrtko Ursulin 2023-05-12 14:18 ` [Intel-gfx] " Rob Clark 2023-05-12 14:18 ` Rob Clark 2023-05-15 11:10 ` [Intel-gfx] " Tvrtko Ursulin 2023-05-15 11:10 ` Tvrtko Ursulin 2023-01-31 12:14 ` [igt-dev] ✓ Fi.CI.BAT: success for Vendor agnostic gputop (rev5) Patchwork 2023-01-31 15:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2023-04-06 14:15 [Intel-gfx] [PATCH i-g-t v4 0/8] Vendor agnostic gputop Tvrtko Ursulin 2023-04-06 14:15 ` [Intel-gfx] [PATCH i-g-t 5/8] lib/igt_drm_fdinfo: Track largest engine index Tvrtko Ursulin 2023-04-17 10:57 [Intel-gfx] [PATCH i-g-t v5 0/8] Vendor agnostic gputop Tvrtko Ursulin 2023-04-17 10:57 ` [Intel-gfx] [PATCH i-g-t 5/8] lib/igt_drm_fdinfo: Track largest engine index Tvrtko Ursulin
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=20230131113237.3707217-6-tvrtko.ursulin@linux.intel.com \ --to=tvrtko.ursulin@linux.intel.com \ --cc=Intel-gfx@lists.freedesktop.org \ --cc=igt-dev@lists.freedesktop.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.