radeon/r600g: fix virtual address space allocation
authorJerome Glisse <jglisse@redhat.com>
Tue, 21 Feb 2012 17:34:54 +0000 (12:34 -0500)
committerJerome Glisse <jglisse@redhat.com>
Tue, 21 Feb 2012 17:34:54 +0000 (12:34 -0500)
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index 8e73e6f6e7e5a3aa364361c9501273de14c9e5dd..31a47c6f14c5c1a2b871a82ed1ffb748243a7059 100644 (file)
@@ -211,6 +211,9 @@ static uint64_t radeon_bomgr_find_va(struct radeon_bomgr *mgr, uint64_t size, ui
             waste = waste ? alignment - waste : 0;
         }
         offset += waste;
+        if (offset >= (hole->offset + hole->size)) {
+            continue;
+        }
         if (!waste && hole->size == size) {
             offset = hole->offset;
             list_del(&hole->list);