sna: Mark the bo as reusable after extracting the handle from the buffer

The whole purpose for that little dance was so that we could reuse the
bo. However, we left it marked as non-reusable in order for us not to
tie up memory with too many buffers and so defeated the purpose of
trying to place it into the inactive cache.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-09-09 23:12:59 +01:00
parent b3429cf12d
commit ac4d4cdbc1
1 changed files with 1 additions and 0 deletions

View File

@ -715,6 +715,7 @@ static void kgem_finish_partials(struct kgem *kgem)
struct kgem_bo *base = malloc(sizeof(*base));
if (base) {
memcpy(base, &bo->base, sizeof (*base));
base->reusable = true;
list_init(&base->list);
list_replace(&bo->base.request,
&base->request);