From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: christian.koenig-5C7GfCeVMHo@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v2] drm/amdgpu: simplify bo_va list when vm bo update (v2)
Date: Thu, 19 Apr 2018 15:40:46 +0800 [thread overview]
Message-ID: <5AD847FE.9050607@amd.com> (raw)
In-Reply-To: <d18ea29d-4d53-0bad-aacd-3a839e016f80-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 04/19/2018 03:06 PM, Christian König wrote:
> Am 19.04.2018 um 08:53 schrieb Junwei Zhang:
>> v2: fix compiling warning
>>
>> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 ++++++++++------------
>> 1 file changed, 10 insertions(+), 12 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 8c34060..e3e0375 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -1509,6 +1509,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
>> struct drm_mm_node *nodes;
>> struct dma_fence *exclusive, **last_update;
>> uint64_t flags;
>> + uint32_t mem_type;
>> int r;
>> if (clear || !bo_va->base.bo) {
>> @@ -1561,19 +1562,16 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
>> }
>> spin_lock(&vm->status_lock);
>> - if (bo && bo->tbo.resv == vm->root.base.bo->tbo.resv) {
>> - unsigned mem_type = bo->tbo.mem.mem_type;
>> + list_del_init(&bo_va->base.vm_status);
>> - /* If the BO is not in its preferred location add it back to
>> - * the evicted list so that it gets validated again on the
>> - * next command submission.
>> - */
>> - list_del_init(&bo_va->base.vm_status);
>> - if (!(bo->preferred_domains & amdgpu_mem_type_to_domain(mem_type)))
>> - list_add_tail(&bo_va->base.vm_status, &vm->evicted);
>> - } else {
>> - list_del_init(&bo_va->base.vm_status);
>> - }
>> + /* If the BO is not in its preferred location add it back to
>> + * the evicted list so that it gets validated again on the
>> + * next command submission.
>> + */
>> + mem_type = bo->tbo.mem.mem_type;
>> + if (bo && bo->tbo.resv == vm->root.base.bo->tbo.resv &&
>> + !(bo->preferred_domains & amdgpu_mem_type_to_domain(mem_type)))
>
> The indentation on the line above is wrong, the "!(bo..." should be on the same
> column as the "bo &&" above.
Thanks to point that out.
May I get your RB with that fix?
Jerry
>
> Apart from that looks good to me,
> Christian.
>
>> + list_add_tail(&bo_va->base.vm_status, &vm->evicted);
>> spin_unlock(&vm->status_lock);
>> list_splice_init(&bo_va->invalids, &bo_va->valids);
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-04-19 7:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-19 6:53 [PATCH v2] drm/amdgpu: simplify bo_va list when vm bo update (v2) Junwei Zhang
[not found] ` <1524120806-22986-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-04-19 7:06 ` Christian König
[not found] ` <d18ea29d-4d53-0bad-aacd-3a839e016f80-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-04-19 7:40 ` Zhang, Jerry (Junwei) [this message]
[not found] ` <5AD847FE.9050607-5C7GfCeVMHo@public.gmane.org>
2018-04-19 7:42 ` Christian König
[not found] ` <c6e733bb-cc43-357a-f7b6-29e6cf394b01-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-04-19 7:46 ` 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=5AD847FE.9050607@amd.com \
--to=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