[Intel-gfx] [PATCH 07/10] drm/i915: Support for pread/pwrite from/to non shmem backed objects
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Mon Jan 11 06:21:33 PST 2016
On 22/12/15 17:40, Chris Wilson wrote:
> 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.
Maybe I don't get this - is fast_user_write expected always to fail for
non shmem backed objects? And so revert to the slow_user_path always and
immediately? Because fast_user_write is still the primary choice for
everything.
Perhaps this needs a matrix in the comment/commit describing which path
for which objects and when..
Regards,
Tvrtko
More information about the Intel-gfx
mailing list