From: "Yu, Lang" <Lang.Yu@amd.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
"thomas_os@shipmail.org" <thomas_os@shipmail.org>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: RE: [PATCH 3/4] drm/amdgpu: always allow evicting to SYSTEM domain
Date: Wed, 2 Jun 2021 01:30:47 +0000 [thread overview]
Message-ID: <MN2PR12MB42568DC3EC6619E1E546E488FB3D9@MN2PR12MB4256.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20210601122528.1643-3-christian.koenig@amd.com>
>-----Original Message-----
>From: Christian König <ckoenig.leichtzumerken@gmail.com>
>Sent: Tuesday, June 1, 2021 8:25 PM
>To: Yu, Lang <Lang.Yu@amd.com>; thomas_os@shipmail.org
>Cc: dri-devel@lists.freedesktop.org
>Subject: [PATCH 3/4] drm/amdgpu: always allow evicting to SYSTEM domain
>
>When we run out of GTT we should still be able to evict VRAM->SYSTEM with a
>bounce bufferdrm/amdgpu: always allow evicting to SYSTEM domain
>
>Signed-off-by: Christian König <christian.koenig@amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>index 6bdff9005a47..0faf9765ef41 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>@@ -147,14 +147,16 @@ static void amdgpu_evict_flags(struct
>ttm_buffer_object *bo,
> * BOs to be evicted from VRAM
> */
> amdgpu_bo_placement_from_domain(abo,
>AMDGPU_GEM_DOMAIN_VRAM |
>-
>AMDGPU_GEM_DOMAIN_GTT);
>+
> AMDGPU_GEM_DOMAIN_GTT |
>+
> AMDGPU_GEM_DOMAIN_CPU);
> abo->placements[0].fpfn = adev-
>>gmc.visible_vram_size >> PAGE_SHIFT;
> abo->placements[0].lpfn = 0;
> abo->placement.busy_placement = &abo-
>>placements[1];
> abo->placement.num_busy_placement = 1;
> } else {
> /* Move to GTT memory */
>- amdgpu_bo_placement_from_domain(abo,
>AMDGPU_GEM_DOMAIN_GTT);
>+ amdgpu_bo_placement_from_domain(abo,
>AMDGPU_GEM_DOMAIN_GTT |
>+
> AMDGPU_GEM_DOMAIN_CPU);
> }
> break;
> case TTM_PL_TT:
>--
>2.25.1
[Yu, Lang]
Yeah, that's it.
next prev parent reply other threads:[~2021-06-02 1:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-01 12:25 [PATCH 1/4] drm/ttm: add TTM_PL_FLAG_TEMPORARY flag v3 Christian König
2021-06-01 12:25 ` [PATCH 2/4] drm/amdgpu: user temporary GTT as bounce buffer Christian König
2021-06-01 12:25 ` [PATCH 3/4] drm/amdgpu: always allow evicting to SYSTEM domain Christian König
2021-06-02 1:30 ` Yu, Lang [this message]
2021-06-01 12:25 ` [PATCH 4/4] drm/amdgpu: switch gtt_mgr to counting used pages Christian König
2021-06-07 12:36 ` [PATCH 1/4] drm/ttm: add TTM_PL_FLAG_TEMPORARY flag v3 Christian König
2021-06-07 12:38 ` Thomas Hellström (Intel)
2021-06-07 12:41 ` Christian König
2021-06-07 12:58 ` Yu, Lang
2021-06-07 13:01 ` Christian König
2021-06-07 14:42 ` Das, Nirmoy
2021-06-07 15:27 ` Das, Nirmoy
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=MN2PR12MB42568DC3EC6619E1E546E488FB3D9@MN2PR12MB4256.namprd12.prod.outlook.com \
--to=lang.yu@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=thomas_os@shipmail.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;
as well as URLs for NNTP newsgroup(s).