diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-20 13:05:45 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-06-20 18:13:40 +0200 |
commit | 829a0af29f70612f505302cc785a1ddd2bac148b (patch) | |
tree | 5b9871ec0cffe2858181239a20ed127aabc2dcb8 /drivers/gpu/drm/i915/i915_gem_context.h | |
parent | drm/i915: Do not re-calculate num_rings locally (diff) | |
download | linux-829a0af29f70612f505302cc785a1ddd2bac148b.tar.xz linux-829a0af29f70612f505302cc785a1ddd2bac148b.zip |
drm/i915: Group all the global context information together
Create a substruct to hold all the global context state under
drm_i915_private.
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/20170620110547.15947-1-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 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h index 82c99ba92ad3..808f878db812 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.h +++ b/drivers/gpu/drm/i915/i915_gem_context.h @@ -273,13 +273,17 @@ static inline bool i915_gem_context_is_kernel(struct i915_gem_context *ctx) } /* i915_gem_context.c */ -int __must_check i915_gem_context_init(struct drm_i915_private *dev_priv); -void i915_gem_context_lost(struct drm_i915_private *dev_priv); -void i915_gem_context_fini(struct drm_i915_private *dev_priv); -int i915_gem_context_open(struct drm_device *dev, struct drm_file *file); -void i915_gem_context_close(struct drm_device *dev, struct drm_file *file); +int __must_check i915_gem_contexts_init(struct drm_i915_private *dev_priv); +void i915_gem_contexts_lost(struct drm_i915_private *dev_priv); +void i915_gem_contexts_fini(struct drm_i915_private *dev_priv); + +int i915_gem_context_open(struct drm_i915_private *i915, + struct drm_file *file); +void i915_gem_context_close(struct drm_file *file); + int i915_switch_context(struct drm_i915_gem_request *req); int i915_gem_switch_to_kernel_context(struct drm_i915_private *dev_priv); + void i915_gem_context_free(struct kref *ctx_ref); struct i915_gem_context * i915_gem_context_create_gvt(struct drm_device *dev); |