summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXiangliang.Yu <Xiangliang.Yu@amd.com>2017-08-16 14:25:51 +0800
committerAlex Deucher <alexander.deucher@amd.com>2017-08-17 16:47:44 -0400
commit9afae2719273fa1d406829bf3498f82dbdba71c7 (patch)
tree70f438849dc9662f37f8511d1a74e632ff8aca1b /drivers
parentd07f14be4d11cf323977672342fb0fc6017052f6 (diff)
drm/ttm: Fix accounting error when fail to get pages for pool
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> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/ttm/ttm_page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index eeddc1e48409..871599826773 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -615,7 +615,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,
} else {
pr_err("Failed to fill pool (%p)\n", pool);
/* If we have any pages left put them to the pool. */
- list_for_each_entry(p, &pool->list, lru) {
+ list_for_each_entry(p, &new_pages, lru) {
++cpages;
}
list_splice(&new_pages, &pool->list);