[PATCH 02/13] drm/radeon/kms: update to TTM no_wait splitted argument
This patch update radeon to the new no_wait splitted argument TTM functionality. Signed-off-by: Jerome Glisse jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_object.c |6 ++-- drivers/gpu/drm/radeon/radeon_ttm.c| 39 +-- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index dc7e3f4..4b441f8 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -191,7 +191,7 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr) } for (i = 0; i bo-placement.num_placement; i++) bo-placements[i] |= TTM_PL_FLAG_NO_EVICT; - r = ttm_bo_validate(bo-tbo, bo-placement, false, false); + r = ttm_bo_validate(bo-tbo, bo-placement, false, false, false); if (likely(r == 0)) { bo-pin_count = 1; if (gpu_addr != NULL) @@ -215,7 +215,7 @@ int radeon_bo_unpin(struct radeon_bo *bo) return 0; for (i = 0; i bo-placement.num_placement; i++) bo-placements[i] = ~TTM_PL_FLAG_NO_EVICT; - r = ttm_bo_validate(bo-tbo, bo-placement, false, false); + r = ttm_bo_validate(bo-tbo, bo-placement, false, false, false); if (unlikely(r != 0)) dev_err(bo-rdev-dev, %p validate failed for unpin\n, bo); return r; @@ -330,7 +330,7 @@ int radeon_bo_list_validate(struct list_head *head) lobj-rdomain); } r = ttm_bo_validate(bo-tbo, bo-placement, - true, false); + true, false, false); if (unlikely(r)) return r; } diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index fc787e8..992dfc8 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -244,9 +244,9 @@ static void radeon_move_null(struct ttm_buffer_object *bo, } static int radeon_move_blit(struct ttm_buffer_object *bo, - bool evict, int no_wait, - struct ttm_mem_reg *new_mem, - struct ttm_mem_reg *old_mem) + bool evict, int no_wait_reserve, bool no_wait_gpu, + struct ttm_mem_reg *new_mem, + struct ttm_mem_reg *old_mem) { struct radeon_device *rdev; uint64_t old_start, new_start; @@ -290,13 +290,14 @@ static int radeon_move_blit(struct ttm_buffer_object *bo, r = radeon_copy(rdev, old_start, new_start, new_mem-num_pages, fence); /* FIXME: handle copy error */ r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL, - evict, no_wait, new_mem); + evict, no_wait_reserve, no_wait_gpu, new_mem); radeon_fence_unref(fence); return r; } static int radeon_move_vram_ram(struct ttm_buffer_object *bo, - bool evict, bool interruptible, bool no_wait, + bool evict, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu, struct ttm_mem_reg *new_mem) { struct radeon_device *rdev; @@ -317,7 +318,7 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, placement.busy_placement = placements; placements = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT; r = ttm_bo_mem_space(bo, placement, tmp_mem, -interruptible, no_wait); +interruptible, no_wait_reserve, no_wait_gpu); if (unlikely(r)) { return r; } @@ -331,11 +332,11 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, if (unlikely(r)) { goto out_cleanup; } - r = radeon_move_blit(bo, true, no_wait, tmp_mem, old_mem); + r = radeon_move_blit(bo, true, no_wait_reserve, no_wait_gpu, tmp_mem, old_mem); if (unlikely(r)) { goto out_cleanup; } - r = ttm_bo_move_ttm(bo, true, no_wait, new_mem); + r = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, new_mem); out_cleanup: if (tmp_mem.mm_node) { struct ttm_bo_global *glob = rdev-mman.bdev.glob; @@ -349,7 +350,8 @@ out_cleanup: } static int radeon_move_ram_vram(struct ttm_buffer_object *bo, - bool evict, bool interruptible, bool no_wait, + bool evict, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu, struct ttm_mem_reg *new_mem) { struct
[PATCH 02/13] drm/radeon/kms: update to TTM no_wait splitted argument
This patch update radeon to the new no_wait splitted argument TTM functionality. Signed-off-by: Jerome Glisse jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_object.c |6 ++-- drivers/gpu/drm/radeon/radeon_ttm.c| 39 +-- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index fc9d00a..3adfa88 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -189,7 +189,7 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr) bo-placement.lpfn = bo-rdev-mc.visible_vram_size PAGE_SHIFT; for (i = 0; i bo-placement.num_placement; i++) bo-placements[i] |= TTM_PL_FLAG_NO_EVICT; - r = ttm_bo_validate(bo-tbo, bo-placement, false, false); + r = ttm_bo_validate(bo-tbo, bo-placement, false, false, false); if (likely(r == 0)) { bo-pin_count = 1; if (gpu_addr != NULL) @@ -213,7 +213,7 @@ int radeon_bo_unpin(struct radeon_bo *bo) return 0; for (i = 0; i bo-placement.num_placement; i++) bo-placements[i] = ~TTM_PL_FLAG_NO_EVICT; - r = ttm_bo_validate(bo-tbo, bo-placement, false, false); + r = ttm_bo_validate(bo-tbo, bo-placement, false, false, false); if (unlikely(r != 0)) dev_err(bo-rdev-dev, %p validate failed for unpin\n, bo); return r; @@ -328,7 +328,7 @@ int radeon_bo_list_validate(struct list_head *head) lobj-rdomain); } r = ttm_bo_validate(bo-tbo, bo-placement, - true, false); + true, false, false); if (unlikely(r)) return r; } diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 43c5ab3..ba4724c 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -243,9 +243,9 @@ static void radeon_move_null(struct ttm_buffer_object *bo, } static int radeon_move_blit(struct ttm_buffer_object *bo, - bool evict, int no_wait, - struct ttm_mem_reg *new_mem, - struct ttm_mem_reg *old_mem) + bool evict, int no_wait_reserve, bool no_wait_gpu, + struct ttm_mem_reg *new_mem, + struct ttm_mem_reg *old_mem) { struct radeon_device *rdev; uint64_t old_start, new_start; @@ -289,13 +289,14 @@ static int radeon_move_blit(struct ttm_buffer_object *bo, r = radeon_copy(rdev, old_start, new_start, new_mem-num_pages, fence); /* FIXME: handle copy error */ r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL, - evict, no_wait, new_mem); + evict, no_wait_reserve, no_wait_gpu, new_mem); radeon_fence_unref(fence); return r; } static int radeon_move_vram_ram(struct ttm_buffer_object *bo, - bool evict, bool interruptible, bool no_wait, + bool evict, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu, struct ttm_mem_reg *new_mem) { struct radeon_device *rdev; @@ -316,7 +317,7 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, placement.busy_placement = placements; placements = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT; r = ttm_bo_mem_space(bo, placement, tmp_mem, -interruptible, no_wait); +interruptible, no_wait_reserve, no_wait_gpu); if (unlikely(r)) { return r; } @@ -330,11 +331,11 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, if (unlikely(r)) { goto out_cleanup; } - r = radeon_move_blit(bo, true, no_wait, tmp_mem, old_mem); + r = radeon_move_blit(bo, true, no_wait_reserve, no_wait_gpu, tmp_mem, old_mem); if (unlikely(r)) { goto out_cleanup; } - r = ttm_bo_move_ttm(bo, true, no_wait, new_mem); + r = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, new_mem); out_cleanup: if (tmp_mem.mm_node) { struct ttm_bo_global *glob = rdev-mman.bdev.glob; @@ -348,7 +349,8 @@ out_cleanup: } static int radeon_move_ram_vram(struct ttm_buffer_object *bo, - bool evict, bool interruptible, bool no_wait, + bool evict, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu,
[PATCH 02/13] drm/radeon/kms: update to TTM no_wait splitted argument
This patch update radeon to the new no_wait splitted argument TTM functionality. Signed-off-by: Jerome Glisse jgli...@redhat.com --- drivers/gpu/drm/radeon/radeon_object.c |6 ++-- drivers/gpu/drm/radeon/radeon_ttm.c| 39 +-- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index fc9d00a..3adfa88 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -189,7 +189,7 @@ int radeon_bo_pin(struct radeon_bo *bo, u32 domain, u64 *gpu_addr) bo-placement.lpfn = bo-rdev-mc.visible_vram_size PAGE_SHIFT; for (i = 0; i bo-placement.num_placement; i++) bo-placements[i] |= TTM_PL_FLAG_NO_EVICT; - r = ttm_bo_validate(bo-tbo, bo-placement, false, false); + r = ttm_bo_validate(bo-tbo, bo-placement, false, false, false); if (likely(r == 0)) { bo-pin_count = 1; if (gpu_addr != NULL) @@ -213,7 +213,7 @@ int radeon_bo_unpin(struct radeon_bo *bo) return 0; for (i = 0; i bo-placement.num_placement; i++) bo-placements[i] = ~TTM_PL_FLAG_NO_EVICT; - r = ttm_bo_validate(bo-tbo, bo-placement, false, false); + r = ttm_bo_validate(bo-tbo, bo-placement, false, false, false); if (unlikely(r != 0)) dev_err(bo-rdev-dev, %p validate failed for unpin\n, bo); return r; @@ -328,7 +328,7 @@ int radeon_bo_list_validate(struct list_head *head) lobj-rdomain); } r = ttm_bo_validate(bo-tbo, bo-placement, - true, false); + true, false, false); if (unlikely(r)) return r; } diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 43c5ab3..ba4724c 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -243,9 +243,9 @@ static void radeon_move_null(struct ttm_buffer_object *bo, } static int radeon_move_blit(struct ttm_buffer_object *bo, - bool evict, int no_wait, - struct ttm_mem_reg *new_mem, - struct ttm_mem_reg *old_mem) + bool evict, int no_wait_reserve, bool no_wait_gpu, + struct ttm_mem_reg *new_mem, + struct ttm_mem_reg *old_mem) { struct radeon_device *rdev; uint64_t old_start, new_start; @@ -289,13 +289,14 @@ static int radeon_move_blit(struct ttm_buffer_object *bo, r = radeon_copy(rdev, old_start, new_start, new_mem-num_pages, fence); /* FIXME: handle copy error */ r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL, - evict, no_wait, new_mem); + evict, no_wait_reserve, no_wait_gpu, new_mem); radeon_fence_unref(fence); return r; } static int radeon_move_vram_ram(struct ttm_buffer_object *bo, - bool evict, bool interruptible, bool no_wait, + bool evict, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu, struct ttm_mem_reg *new_mem) { struct radeon_device *rdev; @@ -316,7 +317,7 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, placement.busy_placement = placements; placements = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT; r = ttm_bo_mem_space(bo, placement, tmp_mem, -interruptible, no_wait); +interruptible, no_wait_reserve, no_wait_gpu); if (unlikely(r)) { return r; } @@ -330,11 +331,11 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo, if (unlikely(r)) { goto out_cleanup; } - r = radeon_move_blit(bo, true, no_wait, tmp_mem, old_mem); + r = radeon_move_blit(bo, true, no_wait_reserve, no_wait_gpu, tmp_mem, old_mem); if (unlikely(r)) { goto out_cleanup; } - r = ttm_bo_move_ttm(bo, true, no_wait, new_mem); + r = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, new_mem); out_cleanup: if (tmp_mem.mm_node) { struct ttm_bo_global *glob = rdev-mman.bdev.glob; @@ -348,7 +349,8 @@ out_cleanup: } static int radeon_move_ram_vram(struct ttm_buffer_object *bo, - bool evict, bool interruptible, bool no_wait, + bool evict, bool interruptible, + bool no_wait_reserve, bool no_wait_gpu,