aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--amdgpu/amdgpu_vamgr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index 04d28817..2221da03 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -124,8 +124,10 @@ amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
124 } 124 }
125 125
126 if (base_required) { 126 if (base_required) {
127 if (base_required < mgr->va_offset) 127 if (base_required < mgr->va_offset) {
128 pthread_mutex_unlock(&mgr->bo_va_mutex);
128 return AMDGPU_INVALID_VA_ADDRESS; 129 return AMDGPU_INVALID_VA_ADDRESS;
130 }
129 offset = mgr->va_offset; 131 offset = mgr->va_offset;
130 waste = base_required - mgr->va_offset; 132 waste = base_required - mgr->va_offset;
131 } else { 133 } else {