diff options
author | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2021-11-02 16:30:40 -0700 |
---|---|---|
committer | Ashutosh Dixit <ashutosh.dixit@intel.com> | 2021-11-04 10:30:56 -0700 |
commit | 4610041a35717587a784de68fbfe04a3a839b67b (patch) | |
tree | 90742fdfdf0b8a1f32c0abb06378d3f40bbc2f28 /lib/i915 | |
parent | 311a141910678cd981621d0c1beebb665137b49a (diff) |
Remove "semaphores" submission method
As part of cleaning up the submission library functions, remove the
"semaphores" submission method. Semaphores are not a "submission method",
semaphores can be used with GuC, execlists or legacy ring buffer submission.
Suggested-by: John Harrison <john.c.harrison@intel.com>
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: John Harrison <john.c.harrison@intel.com>
Diffstat (limited to 'lib/i915')
-rw-r--r-- | lib/i915/gem_submission.c | 36 | ||||
-rw-r--r-- | lib/i915/gem_submission.h | 2 |
2 files changed, 2 insertions, 36 deletions
diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c index 2627b802..a84a5d3e 100644 --- a/lib/i915/gem_submission.c +++ b/lib/i915/gem_submission.c @@ -52,22 +52,8 @@ * currently used hardware submission method. Different generations of hardware * support different submission backends, currently we're distinguishing 3 * different methods: legacy ringbuffer submission, execlists, GuC submission. - * For legacy ringbuffer submission, there's also a variation where we're using - * semaphores for synchronization between engines. */ -static bool has_semaphores(int fd, int dir) -{ - int val = 0; - struct drm_i915_getparam gp = { - gp.param = I915_PARAM_HAS_SEMAPHORES, - gp.value = &val, - }; - if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &gp) < 0) - val = igt_sysfs_get_boolean(dir, "semaphores"); - return val; -} - /** * gem_submission_method: * @fd: open i915 drm file descriptor @@ -90,13 +76,8 @@ unsigned gem_submission_method(int fd) goto out; } - if (gen >= 8) { + if (gen >= 8) flags |= GEM_SUBMISSION_EXECLISTS; - goto out; - } - - if (has_semaphores(fd, dir)) - flags |= GEM_SUBMISSION_SEMAPHORES; out: close(dir); @@ -128,20 +109,7 @@ void gem_submission_print_method(int fd) return; } - igt_info("Using Legacy submission%s\n", - flags & GEM_SUBMISSION_SEMAPHORES ? ", with semaphores" : ""); -} - -/** - * 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; + igt_info("Using Legacy submission\n"); } /** diff --git a/lib/i915/gem_submission.h b/lib/i915/gem_submission.h index 38dd24a9..55bcfc09 100644 --- a/lib/i915/gem_submission.h +++ b/lib/i915/gem_submission.h @@ -28,12 +28,10 @@ #include "intel_ctx.h" -#define GEM_SUBMISSION_SEMAPHORES (1 << 0) #define GEM_SUBMISSION_EXECLISTS (1 << 1) #define GEM_SUBMISSION_GUC (1 << 2) 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); bool gem_engine_has_mutable_submission(int fd, unsigned int engine); |