From e372e53ee0ed57072322003e508b3ca4c58076be Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Tue, 21 Feb 2012 12:34:54 -0500 Subject: [PATCH] radeon/r600g: fix virtual address space allocation Signed-off-by: Jerome Glisse --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 8e73e6f6e7e..31a47c6f14c 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -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); -- 2.30.2