Re: [PATCH 3/3] drm/amdgpu: fix idle state and bulk_moveavle flag

2018-08-31 Thread Michel Dänzer
On 2018-08-31 3:10 p.m., Christian König wrote:
> Add BOs to the idle state again and correctly clear the flag when
> new BOs are added.
> 
> Signed-off-by: Christian König 

Typo in the shortlog: bulk_moveavle -> bulk_moveable


The series is

Tested-by: Michel Dänzer 

Thanks Christian!


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH 3/3] drm/amdgpu: fix idle state and bulk_moveavle flag

2018-08-31 Thread Christian König
Add BOs to the idle state again and correctly clear the flag when
new BOs are added.

Signed-off-by: Christian König 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index f31fa351caba..d59222fb5931 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -156,12 +156,15 @@ static void amdgpu_vm_bo_base_init(struct 
amdgpu_vm_bo_base *base,
return;
list_add_tail(>bo_list, >va);
 
-   if (bo->tbo.type == ttm_bo_type_kernel)
-   list_move(>vm_status, >relocated);
-
if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
return;
 
+   vm->bulk_moveable = false;
+   if (bo->tbo.type == ttm_bo_type_kernel)
+   list_move(>vm_status, >relocated);
+   else
+   list_move(>vm_status, >idle);
+
if (bo->preferred_domains &
amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type))
return;
@@ -1121,7 +1124,7 @@ int amdgpu_vm_update_directories(struct amdgpu_device 
*adev,
   struct amdgpu_vm_bo_base,
   vm_status);
bo_base->moved = false;
-   list_del_init(_base->vm_status);
+   list_move(_base->vm_status, >idle);
 
bo = bo_base->bo->parent;
if (!bo)
@@ -2646,7 +2649,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct 
amdgpu_vm *vm,
return r;
 
vm->pte_support_ats = false;
-   vm->bulk_moveable = true;
 
if (vm_context == AMDGPU_VM_CONTEXT_COMPUTE) {
vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
-- 
2.14.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx