diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-16 13:13:03 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-03-16 13:17:12 -0400 |
commit | ff44ad51ebf8e4693bd66ae41aa37a6bc88a134f (patch) | |
tree | a6c8e60d9bb0a08d6a321439a7b690b8392c9ee0 /drivers/gpu/drm/i915/intel_ringbuffer.h | |
parent | 8c185ecaf4ee6966144c3897afdda557c5849bb0 (diff) |
drm/i915: Move engine->submit_request selection to a vfunc
It turns out that we may want to restore the original
engine->submit_request (and engine->schedule) callbacks from more than
just the guc <-> execlists transition. Move this to a vfunc so we can
have a common interface.
v2: Move initial selection to intel_engines_init_common(), repaint vfunc
with engine->set_default_submission (and a similar colour for the
helper).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-2-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 8bdba18420fa..847aea554464 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h | |||
@@ -273,6 +273,8 @@ struct intel_engine_cs { | |||
273 | void (*reset_hw)(struct intel_engine_cs *engine, | 273 | void (*reset_hw)(struct intel_engine_cs *engine, |
274 | struct drm_i915_gem_request *req); | 274 | struct drm_i915_gem_request *req); |
275 | 275 | ||
276 | void (*set_default_submission)(struct intel_engine_cs *engine); | ||
277 | |||
276 | int (*context_pin)(struct intel_engine_cs *engine, | 278 | int (*context_pin)(struct intel_engine_cs *engine, |
277 | struct i915_gem_context *ctx); | 279 | struct i915_gem_context *ctx); |
278 | void (*context_unpin)(struct intel_engine_cs *engine, | 280 | void (*context_unpin)(struct intel_engine_cs *engine, |
@@ -676,4 +678,6 @@ static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset) | |||
676 | bool intel_engine_is_idle(struct intel_engine_cs *engine); | 678 | bool intel_engine_is_idle(struct intel_engine_cs *engine); |
677 | bool intel_engines_are_idle(struct drm_i915_private *dev_priv); | 679 | bool intel_engines_are_idle(struct drm_i915_private *dev_priv); |
678 | 680 | ||
681 | void intel_engines_reset_default_submission(struct drm_i915_private *i915); | ||
682 | |||
679 | #endif /* _INTEL_RINGBUFFER_H_ */ | 683 | #endif /* _INTEL_RINGBUFFER_H_ */ |