mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/i915: Remove i915->kernel_context
Allocate only an internal intel_context for the kernel_context, forgoing a global GEM context for internal use as we only require a separate address space (for our own protection). Now having weaned GT from requiring ce->gem_context, we can stop referencing it entirely. This also means we no longer have to create random and unnecessary GEM contexts for internal use. GEM contexts are now entirely for tracking GEM clients, and intel_context the execution environment on the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Acked-by: Andi Shyti <andi.shyti@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20191221160324.1073045-1-chris@chris-wilson.co.uk
This commit is contained in:
@@ -779,15 +779,11 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
|
||||
return -EFAULT;
|
||||
|
||||
if (args->flags & I915_USERPTR_READ_ONLY) {
|
||||
struct i915_address_space *vm;
|
||||
|
||||
/*
|
||||
* On almost all of the older hw, we cannot tell the GPU that
|
||||
* a page is readonly.
|
||||
*/
|
||||
vm = rcu_dereference_protected(dev_priv->kernel_context->vm,
|
||||
true); /* static vm */
|
||||
if (!vm || !vm->has_read_only)
|
||||
if (!dev_priv->gt.vm->has_read_only)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user