* [PATCH] drm/amdgpu: partial revert cleanup setting bulk_movable v2
@ 2019-01-31 7:57 Christian König
[not found] ` <20190131075720.2809-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Christian König @ 2019-01-31 7:57 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
We still need to set bulk_movable to false when new BOs are added or removed.
v2: also set it to false on removal
Signed-off-by: Christian König <christian.koenig@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 79f9dde70bc0..822546a149fa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -332,6 +332,7 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
return;
+ vm->bulk_moveable = false;
if (bo->tbo.type == ttm_bo_type_kernel)
amdgpu_vm_bo_relocated(base);
else
@@ -2772,6 +2773,9 @@ void amdgpu_vm_bo_rmv(struct amdgpu_device *adev,
struct amdgpu_vm_bo_base **base;
if (bo) {
+ if (bo->tbo.resv == vm->root.base.bo->tbo.resv)
+ vm->bulk_moveable = false;
+
for (base = &bo_va->base.bo->vm_bo; *base;
base = &(*base)->next) {
if (*base != &bo_va->base)
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] drm/amdgpu: partial revert cleanup setting bulk_movable v2
[not found] ` <20190131075720.2809-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
@ 2019-01-31 10:55 ` Zhou, David(ChunMing)
0 siblings, 0 replies; 2+ messages in thread
From: Zhou, David(ChunMing) @ 2019-01-31 10:55 UTC (permalink / raw)
To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
If Tom tests it OK as well, feel free add my RB to submit it ASAP.
-David
> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of
> Christian K?nig
> Sent: Thursday, January 31, 2019 3:57 PM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu: partial revert cleanup setting bulk_movable
> v2
>
> We still need to set bulk_movable to false when new BOs are added or
> removed.
>
> v2: also set it to false on removal
>
> Signed-off-by: Christian König <christian.koenig@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 79f9dde70bc0..822546a149fa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -332,6 +332,7 @@ static void amdgpu_vm_bo_base_init(struct
> amdgpu_vm_bo_base *base,
> if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
> return;
>
> + vm->bulk_moveable = false;
> if (bo->tbo.type == ttm_bo_type_kernel)
> amdgpu_vm_bo_relocated(base);
> else
> @@ -2772,6 +2773,9 @@ void amdgpu_vm_bo_rmv(struct amdgpu_device
> *adev,
> struct amdgpu_vm_bo_base **base;
>
> if (bo) {
> + if (bo->tbo.resv == vm->root.base.bo->tbo.resv)
> + vm->bulk_moveable = false;
> +
> for (base = &bo_va->base.bo->vm_bo; *base;
> base = &(*base)->next) {
> if (*base != &bo_va->base)
> --
> 2.17.1
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-31 10:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 7:57 [PATCH] drm/amdgpu: partial revert cleanup setting bulk_movable v2 Christian König
[not found] ` <20190131075720.2809-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-01-31 10:55 ` Zhou, David(ChunMing)
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.