From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
<ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 5/7] drm/amdgpu: manually map the shadow BOs again
Date: Thu, 30 Aug 2018 11:29:10 +0800 [thread overview]
Message-ID: <5B876486.2060401@amd.com> (raw)
In-Reply-To: <20180829140809.1812-5-christian.koenig-5C7GfCeVMHo@public.gmane.org>
On 08/29/2018 10:08 PM, Christian König wrote:
> Otherwise we won't be able to use the AGP aperture.
do you mean we use AGP for GTT shadow only now?
Jerry
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +----
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index 0cbf651a88a6..de990bdcdd6c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -163,10 +163,7 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)
>
> if (domain & AMDGPU_GEM_DOMAIN_GTT) {
> places[c].fpfn = 0;
> - if (flags & AMDGPU_GEM_CREATE_SHADOW)
> - places[c].lpfn = adev->gmc.gart_size >> PAGE_SHIFT;
> - else
> - places[c].lpfn = 0;
> + places[c].lpfn = 0;
> places[c].flags = TTM_PL_FLAG_TT;
> if (flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)
> places[c].flags |= TTM_PL_FLAG_WC |
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index a3675c7b6190..abe1db4c63f9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -346,6 +346,11 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> r = amdgpu_ttm_alloc_gart(&bo->tbo);
> if (r)
> break;
> + if (bo->shadow) {
> + r = amdgpu_ttm_alloc_gart(&bo->shadow->tbo);
> + if (r)
> + break;
> + }
> list_move(&bo_base->vm_status, &vm->relocated);
> }
> }
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-08-30 3:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 14:08 [PATCH 1/7] drm/amdgpu: correctly sign extend 48bit addresses v3 Christian König
[not found] ` <20180829140809.1812-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-29 14:08 ` [PATCH 2/7] drm/amdgpu: put GART away from VRAM v2 Christian König
[not found] ` <20180829140809.1812-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-30 2:51 ` Zhang, Jerry (Junwei)
2018-08-29 14:08 ` [PATCH 3/7] drm/amdgpu: add amdgpu_gmc_agp_location v2 Christian König
[not found] ` <20180829140809.1812-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-30 3:08 ` Zhang, Jerry (Junwei)
2018-08-29 14:08 ` [PATCH 4/7] drm/amdgpu: use the AGP aperture for system memory access v2 Christian König
[not found] ` <20180829140809.1812-4-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-30 3:20 ` Zhang, Jerry (Junwei)
[not found] ` <5B87627D.9050601-5C7GfCeVMHo@public.gmane.org>
2018-08-30 12:15 ` Christian König
[not found] ` <b7100847-7afc-5665-6752-99173e03934a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-31 1:39 ` Zhang, Jerry (Junwei)
2018-08-29 14:08 ` [PATCH 5/7] drm/amdgpu: manually map the shadow BOs again Christian König
[not found] ` <20180829140809.1812-5-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-30 3:29 ` Zhang, Jerry (Junwei) [this message]
[not found] ` <5B876486.2060401-5C7GfCeVMHo@public.gmane.org>
2018-08-30 12:16 ` Christian König
2018-08-29 14:08 ` [PATCH 6/7] drm/amdgpu: enable AGP aperture for GMC9 Christian König
[not found] ` <20180829140809.1812-6-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-30 4:13 ` Zhang, Jerry (Junwei)
2018-08-29 14:08 ` [PATCH 7/7] drm/amdgpu: try to make kernel allocations USWC 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=5B876486.2060401@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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