All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Mark the object as dirty when setting to the CPU write domain.
@ 2010-05-09 20:42 Chris Wilson
  2010-05-09 21:09 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2010-05-09 20:42 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable

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@chris-wilson.co.uk>
Cc: stable@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-09 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-09 20:42 [PATCH] drm/i915: Mark the object as dirty when setting to the CPU write domain Chris Wilson
2010-05-09 21:09 ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.