xf86-video-intel: src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Wed Feb 13 06:11:02 PST 2013
src/sna/kgem.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 38a3506aa1c9c2e07125b54fc319b6de89febff9
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 13 14:09:38 2013 +0000
sna: Handle scanouts still active at the time of destruction
Basically remove the bogus assert, and reorder the list to
preferentially reuse the still active scanouts.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 622794c..9f27461 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1631,15 +1631,17 @@ static void _kgem_bo_delete_buffer(struct kgem *kgem, struct kgem_bo *bo)
static void kgem_bo_move_to_scanout(struct kgem *kgem, struct kgem_bo *bo)
{
assert(bo->refcnt == 0);
- assert(bo->exec == NULL);
assert(bo->scanout);
assert(bo->delta);
assert(!bo->snoop);
assert(!bo->io);
- DBG(("%s: moving %d [fb %d] to scanout cachee\n", __FUNCTION__,
- bo->handle, bo->delta));
- list_move(&bo->list, &kgem->scanout);
+ DBG(("%s: moving %d [fb %d] to scanout cache, active? %d\n",
+ __FUNCTION__, bo->handle, bo->delta, bo->rq != NULL));
+ if (bo->rq)
+ list_move_tail(&bo->list, &kgem->scanout);
+ else
+ list_move(&bo->list, &kgem->scanout);
}
static void kgem_bo_move_to_snoop(struct kgem *kgem, struct kgem_bo *bo)
@@ -3495,7 +3497,8 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
bucket = cache_bucket(size);
if (flags & CREATE_SCANOUT) {
- list_for_each_entry(bo, &kgem->scanout, list) {
+ assert((flags & CREATE_INACTIVE) == 0);
+ list_for_each_entry_reverse(bo, &kgem->scanout, list) {
assert(bo->scanout);
assert(bo->delta);
assert(!bo->purged);
More information about the xorg-commit
mailing list