Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Michał Winiarski <michal.winiar...@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 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx