aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorGravatar Chris Wilson <chris@chris-wilson.co.uk> 2016-10-30 13:28:20 +0000
committerGravatar Chris Wilson <chris@chris-wilson.co.uk> 2016-11-01 14:26:33 +0000
commit07c9a21a0d594c3acc0983e5e0a25d2364188d51 (patch)
tree12e52acad3a19aa735f91596f3909c94fc727826 /drivers/gpu/drm/i915/i915_drv.h
parentdrm/i915/gen9+: Use the watermarks from crtc_state for everything, v2. (diff)
downloadlinux-07c9a21a0d594c3acc0983e5e0a25d2364188d51.tar.gz
linux-07c9a21a0d594c3acc0983e5e0a25d2364188d51.tar.bz2
linux-07c9a21a0d594c3acc0983e5e0a25d2364188d51.zip
drm/i915: Export a function to flush the context upon pinning
For legacy contexts we employ an optimisation to only flush the context when binding into the global GTT. This avoids stalling on the GPU when reloading an active context. Wrap this detail up into a helper and export it for a potential third user. (Longer term, context pinning needs to be reworked as the current handling of switch context pins too late and so risks eviction and corrupting the request. Plans, plans, plans.) v2: Expand the comment explaining the optimisation for avoiding the stall on active contexts. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: http://patchwork.freedesktop.org/patch/msgid/20161030132820.32163-1-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 086396e16de7..b5bfc4c67aa0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -3529,6 +3529,9 @@ 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 i915_switch_context(struct drm_i915_gem_request *req);
int i915_gem_switch_to_kernel_context(struct drm_i915_private *dev_priv);
+struct i915_vma *
+i915_gem_context_pin_legacy(struct i915_gem_context *ctx,
+ unsigned int flags);
void i915_gem_context_free(struct kref *ctx_ref);
struct drm_i915_gem_object *
i915_gem_alloc_context_obj(struct drm_device *dev, size_t size);