[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 22:42:00 CEST 2010
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.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: stable at kernel.org
---
drivers/gpu/drm/i915/i915_gem.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f04612f..5d60c3b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3076,6 +3076,7 @@ i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write)
if (write) {
obj->read_domains &= I915_GEM_DOMAIN_CPU;
obj->write_domain = I915_GEM_DOMAIN_CPU;
+ obj_priv->dirty = 1;
}
trace_i915_gem_object_change_domain(obj,
--
1.7.1
More information about the Intel-gfx
mailing list