Instead of the busy placement.

Signed-off-by: Christian König <christian.koe...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index d15eee98204d..327b8af6cc1a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1393,8 +1393,7 @@ vm_fault_t amdgpu_bo_fault_reserve_notify(struct 
ttm_buffer_object *bo)
                                        AMDGPU_GEM_DOMAIN_GTT);
 
        /* Avoid costly evictions; only set GTT as a busy placement */
-       abo->placement.num_busy_placement = 1;
-       abo->placement.busy_placement = &abo->placements[1];
+       abo->placements[0].flags |= TTM_PL_FLAG_IDLE;
 
        r = ttm_bo_validate(bo, &abo->placement, &ctx);
        if (unlikely(r == -EBUSY || r == -ERESTARTSYS))
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 489e22190e29..27f0acb7b3da 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -153,8 +153,7 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo,
                                                        AMDGPU_GEM_DOMAIN_CPU);
                        abo->placements[0].fpfn = adev->gmc.visible_vram_size 
>> PAGE_SHIFT;
                        abo->placements[0].lpfn = 0;
-                       abo->placement.busy_placement = &abo->placements[1];
-                       abo->placement.num_busy_placement = 1;
+                       abo->placements[0].flags = TTM_PL_FLAG_IDLE;
                } else {
                        /* Move to GTT memory */
                        amdgpu_bo_placement_from_domain(abo, 
AMDGPU_GEM_DOMAIN_GTT |
-- 
2.25.1

Reply via email to