* [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* Re: [PATCH] drm/i915: Mark the object as dirty when setting to the CPU write domain.
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
0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2010-05-09 21:09 UTC (permalink / raw)
To: intel-gfx
On Sun, 9 May 2010 21:42:00 +0100, Chris Wilson <chris@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
^ permalink raw reply [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.