[Intel-gfx] [PATCH 6/6] drm/i915/userptr: Enable read-only support on gen8+

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 12 19:08:49 UTC 2018


Quoting Chris Wilson (2018-07-12 19:53:15)
> @@ -789,10 +789,12 @@ i915_gem_userptr_ioctl(struct drm_device *dev,
>                 return -EFAULT;
>  
>         if (args->flags & I915_USERPTR_READ_ONLY) {
> -               /* On almost all of the current hw, we cannot tell the GPU that a
> -                * page is readonly, so this is just a placeholder in the uAPI.
> +               /*
> +                * On almost all of the older hw, we cannot tell the GPU that
> +                * a page is readonly.
>                  */
> -               return -ENODEV;
> +               if (INTEL_GEN(dev_priv) < 8 || !USES_PPGTT(dev_priv))
> +                       return -ENODEV;

Hmm, I need to be more careful here considering gvt.
-Chris


More information about the Intel-gfx mailing list