From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.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 01:55:22 -0500 [thread overview]
Message-ID: <54364f6c-5fcd-5ea1-8bdb-4c7a007ebf83@amd.com> (raw)
In-Reply-To: <1515737657-2983-2-git-send-email-Hongbo.He@amd.com>
Both patches
Tested-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Andrey
On 01/12/2018 01:14 AM, Roger He wrote:
> 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);
> 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 12:47 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 [this message]
2018-01-12 7:58 ` Christian König
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=54364f6c-5fcd-5ea1-8bdb-4c7a007ebf83@amd.com \
--to=andrey.grodzovsky@amd.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