All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Unconditionally do fb tracking invalidate in set_domain
@ 2015-06-25 21:47 Daniel Vetter
  2015-06-25 21:47 ` [PATCH 2/2] drm/i915: Unique frontbuffer_bits for sprites Daniel Vetter
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Daniel Vetter @ 2015-06-25 21:47 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Paulo Zanoni, Daniel Vetter

We can't elide the fb tracking invalidate if the buffer is already in
the right domain since that would lead to missed screen updates. I'm
pretty sure I've written this already before but must have gotten lost
unfortunately :(

Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f79ce9f22312..36f5e86f9048 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3940,6 +3940,9 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write)
 	struct i915_vma *vma;
 	int ret;
 
+	if (write)
+		intel_fb_obj_invalidate(obj, ORIGIN_GTT);
+
 	if (obj->base.write_domain == I915_GEM_DOMAIN_GTT)
 		return 0;
 
@@ -3982,9 +3985,6 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write)
 		obj->dirty = 1;
 	}
 
-	if (write)
-		intel_fb_obj_invalidate(obj, ORIGIN_GTT);
-
 	trace_i915_gem_object_change_domain(obj,
 					    old_read_domains,
 					    old_write_domain);
@@ -4224,6 +4224,9 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
 	uint32_t old_write_domain, old_read_domains;
 	int ret;
 
+	if (write)
+		intel_fb_obj_invalidate(obj, ORIGIN_CPU);
+
 	if (obj->base.write_domain == I915_GEM_DOMAIN_CPU)
 		return 0;
 
@@ -4256,9 +4259,6 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write)
 		obj->base.write_domain = I915_GEM_DOMAIN_CPU;
 	}
 
-	if (write)
-		intel_fb_obj_invalidate(obj, ORIGIN_CPU);
-
 	trace_i915_gem_object_change_domain(obj,
 					    old_read_domains,
 					    old_write_domain);
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-06-29 11:32 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 21:47 [PATCH 1/2] drm/i915: Unconditionally do fb tracking invalidate in set_domain Daniel Vetter
2015-06-25 21:47 ` [PATCH 2/2] drm/i915: Unique frontbuffer_bits for sprites Daniel Vetter
2015-06-29 11:32   ` shuang.he
2015-06-26  7:29 ` [PATCH 1/2] drm/i915: Unconditionally do fb tracking invalidate in set_domain Chris Wilson
2015-06-26  8:15 ` [PATCH] " Daniel Vetter
2015-06-26  9:52   ` Chris Wilson
2015-06-26 17:35   ` Daniel Vetter
2015-06-26 17:35     ` Chris Wilson
2015-06-26 20:02       ` Paulo Zanoni
2015-06-29  6:56         ` Daniel Vetter
2015-06-27 23:38     ` shuang.he
2015-06-28 18:59   ` shuang.he

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.