[PATCH 17/18] oops
Matthew Auld
matthew.auld at intel.com
Wed May 12 15:16:14 UTC 2021
---
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
index 47af38c4be73..0e6193689e18 100644
--- a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
+++ b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
@@ -39,6 +39,9 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
GEM_BUG_ON(place->fpfn || place->lpfn);
GEM_BUG_ON(bo->page_alignment < mm->chunk_size);
+ GEM_BUG_ON(!mem->num_pages);
+
+ size = mem->num_pages << PAGE_SHIFT;
min_order = ilog2(bo->page_alignment) - ilog2(mm->chunk_size);
if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {
@@ -49,7 +52,6 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
if (size > mm->size)
return -E2BIG;
- size = mem->num_pages << PAGE_SHIFT;
n_pages = size >> ilog2(mm->chunk_size);
mutex_lock(&bman->lock);
--
2.26.3
More information about the Intel-gfx-trybot
mailing list