[Intel-gfx] [PATCH] Always mark GEM objects as dirty when written by the CPU

Chris Wilson chris at chris-wilson.co.uk
Tue Dec 1 05:04:38 PST 2015


On Tue, Dec 01, 2015 at 12:42:02PM +0000, Dave Gordon wrote:
> In various places, one or more pages of a GEM object are mapped into CPU
> address space and updated. In each such case, the object should be
> marked dirty, to ensure that the modifications are not discarded if the
> object is evicted under memory pressure.
> 
> This is similar to commit
> 	commit 51bc140431e233284660b1d22c47dec9ecdb521e
> 	Author: Chris Wilson <chris at chris-wilson.co.uk>
> 	Date:   Mon Aug 31 15:10:39 2015 +0100
> 	drm/i915: Always mark the object as dirty when used by the GPU
> 
> in which Chris ensured that updates by the GPU were not lost due to
> eviction, but this patch applies instead to the multiple places where
> object content is updated by the host CPU.

Apart from that commit was to mask userspace bugs, here we are under
control of when the pages are marked and have chosen a different
per-page interface for CPU writes as opposed to per-object.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list