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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to