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

Chris Wilson ickle at kemper.freedesktop.org
Mon Oct 19 01:46:53 PDT 2015


 src/sna/kgem.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 3656bcf01e78554aaeafc11ecebb0caf7dd12713
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Oct 19 09:34:43 2015 +0100

    sna: Manually clear the GPU bo needs_flush flag after doing an explicit flush
    
    The kernel often gets confused and fails to flush the bo itself, so lets
    just pretend it worked.
    
    Reported-by: Jiri Slaby <jirislaby at gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=70461#c127
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index bb1f70b..bbe2092 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -6752,6 +6752,7 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo)
 			DBG(("%s: sync: GPU hang detected\n", __FUNCTION__));
 			kgem_throttle(kgem);
 		}
+		bo->needs_flush = false;
 		kgem_bo_retire(kgem, bo);
 		bo->domain = DOMAIN_GTT;
 		bo->gtt_dirty = true;
@@ -6964,6 +6965,7 @@ void kgem_bo_sync__cpu(struct kgem *kgem, struct kgem_bo *bo)
 			DBG(("%s: sync: GPU hang detected\n", __FUNCTION__));
 			kgem_throttle(kgem);
 		}
+		bo->needs_flush = false;
 		kgem_bo_retire(kgem, bo);
 		bo->domain = DOMAIN_CPU;
 	}
@@ -7004,6 +7006,7 @@ void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write)
 			kgem_throttle(kgem);
 		}
 		if (write) {
+			bo->needs_flush = false;
 			kgem_bo_retire(kgem, bo);
 			bo->domain = DOMAIN_CPU;
 		} else {
@@ -7040,6 +7043,7 @@ void kgem_bo_sync__gtt(struct kgem *kgem, struct kgem_bo *bo)
 			DBG(("%s: sync: GPU hang detected\n", __FUNCTION__));
 			kgem_throttle(kgem);
 		}
+		bo->needs_flush = false;
 		kgem_bo_retire(kgem, bo);
 		bo->domain = DOMAIN_GTT;
 		bo->gtt_dirty = true;


More information about the xorg-commit mailing list