diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-03-08 13:25:18 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-03-08 13:59:50 +0000 |
commit | 4dc84b77b07731b7f5de2ce14b5f0526a86f013d (patch) | |
tree | dab57196ae00549822468476afab8c77cc68e252 /drivers/gpu/drm/i915/i915_gem_context.c | |
parent | 39e2f501c1b431bd9291308e1ef02b9a02fffbee (diff) |
drm/i915: Store the intel_context_ops in the intel_engine_cs
If we place a pointer to the engine specific intel_context_ops in the
engine itself, we can assign the ops pointer on initialising the
context, and then rely on it being set. This simplifies the code in
later patches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308132522.21573-3-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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index d997695a4f77..0bb2bdd0a55f 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -356,6 +356,7 @@ intel_context_init(struct intel_context *ce, { ce->gem_context = ctx; ce->engine = engine; + ce->ops = engine->cops; INIT_LIST_HEAD(&ce->signal_link); INIT_LIST_HEAD(&ce->signals); |