<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Reviewed-by: Monk Liu <monk.liu@amd.com><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Xiangliang.Yu <Xiangliang.Yu@amd.com><br>
<b>Sent:</b> Wednesday, August 16, 2017 3:20:46 PM<br>
<b>To:</b> akpm@linux-foundation.org; labbott@redhat.com; dri-devel@lists.freedesktop.org; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Yu, Xiangliang<br>
<b>Subject:</b> [PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">When fail to get needed page for pool, need to put allocated pages<br>
into pool. But current code has a miscalculation of allocated pages,<br>
correct it.<br>
<br>
Signed-off-by: Xiangliang.Yu <Xiangliang.Yu@amd.com><br>
---<br>
 drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c<br>
index eeddc1e..8715998 100644<br>
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c<br>
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c<br>
@@ -615,7 +615,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool,<br>
                 } else {<br>
                         pr_err("Failed to fill pool (%p)\n", pool);<br>
                         /* If we have any pages left put them to the pool. */<br>
-                       list_for_each_entry(p, &pool->list, lru) {<br>
+                       list_for_each_entry(p, &new_pages, lru) {<br>
                                 ++cpages;<br>
                         }<br>
                         list_splice(&new_pages, &pool->list);<br>
-- <br>
2.7.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font>
</body>
</html>