From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: Chunming Zhou <david1.zhou-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: invalidate parent bo when shadow bo was invalidated
Date: Fri, 4 May 2018 16:09:47 +0800 [thread overview]
Message-ID: <5AEC154B.3020109@amd.com> (raw)
In-Reply-To: <20180504064408.26471-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
On 05/04/2018 02:44 PM, Chunming Zhou wrote:
> Shadow BO is located on GTT and its parent (PT and PD) BO could located on VRAM.
> In some case, the BO on GTT could be evicted but the parent did not. This may
> cause the shadow BO not be put in the evict list and could not be invalidate
> correctly.
> v2: suggested by Christian
>
> Change-Id: Iad10d9a3031fa2b243879b9e58ee4d8c527eb433
> Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
> Reported-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 71dcdefce255..8e71d3984016 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -2252,6 +2252,10 @@ void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev,
> {
> struct amdgpu_vm_bo_base *bo_base;
>
> + /* shadow bo doesn't have bo base, its validation needs its parent */
> + if (bo->parent && bo->parent->shadow == bo)
> + bo = bo->parent;
> +
> list_for_each_entry(bo_base, &bo->va, bo_list) {
> struct amdgpu_vm *vm = bo_base->vm;
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-05-04 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 6:44 [PATCH] drm/amdgpu: invalidate parent bo when shadow bo was invalidated Chunming Zhou
[not found] ` <20180504064408.26471-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-05-04 8:09 ` Zhang, Jerry (Junwei) [this message]
2018-05-04 13:22 ` 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=5AEC154B.3020109@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=Shaoyun.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=david1.zhou-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.