[Intel-gfx] [PATCH] drm/i915: Mark the object as dirty when setting to the CPU write domain.

Chris Wilson chris at chris-wilson.co.uk
Sun May 9 23:09:51 CEST 2010


On Sun,  9 May 2010 21:42:00 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Or else we may not write back the written pages upon unbind. For
> example the contents of a batch buffer written using a simple mmap or
> using shmmem pwrite may be discarded if we are forced to evict
> everything whilst pinning the objects for execbuffer.

Daniel Vetter pointed out that all callers of set_to_cpu_domain(write=TRUE)
manually mark the object as dirty, so this cannot be the cause of the
failures that I see. Well I enjoyed my eureka moment, short though it was.

I think that it would be wise to make set_to_cpu_domain() and its callers
behave consistently with set_to_gtt_domain(), whereby the
obj_priv->dirty=1 is done in the common function and not the callers.  A
task for tomorrow.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list