sna: Suppress flushes once we have cleared the kernel dirtiness

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-05-31 15:06:16 +01:00
parent 0347c8abec
commit c5313620a2
1 changed files with 5 additions and 1 deletions

View File

@ -2954,7 +2954,11 @@ void _kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
bool __kgem_flush(struct kgem *kgem, struct kgem_bo *bo)
{
/* The kernel will emit a flush *and* update its own flushing lists. */
return kgem_busy(kgem, bo->handle);
if (!bo->needs_flush)
return false;
bo->needs_flush = kgem_busy(kgem, bo->handle);
return bo->needs_flush;
}
bool kgem_check_bo(struct kgem *kgem, ...)