From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [PATCH i-g-t 2/3] lib/i915: Report I915_SCHEDULER_CAP_ENGINE_BUSY_STATS Date: Thu, 4 Jul 2019 17:15:49 +0100 [thread overview] Message-ID: <20190704161550.15109-2-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20190704161550.15109-1-chris@chris-wilson.co.uk> Hook the new capability bit alongside the existing scheduler reporting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/i915/gem_scheduler.c | 15 +++++++++++++++ lib/i915/gem_scheduler.h | 1 + 2 files changed, 16 insertions(+) diff --git a/lib/i915/gem_scheduler.c b/lib/i915/gem_scheduler.c index 1ea910387..1beb85dec 100644 --- a/lib/i915/gem_scheduler.c +++ b/lib/i915/gem_scheduler.c @@ -118,6 +118,19 @@ bool gem_scheduler_has_semaphores(int fd) I915_SCHEDULER_CAP_SEMAPHORES; } +/** + * gem_scheduler_has_engine_busy_stats: + * @fd: open i915 drm file descriptor + * + * Feature test macro to query whether the driver supports reporting accurate + * per-engine utilisation. + */ +bool gem_scheduler_has_engine_busy_stats(int fd) +{ + return gem_scheduler_capability(fd) & + I915_SCHEDULER_CAP_ENGINE_BUSY_STATS; +} + /** * gem_scheduler_print_capability: * @fd: open i915 drm file descriptor @@ -138,4 +151,6 @@ void gem_scheduler_print_capability(int fd) igt_info(" - With preemption enabled\n"); if (caps & I915_SCHEDULER_CAP_SEMAPHORES) igt_info(" - With HW semaphores enabled\n"); + if (caps & I915_SCHEDULER_CAP_ENGINE_BUSY_STATS) + igt_info(" - With engine busy statistics\n"); } diff --git a/lib/i915/gem_scheduler.h b/lib/i915/gem_scheduler.h index f9049d128..14bd4cac4 100644 --- a/lib/i915/gem_scheduler.h +++ b/lib/i915/gem_scheduler.h @@ -31,6 +31,7 @@ bool gem_scheduler_enabled(int fd); bool gem_scheduler_has_ctx_priority(int fd); bool gem_scheduler_has_preemption(int fd); bool gem_scheduler_has_semaphores(int fd); +bool gem_scheduler_has_engine_busy_stats(int fd); void gem_scheduler_print_capability(int fd); #endif /* GEM_SCHEDULER_H */ -- 2.20.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: intel-gfx@lists.freedesktop.org Cc: igt-dev@lists.freedesktop.org Subject: [igt-dev] [PATCH i-g-t 2/3] lib/i915: Report I915_SCHEDULER_CAP_ENGINE_BUSY_STATS Date: Thu, 4 Jul 2019 17:15:49 +0100 [thread overview] Message-ID: <20190704161550.15109-2-chris@chris-wilson.co.uk> (raw) In-Reply-To: <20190704161550.15109-1-chris@chris-wilson.co.uk> Hook the new capability bit alongside the existing scheduler reporting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- lib/i915/gem_scheduler.c | 15 +++++++++++++++ lib/i915/gem_scheduler.h | 1 + 2 files changed, 16 insertions(+) diff --git a/lib/i915/gem_scheduler.c b/lib/i915/gem_scheduler.c index 1ea910387..1beb85dec 100644 --- a/lib/i915/gem_scheduler.c +++ b/lib/i915/gem_scheduler.c @@ -118,6 +118,19 @@ bool gem_scheduler_has_semaphores(int fd) I915_SCHEDULER_CAP_SEMAPHORES; } +/** + * gem_scheduler_has_engine_busy_stats: + * @fd: open i915 drm file descriptor + * + * Feature test macro to query whether the driver supports reporting accurate + * per-engine utilisation. + */ +bool gem_scheduler_has_engine_busy_stats(int fd) +{ + return gem_scheduler_capability(fd) & + I915_SCHEDULER_CAP_ENGINE_BUSY_STATS; +} + /** * gem_scheduler_print_capability: * @fd: open i915 drm file descriptor @@ -138,4 +151,6 @@ void gem_scheduler_print_capability(int fd) igt_info(" - With preemption enabled\n"); if (caps & I915_SCHEDULER_CAP_SEMAPHORES) igt_info(" - With HW semaphores enabled\n"); + if (caps & I915_SCHEDULER_CAP_ENGINE_BUSY_STATS) + igt_info(" - With engine busy statistics\n"); } diff --git a/lib/i915/gem_scheduler.h b/lib/i915/gem_scheduler.h index f9049d128..14bd4cac4 100644 --- a/lib/i915/gem_scheduler.h +++ b/lib/i915/gem_scheduler.h @@ -31,6 +31,7 @@ bool gem_scheduler_enabled(int fd); bool gem_scheduler_has_ctx_priority(int fd); bool gem_scheduler_has_preemption(int fd); bool gem_scheduler_has_semaphores(int fd); +bool gem_scheduler_has_engine_busy_stats(int fd); void gem_scheduler_print_capability(int fd); #endif /* GEM_SCHEDULER_H */ -- 2.20.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-07-04 16:15 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-04 16:15 [PATCH i-g-t 1/3] uapi/i915: Sync to bf73fc0fa9cf Chris Wilson 2019-07-04 16:15 ` [igt-dev] " Chris Wilson 2019-07-04 16:15 ` Chris Wilson [this message] 2019-07-04 16:15 ` [igt-dev] [PATCH i-g-t 2/3] lib/i915: Report I915_SCHEDULER_CAP_ENGINE_BUSY_STATS Chris Wilson 2019-07-04 16:15 ` [PATCH i-g-t 3/3] perf_pmu: Refine requirement testing for engine-busy-stats Chris Wilson 2019-07-04 16:15 ` [igt-dev] " Chris Wilson 2019-07-04 17:28 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] uapi/i915: Sync to bf73fc0fa9cf Patchwork 2019-07-05 23:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20190704161550.15109-2-chris@chris-wilson.co.uk \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@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.