From: zhoucm1 <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: "Zhang,
Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
"Mao, David" <David.Mao-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: PRT support for gfx9
Date: Tue, 18 Apr 2017 10:47:33 +0800 [thread overview]
Message-ID: <58F57E45.2040208@amd.com> (raw)
In-Reply-To: <58F57126.1040904-5C7GfCeVMHo@public.gmane.org>
On 2017年04月18日 09:51, Zhang, Jerry (Junwei) wrote:
>
> Anyone could help to review it?
>
> On 04/17/2017 05:04 PM, Junwei Zhang wrote:
>> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 1 +
>> drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +-
>> 3 files changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 9ff445c..51aedf9 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -1269,6 +1269,11 @@ int amdgpu_vm_bo_update(struct amdgpu_device
>> *adev,
>> spin_unlock(&vm->status_lock);
>>
>> list_for_each_entry(mapping, &bo_va->invalids, list) {
>> + if (mapping->flags & AMDGPU_PTE_TILED) {
>> + flags |= AMDGPU_PTE_TILED;
>> + flags &= ~AMDGPU_PTE_VALID;
>> + }
>> +
How about clear operation?
>> r = amdgpu_vm_bo_split_mapping(adev, exclusive,
>> gtt_flags, pages_addr, vm,
>> mapping, flags, mem,
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> index 4904740..8d25914 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
>> @@ -70,6 +70,7 @@
>> /* VEGA10 only */
>> #define AMDGPU_PTE_MTYPE(a) ((uint64_t)a << 57)
>> #define AMDGPU_PTE_MTYPE_MASK AMDGPU_PTE_MTYPE(3ULL)
>> +#define AMDGPU_PTE_TILED (1ULL << 51)
>>
>> /* How to programm VM fault handling */
>> #define AMDGPU_VM_FAULT_STOP_NEVER 0
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index 51a1919..6d033ae 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -324,7 +324,7 @@ static uint64_t gmc_v9_0_get_vm_pte_flags(struct
>> amdgpu_device *adev,
>> }
>>
>> if (flags & AMDGPU_VM_PAGE_PRT)
>> - pte_flag |= AMDGPU_PTE_PRT;
>> + pte_flag |= AMDGPU_PTE_TILED;
PTE_PRT name doesn't make sense?
Regards,
David Zhou
>>
>> return pte_flag;
>> }
>>
> _______________________________________________
> 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
next prev parent reply other threads:[~2017-04-18 2:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 9:04 [PATCH] drm/amdgpu: PRT support for gfx9 Junwei Zhang
[not found] ` <1492419870-2901-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-04-18 1:51 ` Zhang, Jerry (Junwei)
[not found] ` <58F57126.1040904-5C7GfCeVMHo@public.gmane.org>
2017-04-18 2:47 ` zhoucm1 [this message]
[not found] ` <58F57E45.2040208-5C7GfCeVMHo@public.gmane.org>
2017-04-18 3:13 ` Zhang, Jerry (Junwei)
[not found] ` <58F5843F.3050700-5C7GfCeVMHo@public.gmane.org>
2017-04-18 3:25 ` zhoucm1
2017-04-18 11:25 ` Nicolai Hähnle
[not found] ` <ee145d04-5a08-db82-6406-41bb208b81ca-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-19 1:41 ` Zhang, Jerry (Junwei)
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=58F57E45.2040208@amd.com \
--to=david1.zhou-5c7gfcevmho@public.gmane.org \
--cc=David.Mao-5C7GfCeVMHo@public.gmane.org \
--cc=Jerry.Zhang-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@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