Skip to content

Commit ef2b731

Browse files
Jérôme Glisseairlied
authored andcommitted
drm/ttm: fix uncached page deallocation to properly fill page pool v3.
Current code never allowed the page pool to actualy fill in anyway. This fix it, so that we only start freeing page from the pool when we go over the pool size. Changed since v1: - Move the page batching optimization to its separate patch. Changed since v2: - Do not remove code part of the batching optimization with this patch. - Better commit message. Signed-off-by: Jérôme Glisse <[email protected]> Reviewed-by: Mario Kleiner <[email protected]> Reviewed-and-Tested-by: Michel Dänzer <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Cc: Thomas Hellstrom <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent aaab3bb commit ef2b731

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/gpu/drm/ttm/ttm_page_alloc_dma.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,6 @@ void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev)
963963
} else {
964964
pool->npages_free += count;
965965
list_splice(&ttm_dma->pages_list, &pool->free_list);
966-
npages = count;
967966
if (pool->npages_free > _manager->options.max_size) {
968967
npages = pool->npages_free - _manager->options.max_size;
969968
/* free at least NUM_PAGES_TO_ALLOC number of pages

0 commit comments

Comments
 (0)