[PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool

Yu, Xiangliang Xiangliang.Yu at amd.com
Wed Aug 16 08:28:17 UTC 2017


Ok, CC stable.

From: Christian König [mailto:deathsimple at vodafone.de]
Sent: Wednesday, August 16, 2017 3:55 PM
To: Liu, Monk <Monk.Liu at amd.com>; Yu, Xiangliang <Xiangliang.Yu at amd.com>; akpm at linux-foundation.org; labbott at redhat.com; dri-devel at lists.freedesktop.org; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool

CC stable?

Reviewed-by: Christian König <christian.koenig at amd.com><mailto:christian.koenig at amd.com>

Am 16.08.2017 um 09:25 schrieb Liu, Monk:

Reviewed-by: Monk Liu <monk.liu at amd.com><mailto:monk.liu at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org><mailto:amd-gfx-bounces at lists.freedesktop.org> on behalf of Xiangliang.Yu <Xiangliang.Yu at amd.com><mailto:Xiangliang.Yu at amd.com>
Sent: Wednesday, August 16, 2017 3:20:46 PM
To: akpm at linux-foundation.org<mailto:akpm at linux-foundation.org>; labbott at redhat.com<mailto:labbott at redhat.com>; dri-devel at lists.freedesktop.org<mailto:dri-devel at lists.freedesktop.org>; amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
Cc: Yu, Xiangliang
Subject: [PATCH 1/1] 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 at amd.com><mailto:Xiangliang.Yu at amd.com>
---
 drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index eeddc1e..8715998 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);
--
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




_______________________________________________

amd-gfx mailing list

amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>

https://lists.freedesktop.org/mailman/listinfo/amd-gfx


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20170816/62af3f2d/attachment.html>


More information about the dri-devel mailing list