[PATCH 7/7] lpfn
Matthew Auld
matthew.auld at intel.com
Wed Jan 5 18:39:59 UTC 2022
---
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
index 05f924f32e96..a5cf1cff2e0a 100644
--- a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
+++ b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
@@ -87,12 +87,13 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
n_pages = size >> ilog2(mm->chunk_size);
mutex_lock(&bman->lock);
- err = drm_buddy_alloc(mm, (u64)place->fpfn << PAGE_SHIFT,
- (u64)place->lpfn << PAGE_SHIFT,
- (u64)n_pages << PAGE_SHIFT,
- min_page_size,
- &bman_res->blocks,
- bman_res->flags);
+ err = drm_buddy_alloc(mm,
+ (u64)place->fpfn << PAGE_SHIFT,
+ (u64)lpfn << PAGE_SHIFT,
+ (u64)n_pages << PAGE_SHIFT,
+ min_page_size,
+ &bman_res->blocks,
+ bman_res->flags);
mutex_unlock(&bman->lock);
if (unlikely(err))
goto err_free_blocks;
@@ -100,8 +101,8 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {
mutex_lock(&bman->lock);
drm_buddy_block_trim(mm,
- (u64)n_pages << PAGE_SHIFT,
- &bman_res->blocks);
+ (u64)bman_res->base.num_pages << PAGE_SHIFT,
+ &bman_res->blocks);
mutex_unlock(&bman->lock);
}
--
2.31.1
More information about the Intel-gfx-trybot
mailing list