summaryrefslogtreecommitdiff
path: root/lib/igt_gt.c
diff options
context:
space:
mode:
authorMichał Winiarski <michal.winiarski@intel.com>2017-10-18 10:02:12 +0200
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-10-19 09:57:58 +0300
commite2ee529bb96320da0968ae52d318883106f3fa55 (patch)
treee9ccb16ce24b72027f8a9abce82b887abc417b83 /lib/igt_gt.c
parentd4a4fbec0c079c7bec7fa6a2c756eea02314799e (diff)
lib/i915: Move submission related helpers to lib/i915/gem_submission
Since I accidentally broke the build for some, by putting the pretty printer for submission inside ifdef HAVE_PROCPS, it's time to move the whole thing into lib/i915 while fixing this mistake. Let's also rename the pretty printer and add a doc to it as well as the section. Fixes: f6dfe556659f ("lib: Extract helpers for determining submission method") Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/igt_gt.c')
-rw-r--r--lib/igt_gt.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 601b03f6..f6cc20b0 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -607,66 +607,3 @@ bool gem_can_store_dword(int fd, unsigned int engine)
return true;
}
-
-/**
- * gem_submission_method:
- * @fd: open i915 drm file descriptor
- *
- * Returns: Submission method bitmap.
- */
-unsigned gem_submission_method(int fd)
-{
- unsigned flags = 0;
- bool active;
- int dir;
-
- dir = igt_sysfs_open_parameters(fd);
- if (dir < 0)
- return 0;
-
- active = igt_sysfs_get_boolean(dir, "enable_guc_submission");
- if (active) {
- flags |= GEM_SUBMISSION_GUC | GEM_SUBMISSION_EXECLISTS;
- goto out;
- }
-
- active = igt_sysfs_get_boolean(dir, "enable_execlists");
- if (active) {
- flags |= GEM_SUBMISSION_EXECLISTS;
- goto out;
- }
-
- active = igt_sysfs_get_boolean(dir, "semaphores");
- if (active) {
- flags |= GEM_SUBMISSION_SEMAPHORES;
- }
-
-out:
- close(dir);
- return flags;
-}
-
-
-/**
- * gem_has_semaphores:
- * @fd: open i915 drm file descriptor
- *
- * Feature test macro to query whether the driver is using semaphores for
- * synchronization between engines.
- */
-bool gem_has_semaphores(int fd)
-{
- return gem_submission_method(fd) & GEM_SUBMISSION_SEMAPHORES;
-}
-
-/**
- * gem_has_execlists:
- * @fd: open i915 drm file descriptor
- *
- * Feature test macro to query whether the driver is using execlists as a
- * hardware submission method.
- */
-bool gem_has_execlists(int fd)
-{
- return gem_submission_method(fd) & GEM_SUBMISSION_EXECLISTS;
-}