From: =?UTF-8?Q?Christian_K=c3=b6nig?= Subject: Re: [PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool Date: Wed, 16 Aug 2017 09:55:17 +0200 Message-ID: <8f64cef6-e7f7-e245-93b9-a0d1bbc411aa@vodafone.de> References: <1502868046-32511-1-git-send-email-Xiangliang.Yu@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0410514263==" Return-path: In-Reply-To: Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: "Liu, Monk" , "Yu, Xiangliang" , "akpm@linux-foundation.org" , "labbott@redhat.com" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" List-Id: amd-gfx.lists.freedesktop.org This is a multi-part message in MIME format. --===============0410514263== Content-Type: multipart/alternative; boundary="------------137C0B67936EA0D6BECD34E7" Content-Language: en-US This is a multi-part message in MIME format. --------------137C0B67936EA0D6BECD34E7 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit CC stable? Reviewed-by: Christian König Am 16.08.2017 um 09:25 schrieb Liu, Monk: > > Reviewed-by: Monk Liu > > ------------------------------------------------------------------------ > *From:* amd-gfx on behalf of > Xiangliang.Yu > *Sent:* Wednesday, August 16, 2017 3:20:46 PM > *To:* akpm@linux-foundation.org; labbott@redhat.com; > dri-devel@lists.freedesktop.org; amd-gfx@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 > --- > 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@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx --------------137C0B67936EA0D6BECD34E7 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit
CC stable?

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

Am 16.08.2017 um 09:25 schrieb Liu, Monk:

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


From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Xiangliang.Yu <Xiangliang.Yu@amd.com>
Sent: Wednesday, August 16, 2017 3:20:46 PM
To: akpm@linux-foundation.org; labbott@redhat.com; dri-devel@lists.freedesktop.org; amd-gfx@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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


--------------137C0B67936EA0D6BECD34E7-- --===============0410514263== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0410514263==--