Skip to content

Commit 9418300

Browse files
xliyugregkh
authored andcommitted
drm/ttm: Fix accounting error when fail to get pages for pool
commit 9afae2719273fa1d406829bf3498f82dbdba71c7 upstream. When fail to get needed page for pool, need to put allocated pages into pool. But current code has a miscalculation of allocated pages, correct it. Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9b3dcc9 commit 9418300

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/ttm/ttm_page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
612612
} else {
613613
pr_err("Failed to fill pool (%p)\n", pool);
614614
/* If we have any pages left put them to the pool. */
615-
list_for_each_entry(p, &pool->list, lru) {
615+
list_for_each_entry(p, &new_pages, lru) {
616616
++cpages;
617617
}
618618
list_splice(&new_pages, &pool->list);

0 commit comments

Comments
 (0)