diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-21 22:20:50 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-01-22 13:13:53 +0000 |
commit | 924090f4237bc34f32bb1992bbf334af76e64a29 (patch) | |
tree | 7beebd52f4149d43ea2ccd6aff9514411b6b3b1b /drivers/gpu/drm/i915/i915_gem_context.h | |
parent | 1579ab2de9147c50b00b35d9e7a0a66c86dffe13 (diff) | |
download | linux-stable-924090f4237bc34f32bb1992bbf334af76e64a29.tar.gz linux-stable-924090f4237bc34f32bb1992bbf334af76e64a29.tar.bz2 linux-stable-924090f4237bc34f32bb1992bbf334af76e64a29.zip |
drm/i915: Refactor out intel_context_init()
Prior to adding a third instance of intel_context_init() and extending
the information stored therewithin, refactor out the common assignments.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190121222117.23305-8-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_context.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h index f6d870b1f73e..47d82ce7ba6a 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.h +++ b/drivers/gpu/drm/i915/i915_gem_context.h @@ -364,4 +364,12 @@ static inline void i915_gem_context_put(struct i915_gem_context *ctx) kref_put(&ctx->ref, i915_gem_context_release); } +static inline void +intel_context_init(struct intel_context *ce, + struct i915_gem_context *ctx, + struct intel_engine_cs *engine) +{ + ce->gem_context = ctx; +} + #endif /* !__I915_GEM_CONTEXT_H__ */ |