[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
Tue Dec 22 09:40:09 PST 2015


On Tue, Dec 22, 2015 at 11:58:33AM +0000, Tvrtko Ursulin wrote:
> Maybe:
> 
> 	if (!obj->base.filp || cpu_write_needs_clflush(obj))
>    		ret = i915_gem_gtt_pwrite_fast(...);
> 
> 	if (ret == -EFAULT && !obj->base.filp) {
> 		ret = i915_gem_gtt_pwrite_slow(...) /* New function, doing the
> slow_user_access loop for !filp objects, extracted from
> gtt_pwrite_fast above. */

The point is that "gtt_pwrite_slow" is going to be preferrable in the
cases where it is possible. It just wasn't the full fallback patch for
all objects previously, so we didn't bother to write a partial fallback
handler.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list