From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Roger He <Hongbo.He@amd.com>, dri-devel@lists.freedesktop.org
Cc: Christian.Koenig@amd.com
Subject: Re: [PATCH 2/2] drm/ttm: only free pages rather than update global memory count together
Date: Fri, 12 Jan 2018 08:58:51 +0100 [thread overview]
Message-ID: <39642053-5983-7d25-b2c4-9c6ca381fc77@gmail.com> (raw)
In-Reply-To: <1515737657-2983-2-git-send-email-Hongbo.He@amd.com>
Am 12.01.2018 um 07:14 schrieb Roger He:
> if ttm_get_pages or ttm_mem_global_alloc_page fail, should not update
> global memory count.
>
> Signed-off-by: Roger He <Hongbo.He@amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> index 0eab24e..aebabf1 100644
> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> @@ -1075,7 +1075,8 @@ int ttm_pool_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
> ret = ttm_get_pages(ttm->pages, ttm->num_pages, ttm->page_flags,
> ttm->caching_state);
> if (unlikely(ret != 0)) {
> - ttm_pool_unpopulate(ttm);
> + ttm_put_pages(ttm->pages, ttm->num_pages, ttm->page_flags,
> + ttm->caching_state);
That is not correctly indented. The "ttm->caching_state" should be one
the same column as the "ttm->pages" above. It looks like your editor
only inserts tabs, not spaces.
Apart from that the patch is Reviewed-by: Christian König
<christian.koenig@amd.com>.
Regards,
Christian.
> return ret;
> }
>
> @@ -1083,7 +1084,8 @@ int ttm_pool_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
> ret = ttm_mem_global_alloc_page(mem_glob, ttm->pages[i],
> PAGE_SIZE, ctx);
> if (unlikely(ret != 0)) {
> - ttm_pool_unpopulate(ttm);
> + ttm_put_pages(ttm->pages, ttm->num_pages,
> + ttm->page_flags, ttm->caching_state);
> return -ENOMEM;
> }
> }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-01-12 13:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 6:14 [PATCH 1/2] drm/ttm: don't update global memory count for some special cases Roger He
2018-01-12 6:14 ` [PATCH 2/2] drm/ttm: only free pages rather than update global memory count together Roger He
2018-01-12 6:55 ` Andrey Grodzovsky
2018-01-12 7:58 ` Christian König [this message]
2018-01-12 6:45 ` [PATCH 1/2] drm/ttm: don't update global memory count for some special cases Chunming Zhou
2018-01-12 6:52 ` He, Roger
2018-01-12 7:54 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39642053-5983-7d25-b2c4-9c6ca381fc77@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Christian.Koenig@amd.com \
--cc=Hongbo.He@amd.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox