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

Chris Wilson ickle at kemper.freedesktop.org
Wed Jan 29 05:40:57 PST 2014


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

New commits:
commit d70620d9789da1cf983dac318d9ca9149f11ff20
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jan 29 13:39:20 2014 +0000

    sna: We can only retire a bo if is not referenced by the current batch
    
    Fixes regression from
    commit 8b0ebebcab21647348f769c25ca0c1d81d169e75
    Author: Chris Wilson <chris at chris-wilson.co.uk>
    Date:   Tue Jan 28 16:30:47 2014 +0000
    
        sna: Be a little more assertive in retiring after set-domain
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74176
    Reported-by: Jan Alexander Steffens <jan.steffens at gmail.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 14a3f95..ac21d2a 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -5735,8 +5735,10 @@ void kgem_bo_sync__cpu_full(struct kgem *kgem, struct kgem_bo *bo, bool write)
 			kgem_bo_retire(kgem, bo);
 			bo->domain = DOMAIN_CPU;
 		} else {
-			kgem_bo_maybe_retire(kgem, bo);
-			bo->domain = DOMAIN_NONE;
+			if (bo->exec == NULL) {
+				kgem_bo_maybe_retire(kgem, bo);
+				bo->domain = DOMAIN_NONE;
+			}
 		}
 	}
 }
commit 971a5e64f574f09ef43bcca9e0bd02cb0e42aa03
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jan 29 13:15:43 2014 +0000

    sna: Add assertions for set/get binding
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 0c3e0b0..14a3f95 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -6592,6 +6592,8 @@ uint32_t kgem_bo_get_binding(struct kgem_bo *bo, uint32_t format)
 {
 	struct kgem_bo_binding *b;
 
+	assert(bo->refcnt);
+
 	for (b = &bo->binding; b && b->offset; b = b->next)
 		if (format == b->format)
 			return b->offset;
@@ -6603,6 +6605,8 @@ void kgem_bo_set_binding(struct kgem_bo *bo, uint32_t format, uint16_t offset)
 {
 	struct kgem_bo_binding *b;
 
+	assert(bo->refcnt);
+
 	for (b = &bo->binding; b; b = b->next) {
 		if (b->offset)
 			continue;


More information about the xorg-commit mailing list