[PATCH igt 1/2] lib/i915: Add a query for when the guc is enabled.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Michał Winiarski <michal.winiarski@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux