xf86-video-intel: src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Jan 21 08:28:33 PST 2013
src/sna/kgem.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 0507d55dd1bc8fedae524a410a9e7b53f1dad920
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Jan 21 16:24:49 2013 +0000
sna: Only add bound scanouts to the scanout list
If we never used the bo as an actual scanout it will never have had been
moved to the uncached domain and so we can return it back to the system
cache.
Reported-by: Jiri Slaby <jirislaby at gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=47597
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 7ff98dc..47414be 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1550,9 +1550,7 @@ inline static void kgem_bo_remove_from_active(struct kgem *kgem,
static void kgem_bo_clear_scanout(struct kgem *kgem, struct kgem_bo *bo)
{
- if (!bo->scanout)
- return;
-
+ assert(bo->scanout);
assert(bo->proxy == NULL);
DBG(("%s: handle=%d, fb=%d (reusable=%d)\n",
@@ -1712,9 +1710,14 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
}
if (bo->scanout) {
- DBG(("%s: handle=%d -> scanout\n", __FUNCTION__, bo->handle));
- list_add(&bo->list, &kgem->scanout);
- return;
+ if (bo->delta) {
+ DBG(("%s: handle=%d -> scanout\n",
+ __FUNCTION__, bo->handle));
+ list_add(&bo->list, &kgem->scanout);
+ return;
+ }
+
+ kgem_bo_clear_scanout(kgem, bo);
}
if (!bo->reusable) {
More information about the xorg-commit
mailing list