[Intel-gfx] [PATCH 07/10] drm/i915: Support for pread/pwrite from/to non shmem backed objects
Chris Wilson
chris at chris-wilson.co.uk
Mon Jan 11 13:29:23 PST 2016
On Mon, Jan 11, 2016 at 05:15:54PM +0000, Tvrtko Ursulin wrote:
> > Is that not what was written? I take it my telepathy isn't working
> > again.
>
> Sorry not a new loop, new case in a old loop. This is the hunk I think
> is not helping readability:
>
> @@ -869,11 +967,29 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915,
> /* If we get a fault while copying data, then (presumably) our
> * source page isn't available. Return the error and we'll
> * retry in the slow path.
> + * If the object is non-shmem backed, we retry again with the
> + * path that handles page fault.
> */
> - if (fast_user_write(i915->gtt.mappable, page_base,
> - page_offset, user_data, page_length)) {
> - ret = -EFAULT;
> - goto out_flush;
> + if (faulted || fast_user_write(i915->gtt.mappable,
> + page_base, page_offset,
> + user_data, page_length)) {
> + if (!obj->base.filp) {
This is just wrong, we neither need the faulted nor the difference in
behaviour based on storage.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list