[Intel-gfx] [PATCH igt 1/2] lib/i915: Add a query for when the guc is enabled.
Chris Wilson
chris at chris-wilson.co.uk
Tue Oct 24 15:29:02 UTC 2017
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski at intel.com>
---
lib/i915/gem_submission.c | 12 ++++++++++++
lib/i915/gem_submission.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index efc3151f..2a57e7ab 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -126,3 +126,15 @@ bool gem_has_execlists(int fd)
{
return gem_submission_method(fd) & GEM_SUBMISSION_EXECLISTS;
}
+
+/**
+ * gem_has_guc_submission:
+ * @fd: open i915 drm file descriptor
+ *
+ * Feature test macro to query whether the driver is using the GuC as a
+ * hardware submission method.
+ */
+bool gem_has_guc_submission(int fd)
+{
+ return gem_submission_method(fd) & GEM_SUBMISSION_GUC;
+}
diff --git a/lib/i915/gem_submission.h b/lib/i915/gem_submission.h
index 783ed7a0..4f588aec 100644
--- a/lib/i915/gem_submission.h
+++ b/lib/i915/gem_submission.h
@@ -31,5 +31,6 @@ unsigned gem_submission_method(int fd);
void gem_submission_print_method(int fd);
bool gem_has_semaphores(int fd);
bool gem_has_execlists(int fd);
+bool gem_has_guc_submission(int fd);
#endif /* GEM_SUBMISSION_H */
--
2.15.0.rc1
More information about the Intel-gfx
mailing list