diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-03 00:50:38 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-03 00:58:31 +0300 |
commit | 5b043f4e60ff72d1a0348871e33c176e4005ae9b (patch) | |
tree | 7fe5b2d8b62bc4f6d74ad22f507c90cdbff8eb41 /drivers/gpu/drm/i915/i915_gem_context.c | |
parent | 15d21db87239840ae8248cf26e46391edc13cfe3 (diff) | |
download | linux-5b043f4e60ff72d1a0348871e33c176e4005ae9b.tar.xz |
drm/i915: Unify legacy/execlists submit_execbuf callbacks
Now that emitting requests is identical between legacy and execlists, we
can use the same function to build up the ring for submitting to either
engine. (With the exception of i915_switch_contexts(), but in time that
will also be handled gracefully.)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1469432687-22756-30-git-send-email-chris@chris-wilson.co.uk
Link: http://patchwork.freedesktop.org/patch/msgid/1470174640-18242-21-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_context.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index edde8411c478..d7a7cc8b6fa4 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -894,8 +894,9 @@ int i915_switch_context(struct drm_i915_gem_request *req) { struct intel_engine_cs *engine = req->engine; - WARN_ON(i915.enable_execlists); lockdep_assert_held(&req->i915->drm.struct_mutex); + if (i915.enable_execlists) + return 0; if (!req->ctx->engine[engine->id].state) { struct i915_gem_context *to = req->ctx; @@ -943,9 +944,7 @@ int i915_gem_switch_to_kernel_context(struct drm_i915_private *dev_priv) if (IS_ERR(req)) return PTR_ERR(req); - ret = 0; - if (!i915.enable_execlists) - ret = i915_switch_context(req); + ret = i915_switch_context(req); i915_add_request_no_flush(req); if (ret) return ret; |