xf86-video-intel: src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Apr 9 06:13:16 PDT 2012
src/sna/kgem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit dd093eafb9b94b8e4cd8853d74078c3aa7e72f57
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Apr 9 14:09:42 2012 +0100
sna: Add assertions around proxy list handling
References: https://bugs.freedesktop.org/show_bug.cgi?id=48400
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index f23bf0c..c8be7c8 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -320,6 +320,7 @@ static void kgem_bo_retire(struct kgem *kgem, struct kgem_bo *bo)
if (bo->exec == NULL) {
DBG(("%s: retiring bo handle=%d (needed flush? %d), rq? %d\n",
__FUNCTION__, bo->handle, bo->needs_flush, bo->rq != NULL));
+ assert(list_is_empty(&bo->vma));
bo->rq = NULL;
list_del(&bo->request);
bo->needs_flush = bo->flush;
@@ -1040,6 +1041,7 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
assert(bo->rq == NULL);
assert(bo->domain != DOMAIN_GPU);
assert(bo->reusable);
+ assert(list_is_empty(&bo->vma));
if (bucket(bo) >= NUM_CACHE_BUCKETS) {
kgem_bo_free(kgem, bo);
@@ -1051,12 +1053,11 @@ inline static void kgem_bo_move_to_inactive(struct kgem *kgem,
int type = IS_CPU_MAP(bo->map);
if (bucket(bo) >= NUM_CACHE_BUCKETS ||
(!type && !kgem_bo_is_mappable(kgem, bo))) {
- list_del(&bo->vma);
munmap(MAP(bo->map), bytes(bo));
bo->map = NULL;
}
if (bo->map) {
- list_move(&bo->vma, &kgem->vma[type].inactive[bucket(bo)]);
+ list_add(&bo->vma, &kgem->vma[type].inactive[bucket(bo)]);
kgem->vma[type].count++;
}
}
More information about the xorg-commit
mailing list