[Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects
Chris Wilson
chris at chris-wilson.co.uk
Tue Sep 15 02:54:52 PDT 2015
On Tue, Sep 15, 2015 at 02:03:27PM +0530, ankitprasad.r.sharma at intel.com wrote:
> @@ -1090,17 +1184,17 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
> goto out;
> }
>
> - /* prime objects have no backing filp to GEM pread/pwrite
> - * pages from.
> - */
> - if (!obj->base.filp) {
> - ret = -EINVAL;
> - goto out;
> - }
> -
> trace_i915_gem_object_pwrite(obj, args->offset, args->size);
>
> ret = -EFAULT;
> +
> + /* pwrite for non shmem backed objects */
> + if (!obj->base.filp) {
> + ret = i915_gem_gtt_pread_pwrite(dev, obj, args->size,
> + args->offset, args->data_ptr,
> + true);
> + goto out;
> + }
There already exists a GTT write path, along with a more correct
description of its limitations.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list