summaryrefslogtreecommitdiff
path: root/lib/ioctl_wrappers.c
diff options
context:
space:
mode:
authorAndi Shyti <andi.shyti@intel.com>2019-04-05 04:07:32 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2019-04-05 08:58:58 +0100
commit019f892e5d1a0a9643cb726c47ce2d99c14b444f (patch)
tree3026e83febdee0f9b1885d7d7591ab2b0061bbc6 /lib/ioctl_wrappers.c
parent2f38eabf06ec5bcdf28e1bfd0ffd95581b20e26b (diff)
lib: ioctl_wrappers: reach engines by index as well
With the new engine query method engines are reachable through an index and context they are combined with. The 'gem_has_ring()' becomes 'gem_context_has_engine()' that requires the index that the engine is mapped within the driver. The function has been moved from lib/ioctl_wappers to lib/i915/gem_context where it is more appropriate. The previous 'gem_has_ring()' function becomes a wrapper to the new 'gem_context_has_engine()'. Signed-off-by: Andi Shyti <andi.shyti@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r--lib/ioctl_wrappers.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 39920f87..280fdd62 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1252,25 +1252,6 @@ void igt_require_gem(int fd)
igt_require_f(err == 0, "Unresponsive i915/GEM device\n");
}
-bool gem_has_ring(int fd, unsigned ring)
-{
- struct drm_i915_gem_execbuffer2 execbuf;
- struct drm_i915_gem_exec_object2 exec;
-
- /* silly ABI, the kernel thinks everyone who has BSD also has BSD2 */
- if ((ring & ~(3<<13)) == I915_EXEC_BSD) {
- if (ring & (3 << 13) && !gem_has_bsd2(fd))
- return false;
- }
-
- memset(&exec, 0, sizeof(exec));
- memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = to_user_pointer(&exec);
- execbuf.buffer_count = 1;
- execbuf.flags = ring;
- return __gem_execbuf(fd, &execbuf) == -ENOENT;
-}
-
/**
* gem_require_ring:
* @fd: open i915 drm file descriptor