xf86-video-intel: src/sna/kgem.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Feb 18 10:16:17 UTC 2016


 src/sna/kgem.c |    9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit aacc3442bb8c280a6ebc1fc1e34451613a72d7c4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Feb 18 10:15:11 2016 +0000

    sna: Restrict set-domain short-circuit to readonly
    
    If we write to the bo, we do want the kernel to mark it as dirty (for
    the purposes of swap invalidation and the like), so we can't apply the
    shortcircuit.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 6112952..aceedd4 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -7012,9 +7012,6 @@ void kgem_bo_sync__cpu(struct kgem *kgem, struct kgem_bo *bo)
 		bo = bo->proxy;
 	assert(!bo->purged);
 
-	if (bo->rq == NULL && (kgem->has_llc || bo->snoop))
-		return;
-
 	if (bo->domain != DOMAIN_CPU || FORCE_MMAP_SYNC & (1 << DOMAIN_CPU)) {
 		struct drm_i915_gem_set_domain set_domain;
 
@@ -7055,7 +7052,7 @@ void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write)
 	assert(bo->refcnt);
 	assert(!bo->purged);
 
-	if (bo->rq == NULL && (kgem->has_llc || bo->snoop))
+	if (bo->rq == NULL && (kgem->has_llc || bo->snoop) && !write)
 		return;
 
 	if (bo->domain != DOMAIN_CPU || FORCE_MMAP_SYNC & (1 << DOMAIN_CPU)) {
@@ -7093,9 +7090,7 @@ void kgem_bo_sync__gtt(struct kgem *kgem, struct kgem_bo *bo)
 	assert(bo->refcnt);
 	assert(bo->proxy == NULL);
 	assert_tiling(kgem, bo);
-
-	if (bo->rq == NULL)
-		return;
+	assert(!bo->snoop);
 
 	kgem_bo_submit(kgem, bo);
 


More information about the xorg-commit mailing list