[Intel-gfx] [PATCH 7/8] drm/i915: Support for pread/pwrite from/to non shmem backed objects
Chris Wilson
chris at chris-wilson.co.uk
Tue Dec 15 04:03:48 PST 2015
On Tue, Dec 15, 2015 at 04:26:07PM +0530, ankitprasad.r.sharma at intel.com wrote:
> +static int
> +i915_gem_gtt_copy(struct drm_device *dev,
> + struct drm_i915_gem_object *obj, uint64_t size,
> + uint64_t data_offset, uint64_t data_ptr)
> +{
> + struct drm_i915_private *dev_priv = dev->dev_private;
> + char __user *user_data;
> + uint64_t remain;
> + uint64_t offset, page_base;
> + int page_offset, page_length, ret = 0;
> +
> + ret = i915_gem_obj_ggtt_pin(obj, 0, PIN_MAPPABLE);
> + if (ret)
> + goto out;
Note that the interfaces this is used for (PRIME) can easily allocate
objects larger than the mappable GTT which promptly fails. If only we
had been working on a per-page GTT accessor...
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list