* [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space
@ 2023-12-13 14:42 Christian König
2023-12-13 14:42 ` [PATCH 2/4] drm/ttm: replace busy placement with flags v3 Christian König
` (7 more replies)
0 siblings, 8 replies; 13+ messages in thread
From: Christian König @ 2023-12-13 14:42 UTC (permalink / raw)
To: dri-devel, intel-gfx
Only convert it to ENOMEM in ttm_bo_validate.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index edf10618fe2b..8c1eaa74fa21 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -830,7 +830,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo,
goto error;
}
- ret = -ENOMEM;
+ ret = -ENOSPC;
if (!type_found) {
pr_err(TTM_PFX "No compatible memory type found\n");
ret = -EINVAL;
@@ -916,6 +916,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo,
return -EINVAL;
ret = ttm_bo_move_buffer(bo, placement, ctx);
+ /* For backward compatibility with userspace */
+ if (ret == -ENOSPC)
+ return -ENOMEM;
if (ret)
return ret;
--
2.34.1
^ permalink raw reply related [flat|nested] 13+ messages in thread* [PATCH 2/4] drm/ttm: replace busy placement with flags v3 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König @ 2023-12-13 14:42 ` Christian König 2023-12-13 14:42 ` [PATCH 3/4] drm/ttm: improve idle/busy handling Christian König ` (6 subsequent siblings) 7 siblings, 0 replies; 13+ messages in thread From: Christian König @ 2023-12-13 14:42 UTC (permalink / raw) To: dri-devel, intel-gfx From: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com> Instead of a list of separate busy placement add flags which indicate that a placement should only be used when there is room or if we need to evict. v2: add missing TTM_PL_FLAG_IDLE for i915 v3: fix auto build test ERROR on drm-tip/drm-tip Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 +-- drivers/gpu/drm/drm_gem_vram_helper.c | 2 - drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 37 ++++---- drivers/gpu/drm/loongson/lsdc_ttm.c | 2 - drivers/gpu/drm/nouveau/nouveau_bo.c | 59 +++++-------- drivers/gpu/drm/nouveau/nouveau_bo.h | 1 - drivers/gpu/drm/qxl/qxl_object.c | 2 - drivers/gpu/drm/qxl/qxl_ttm.c | 2 - drivers/gpu/drm/radeon/radeon_object.c | 2 - drivers/gpu/drm/radeon/radeon_ttm.c | 8 +- drivers/gpu/drm/radeon/radeon_uvd.c | 1 - drivers/gpu/drm/ttm/ttm_bo.c | 21 +++-- drivers/gpu/drm/ttm/ttm_resource.c | 73 ++++------------ drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 3 +- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 99 +++++++++++++++++----- include/drm/ttm/ttm_placement.h | 10 ++- include/drm/ttm/ttm_resource.h | 8 +- 18 files changed, 160 insertions(+), 187 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index cef920a93924..aa0dd6dad068 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -220,9 +220,6 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain) placement->num_placement = c; placement->placement = places; - - placement->num_busy_placement = c; - placement->busy_placement = places; } /** @@ -1406,8 +1403,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 05991c5c8ddb..9a6a00b1af40 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -102,23 +102,19 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, /* Don't handle scatter gather BOs */ if (bo->type == ttm_bo_type_sg) { placement->num_placement = 0; - placement->num_busy_placement = 0; return; } /* Object isn't an AMDGPU object so ignore */ if (!amdgpu_bo_is_amdgpu_bo(bo)) { placement->placement = &placements; - placement->busy_placement = &placements; placement->num_placement = 1; - placement->num_busy_placement = 1; return; } abo = ttm_to_amdgpu_bo(bo); if (abo->flags & AMDGPU_GEM_CREATE_DISCARDABLE) { placement->num_placement = 0; - placement->num_busy_placement = 0; return; } @@ -128,13 +124,13 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, case AMDGPU_PL_OA: case AMDGPU_PL_DOORBELL: placement->num_placement = 0; - placement->num_busy_placement = 0; return; case TTM_PL_VRAM: if (!adev->mman.buffer_funcs_enabled) { /* Move to system memory */ amdgpu_bo_placement_from_domain(abo, AMDGPU_GEM_DOMAIN_CPU); + } else if (!amdgpu_gmc_vram_full_visible(&adev->gmc) && !(abo->flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) && amdgpu_bo_in_cpu_visible_vram(abo)) { @@ -149,8 +145,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 | @@ -967,8 +962,6 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) /* allocate GART space */ placement.num_placement = 1; placement.placement = &placements; - placement.num_busy_placement = 1; - placement.busy_placement = &placements; placements.fpfn = 0; placements.lpfn = adev->gmc.gart_size >> PAGE_SHIFT; placements.mem_type = TTM_PL_TT; diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index b67eafa55715..75f2eaf0d5b6 100644 --- a/drivers/gpu/drm/drm_gem_vram_helper.c +++ b/drivers/gpu/drm/drm_gem_vram_helper.c @@ -147,7 +147,6 @@ static void drm_gem_vram_placement(struct drm_gem_vram_object *gbo, invariant_flags = TTM_PL_FLAG_TOPDOWN; gbo->placement.placement = gbo->placements; - gbo->placement.busy_placement = gbo->placements; if (pl_flag & DRM_GEM_VRAM_PL_FLAG_VRAM) { gbo->placements[c].mem_type = TTM_PL_VRAM; @@ -160,7 +159,6 @@ static void drm_gem_vram_placement(struct drm_gem_vram_object *gbo, } gbo->placement.num_placement = c; - gbo->placement.num_busy_placement = c; for (i = 0; i < c; ++i) { gbo->placements[i].fpfn = 0; diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 9227f8146a58..48fc9779fd50 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -65,8 +65,6 @@ static const struct ttm_place sys_placement_flags = { static struct ttm_placement i915_sys_placement = { .num_placement = 1, .placement = &sys_placement_flags, - .num_busy_placement = 1, - .busy_placement = &sys_placement_flags, }; /** @@ -157,32 +155,28 @@ i915_ttm_place_from_region(const struct intel_memory_region *mr, static void i915_ttm_placement_from_obj(const struct drm_i915_gem_object *obj, - struct ttm_place *requested, - struct ttm_place *busy, + struct ttm_place *places, struct ttm_placement *placement) { unsigned int num_allowed = obj->mm.n_placements; unsigned int flags = obj->flags; unsigned int i; - placement->num_placement = 1; + places[0].flags |= TTM_PL_FLAG_IDLE; i915_ttm_place_from_region(num_allowed ? obj->mm.placements[0] : - obj->mm.region, requested, obj->bo_offset, + obj->mm.region, &places[0], obj->bo_offset, obj->base.size, flags); /* Cache this on object? */ - placement->num_busy_placement = num_allowed; - for (i = 0; i < placement->num_busy_placement; ++i) - i915_ttm_place_from_region(obj->mm.placements[i], busy + i, - obj->bo_offset, obj->base.size, flags); - - if (num_allowed == 0) { - *busy = *requested; - placement->num_busy_placement = 1; + for (i = 0; i < num_allowed; ++i) { + i915_ttm_place_from_region(obj->mm.placements[i], + &places[i + 1], obj->bo_offset, + obj->base.size, flags); + places[i + 1].flags |= TTM_PL_FLAG_BUSY; } - placement->placement = requested; - placement->busy_placement = busy; + placement->num_placement = num_allowed + 1; + placement->placement = places; } static int i915_ttm_tt_shmem_populate(struct ttm_device *bdev, @@ -789,7 +783,8 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj, int ret; /* First try only the requested placement. No eviction. */ - real_num_busy = fetch_and_zero(&placement->num_busy_placement); + real_num_busy = placement->num_placement; + placement->num_placement = 1; ret = ttm_bo_validate(bo, placement, &ctx); if (ret) { ret = i915_ttm_err_to_gem(ret); @@ -805,7 +800,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj, * If the initial attempt fails, allow all accepted placements, * evicting if necessary. */ - placement->num_busy_placement = real_num_busy; + placement->num_placement = real_num_busy; ret = ttm_bo_validate(bo, placement, &ctx); if (ret) return i915_ttm_err_to_gem(ret); @@ -839,7 +834,7 @@ static int __i915_ttm_get_pages(struct drm_i915_gem_object *obj, static int i915_ttm_get_pages(struct drm_i915_gem_object *obj) { - struct ttm_place requested, busy[I915_TTM_MAX_PLACEMENTS]; + struct ttm_place places[I915_TTM_MAX_PLACEMENTS + 1]; struct ttm_placement placement; /* restricted by sg_alloc_table */ @@ -849,7 +844,7 @@ static int i915_ttm_get_pages(struct drm_i915_gem_object *obj) GEM_BUG_ON(obj->mm.n_placements > I915_TTM_MAX_PLACEMENTS); /* Move to the requested placement. */ - i915_ttm_placement_from_obj(obj, &requested, busy, &placement); + i915_ttm_placement_from_obj(obj, places, &placement); return __i915_ttm_get_pages(obj, &placement); } @@ -879,9 +874,7 @@ static int __i915_ttm_migrate(struct drm_i915_gem_object *obj, i915_ttm_place_from_region(mr, &requested, obj->bo_offset, obj->base.size, flags); placement.num_placement = 1; - placement.num_busy_placement = 1; placement.placement = &requested; - placement.busy_placement = &requested; ret = __i915_ttm_get_pages(obj, &placement); if (ret) diff --git a/drivers/gpu/drm/loongson/lsdc_ttm.c b/drivers/gpu/drm/loongson/lsdc_ttm.c index bf79dc55afa4..465f622ac05d 100644 --- a/drivers/gpu/drm/loongson/lsdc_ttm.c +++ b/drivers/gpu/drm/loongson/lsdc_ttm.c @@ -54,7 +54,6 @@ static void lsdc_bo_set_placement(struct lsdc_bo *lbo, u32 domain) pflags |= TTM_PL_FLAG_TOPDOWN; lbo->placement.placement = lbo->placements; - lbo->placement.busy_placement = lbo->placements; if (domain & LSDC_GEM_DOMAIN_VRAM) { lbo->placements[c].mem_type = TTM_PL_VRAM; @@ -77,7 +76,6 @@ static void lsdc_bo_set_placement(struct lsdc_bo *lbo, u32 domain) } lbo->placement.num_placement = c; - lbo->placement.num_busy_placement = c; for (i = 0; i < c; ++i) { lbo->placements[i].fpfn = 0; diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index b7dda486a7ea..a982cbb6f5b2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -403,27 +403,6 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 size, int align, return 0; } -static void -set_placement_list(struct ttm_place *pl, unsigned *n, uint32_t domain) -{ - *n = 0; - - if (domain & NOUVEAU_GEM_DOMAIN_VRAM) { - pl[*n].mem_type = TTM_PL_VRAM; - pl[*n].flags = 0; - (*n)++; - } - if (domain & NOUVEAU_GEM_DOMAIN_GART) { - pl[*n].mem_type = TTM_PL_TT; - pl[*n].flags = 0; - (*n)++; - } - if (domain & NOUVEAU_GEM_DOMAIN_CPU) { - pl[*n].mem_type = TTM_PL_SYSTEM; - pl[(*n)++].flags = 0; - } -} - static void set_placement_range(struct nouveau_bo *nvbo, uint32_t domain) { @@ -451,10 +430,6 @@ set_placement_range(struct nouveau_bo *nvbo, uint32_t domain) nvbo->placements[i].fpfn = fpfn; nvbo->placements[i].lpfn = lpfn; } - for (i = 0; i < nvbo->placement.num_busy_placement; ++i) { - nvbo->busy_placements[i].fpfn = fpfn; - nvbo->busy_placements[i].lpfn = lpfn; - } } } @@ -462,15 +437,32 @@ void nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t domain, uint32_t busy) { - struct ttm_placement *pl = &nvbo->placement; + struct ttm_place *pl = nvbo->placements; + unsigned *n = &nvbo->placement.num_placement; - pl->placement = nvbo->placements; - set_placement_list(nvbo->placements, &pl->num_placement, domain); + domain |= busy; - pl->busy_placement = nvbo->busy_placements; - set_placement_list(nvbo->busy_placements, &pl->num_busy_placement, - domain | busy); + *n = 0; + if (domain & NOUVEAU_GEM_DOMAIN_VRAM) { + pl[*n].mem_type = TTM_PL_VRAM; + pl[*n].flags = busy & NOUVEAU_GEM_DOMAIN_VRAM ? + TTM_PL_FLAG_BUSY : 0; + (*n)++; + } + if (domain & NOUVEAU_GEM_DOMAIN_GART) { + pl[*n].mem_type = TTM_PL_TT; + pl[*n].flags = busy & NOUVEAU_GEM_DOMAIN_GART ? + TTM_PL_FLAG_BUSY : 0; + (*n)++; + } + if (domain & NOUVEAU_GEM_DOMAIN_CPU) { + pl[*n].mem_type = TTM_PL_SYSTEM; + pl[*n].flags = busy & NOUVEAU_GEM_DOMAIN_CPU ? + TTM_PL_FLAG_BUSY : 0; + (*n)++; + } + nvbo->placement.placement = nvbo->placements; set_placement_range(nvbo, domain); } @@ -1313,11 +1305,6 @@ vm_fault_t nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo) nvbo->placements[i].lpfn = mappable; } - for (i = 0; i < nvbo->placement.num_busy_placement; ++i) { - nvbo->busy_placements[i].fpfn = 0; - nvbo->busy_placements[i].lpfn = mappable; - } - nouveau_bo_placement_set(nvbo, NOUVEAU_GEM_DOMAIN_VRAM, 0); } diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h index 70c551921a9e..e9dfab6a8156 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.h +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h @@ -15,7 +15,6 @@ struct nouveau_bo { struct ttm_placement placement; u32 valid_domains; struct ttm_place placements[3]; - struct ttm_place busy_placements[3]; bool force_coherent; struct ttm_bo_kmap_obj kmap; struct list_head head; diff --git a/drivers/gpu/drm/qxl/qxl_object.c b/drivers/gpu/drm/qxl/qxl_object.c index 06a58dad5f5c..1e46b0a6e478 100644 --- a/drivers/gpu/drm/qxl/qxl_object.c +++ b/drivers/gpu/drm/qxl/qxl_object.c @@ -66,7 +66,6 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain) pflag |= TTM_PL_FLAG_TOPDOWN; qbo->placement.placement = qbo->placements; - qbo->placement.busy_placement = qbo->placements; if (domain == QXL_GEM_DOMAIN_VRAM) { qbo->placements[c].mem_type = TTM_PL_VRAM; qbo->placements[c++].flags = pflag; @@ -86,7 +85,6 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain) qbo->placements[c++].flags = 0; } qbo->placement.num_placement = c; - qbo->placement.num_busy_placement = c; for (i = 0; i < c; ++i) { qbo->placements[i].fpfn = 0; qbo->placements[i].lpfn = 0; diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 1a82629bce3f..765a144cea14 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -60,9 +60,7 @@ static void qxl_evict_flags(struct ttm_buffer_object *bo, if (!qxl_ttm_bo_is_qxl_bo(bo)) { placement->placement = &placements; - placement->busy_placement = &placements; placement->num_placement = 1; - placement->num_busy_placement = 1; return; } qbo = to_qxl_bo(bo); diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c index 10c0fbd9d2b4..a955f8a2f7fe 100644 --- a/drivers/gpu/drm/radeon/radeon_object.c +++ b/drivers/gpu/drm/radeon/radeon_object.c @@ -78,7 +78,6 @@ void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain) u32 c = 0, i; rbo->placement.placement = rbo->placements; - rbo->placement.busy_placement = rbo->placements; if (domain & RADEON_GEM_DOMAIN_VRAM) { /* Try placing BOs which don't need CPU access outside of the * CPU accessible part of VRAM @@ -114,7 +113,6 @@ void radeon_ttm_placement_from_domain(struct radeon_bo *rbo, u32 domain) } rbo->placement.num_placement = c; - rbo->placement.num_busy_placement = c; for (i = 0; i < c; ++i) { if ((rbo->flags & RADEON_GEM_CPU_ACCESS) && diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index de4e6d78f1e1..d641f3040117 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -92,9 +92,7 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo, if (!radeon_ttm_bo_is_radeon_bo(bo)) { placement->placement = &placements; - placement->busy_placement = &placements; placement->num_placement = 1; - placement->num_busy_placement = 1; return; } rbo = container_of(bo, struct radeon_bo, tbo); @@ -114,15 +112,11 @@ static void radeon_evict_flags(struct ttm_buffer_object *bo, */ radeon_ttm_placement_from_domain(rbo, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT); - rbo->placement.num_busy_placement = 0; for (i = 0; i < rbo->placement.num_placement; i++) { if (rbo->placements[i].mem_type == TTM_PL_VRAM) { if (rbo->placements[i].fpfn < fpfn) rbo->placements[i].fpfn = fpfn; - } else { - rbo->placement.busy_placement = - &rbo->placements[i]; - rbo->placement.num_busy_placement = 1; + rbo->placements[0].flags |= TTM_PL_FLAG_IDLE; } } } else diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index a2cda184b2b2..058a1c8451b2 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c @@ -324,7 +324,6 @@ void radeon_uvd_force_into_uvd_segment(struct radeon_bo *rbo, rbo->placements[1].fpfn += (256 * 1024 * 1024) >> PAGE_SHIFT; rbo->placements[1].lpfn += (256 * 1024 * 1024) >> PAGE_SHIFT; rbo->placement.num_placement++; - rbo->placement.num_busy_placement++; } void radeon_uvd_free_handles(struct radeon_device *rdev, struct drm_file *filp) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 8c1eaa74fa21..aa12bd5cfd17 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -410,8 +410,8 @@ static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo, struct ttm_resource *hop_mem; int ret; - hop_placement.num_placement = hop_placement.num_busy_placement = 1; - hop_placement.placement = hop_placement.busy_placement = hop; + hop_placement.num_placement = 1; + hop_placement.placement = hop; /* find space in the bounce domain */ ret = ttm_bo_mem_space(bo, &hop_placement, &hop_mem, ctx); @@ -440,10 +440,9 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, dma_resv_assert_held(bo->base.resv); placement.num_placement = 0; - placement.num_busy_placement = 0; bdev->funcs->evict_flags(bo, &placement); - if (!placement.num_placement && !placement.num_busy_placement) { + if (!placement.num_placement) { ret = ttm_bo_wait_ctx(bo, ctx); if (ret) return ret; @@ -791,6 +790,9 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, const struct ttm_place *place = &placement->placement[i]; struct ttm_resource_manager *man; + if (place->flags & TTM_PL_FLAG_BUSY) + continue; + man = ttm_manager_type(bdev, place->mem_type); if (!man || !ttm_resource_manager_used(man)) continue; @@ -813,10 +815,13 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, return 0; } - for (i = 0; i < placement->num_busy_placement; ++i) { - const struct ttm_place *place = &placement->busy_placement[i]; + for (i = 0; i < placement->num_placement; ++i) { + const struct ttm_place *place = &placement->placement[i]; struct ttm_resource_manager *man; + if (place->flags & TTM_PL_FLAG_IDLE) + continue; + man = ttm_manager_type(bdev, place->mem_type); if (!man || !ttm_resource_manager_used(man)) continue; @@ -904,11 +909,11 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, /* * Remove the backing store if no placement is given. */ - if (!placement->num_placement && !placement->num_busy_placement) + if (!placement->num_placement) return ttm_bo_pipeline_gutting(bo); /* Check whether we need to move buffer. */ - if (bo->resource && ttm_resource_compat(bo->resource, placement)) + if (bo->resource && ttm_resource_compatible(bo->resource, placement)) return 0; /* Moving of pinned BOs is forbidden */ diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c index 46ff9c75bb12..3cf1db122980 100644 --- a/drivers/gpu/drm/ttm/ttm_resource.c +++ b/drivers/gpu/drm/ttm/ttm_resource.c @@ -288,37 +288,15 @@ bool ttm_resource_intersects(struct ttm_device *bdev, } /** - * ttm_resource_compatible - test for compatibility + * ttm_resource_compatible - check if resource is compatible with placement * - * @bdev: TTM device structure - * @res: The resource to test - * @place: The placement to test - * @size: How many bytes the new allocation needs. - * - * Test if @res compatible with @place and @size. + * @res: the resource to check + * @placement: the placement to check against * - * Returns true if the res placement compatible with @place and @size. + * Returns true if the placement is compatible. */ -bool ttm_resource_compatible(struct ttm_device *bdev, - struct ttm_resource *res, - const struct ttm_place *place, - size_t size) -{ - struct ttm_resource_manager *man; - - if (!res || !place) - return false; - - man = ttm_manager_type(bdev, res->mem_type); - if (!man->func->compatible) - return true; - - return man->func->compatible(man, res, place, size); -} - -static bool ttm_resource_places_compat(struct ttm_resource *res, - const struct ttm_place *places, - unsigned num_placement) +bool ttm_resource_compatible(struct ttm_resource *res, + struct ttm_placement *placement) { struct ttm_buffer_object *bo = res->bo; struct ttm_device *bdev = bo->bdev; @@ -327,44 +305,25 @@ static bool ttm_resource_places_compat(struct ttm_resource *res, if (res->placement & TTM_PL_FLAG_TEMPORARY) return false; - for (i = 0; i < num_placement; i++) { - const struct ttm_place *heap = &places[i]; + for (i = 0; i < placement->num_placement; i++) { + const struct ttm_place *place = &placement->placement[i]; + struct ttm_resource_manager *man; - if (!ttm_resource_compatible(bdev, res, heap, bo->base.size)) + if (res->mem_type != place->mem_type) + continue; + + man = ttm_manager_type(bdev, res->mem_type); + if (man->func->compatible && + !man->func->compatible(man, res, place, bo->base.size)) continue; - if ((res->mem_type == heap->mem_type) && - (!(heap->flags & TTM_PL_FLAG_CONTIGUOUS) || + if ((!(place->flags & TTM_PL_FLAG_CONTIGUOUS) || (res->placement & TTM_PL_FLAG_CONTIGUOUS))) return true; } return false; } -/** - * ttm_resource_compat - check if resource is compatible with placement - * - * @res: the resource to check - * @placement: the placement to check against - * - * Returns true if the placement is compatible. - */ -bool ttm_resource_compat(struct ttm_resource *res, - struct ttm_placement *placement) -{ - if (ttm_resource_places_compat(res, placement->placement, - placement->num_placement)) - return true; - - if ((placement->busy_placement != placement->placement || - placement->num_busy_placement > placement->num_placement) && - ttm_resource_places_compat(res, placement->busy_placement, - placement->num_busy_placement)) - return true; - - return false; -} - void ttm_resource_set_bo(struct ttm_resource *res, struct ttm_buffer_object *bo) { diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c index 2bfac3aad7b7..7d9c5227d7bb 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_bo.c @@ -179,6 +179,7 @@ int vmw_bo_pin_in_start_of_vram(struct vmw_private *dev_priv, struct ttm_buffer_object *bo = &buf->tbo; int ret = 0; + vmw_execbuf_release_pinned_bo(dev_priv); ret = ttm_bo_reserve(bo, interruptible, false, NULL); if (unlikely(ret != 0)) @@ -821,8 +822,6 @@ void vmw_bo_placement_set(struct vmw_bo *bo, u32 domain, u32 busy_domain) __func__, bo->tbo.resource->mem_type, domain); } - pl->busy_placement = bo->busy_places; - pl->num_busy_placement = set_placement_list(bo->busy_places, busy_domain); } void vmw_bo_placement_set_default_accelerated(struct vmw_bo *bo) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c index af8562c95cc3..e243c9266453 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c @@ -36,6 +36,49 @@ static const struct ttm_place vram_placement_flags = { .flags = 0 }; +struct ttm_placement vmw_vram_placement = { + .num_placement = 1, + .placement = &vram_placement_flags, +}; + +static const struct ttm_place vram_gmr_placement_flags[] = { + { + .fpfn = 0, + .lpfn = 0, + .mem_type = TTM_PL_VRAM, + .flags = TTM_PL_FLAG_IDLE + }, { + .fpfn = 0, + .lpfn = 0, + .mem_type = VMW_PL_GMR, + .flags = 0 + } +}; + +struct ttm_placement vmw_vram_gmr_placement = { + .num_placement = 2, + .placement = vram_gmr_placement_flags, +}; + +static const struct ttm_place vram_sys_placement_flags[] = { + { + .fpfn = 0, + .lpfn = 0, + .mem_type = TTM_PL_VRAM, + .flags = TTM_PL_FLAG_IDLE + }, { + .fpfn = 0, + .lpfn = 0, + .mem_type = TTM_PL_SYSTEM, + .flags = TTM_PL_FLAG_BUSY + } +}; + +struct ttm_placement vmw_vram_sys_placement = { + .num_placement = 2, + .placement = vram_sys_placement_flags, +}; + static const struct ttm_place sys_placement_flags = { .fpfn = 0, .lpfn = 0, @@ -43,46 +86,64 @@ static const struct ttm_place sys_placement_flags = { .flags = 0 }; -static const struct ttm_place gmr_placement_flags = { +struct ttm_placement vmw_sys_placement = { + .num_placement = 1, + .placement = &sys_placement_flags, +}; + +static const struct ttm_place vmw_sys_placement_flags = { .fpfn = 0, .lpfn = 0, - .mem_type = VMW_PL_GMR, + .mem_type = VMW_PL_SYSTEM, .flags = 0 }; -struct ttm_placement vmw_vram_placement = { +struct ttm_placement vmw_pt_sys_placement = { .num_placement = 1, - .placement = &vram_placement_flags, - .num_busy_placement = 1, - .busy_placement = &vram_placement_flags + .placement = &vmw_sys_placement_flags, }; -static const struct ttm_place vram_gmr_placement_flags[] = { +static const struct ttm_place gmr_vram_placement_flags[] = { { .fpfn = 0, .lpfn = 0, - .mem_type = TTM_PL_VRAM, + .mem_type = VMW_PL_GMR, .flags = 0 }, { .fpfn = 0, .lpfn = 0, - .mem_type = VMW_PL_GMR, - .flags = 0 + .mem_type = TTM_PL_VRAM, + .flags = TTM_PL_FLAG_BUSY } }; -struct ttm_placement vmw_vram_gmr_placement = { +struct ttm_placement vmw_srf_placement = { .num_placement = 2, - .placement = vram_gmr_placement_flags, - .num_busy_placement = 1, - .busy_placement = &gmr_placement_flags + .placement = gmr_vram_placement_flags }; -struct ttm_placement vmw_sys_placement = { - .num_placement = 1, - .placement = &sys_placement_flags, - .num_busy_placement = 1, - .busy_placement = &sys_placement_flags +static const struct ttm_place nonfixed_placement_flags[] = { + { + .fpfn = 0, + .lpfn = 0, + .mem_type = TTM_PL_SYSTEM, + .flags = 0 + }, { + .fpfn = 0, + .lpfn = 0, + .mem_type = VMW_PL_GMR, + .flags = TTM_PL_FLAG_IDLE + }, { + .fpfn = 0, + .lpfn = 0, + .mem_type = VMW_PL_MOB, + .flags = TTM_PL_FLAG_IDLE + } +}; + +struct ttm_placement vmw_nonfixed_placement = { + .num_placement = 3, + .placement = nonfixed_placement_flags, }; const size_t vmw_tt_size = sizeof(struct vmw_ttm_tt); diff --git a/include/drm/ttm/ttm_placement.h b/include/drm/ttm/ttm_placement.h index 8074d0f6cae5..c70e489e1f1e 100644 --- a/include/drm/ttm/ttm_placement.h +++ b/include/drm/ttm/ttm_placement.h @@ -64,6 +64,12 @@ /* For multihop handling */ #define TTM_PL_FLAG_TEMPORARY (1 << 2) +/* Placement is never used during eviction */ +#define TTM_PL_FLAG_IDLE (1 << 3) + +/* Placement is only used during eviction */ +#define TTM_PL_FLAG_BUSY (1 << 4) + /** * struct ttm_place * @@ -86,16 +92,12 @@ struct ttm_place { * * @num_placement: number of preferred placements * @placement: preferred placements - * @num_busy_placement: number of preferred placements when need to evict buffer - * @busy_placement: preferred placements when need to evict buffer * * Structure indicating the placement you request for an object. */ struct ttm_placement { unsigned num_placement; const struct ttm_place *placement; - unsigned num_busy_placement; - const struct ttm_place *busy_placement; }; #endif diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h index 78a226eba953..1afa13f0c22b 100644 --- a/include/drm/ttm/ttm_resource.h +++ b/include/drm/ttm/ttm_resource.h @@ -365,12 +365,8 @@ bool ttm_resource_intersects(struct ttm_device *bdev, struct ttm_resource *res, const struct ttm_place *place, size_t size); -bool ttm_resource_compatible(struct ttm_device *bdev, - struct ttm_resource *res, - const struct ttm_place *place, - size_t size); -bool ttm_resource_compat(struct ttm_resource *res, - struct ttm_placement *placement); +bool ttm_resource_compatible(struct ttm_resource *res, + struct ttm_placement *placement); void ttm_resource_set_bo(struct ttm_resource *res, struct ttm_buffer_object *bo); -- 2.34.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/4] drm/ttm: improve idle/busy handling 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König 2023-12-13 14:42 ` [PATCH 2/4] drm/ttm: replace busy placement with flags v3 Christian König @ 2023-12-13 14:42 ` Christian König 2023-12-14 8:30 ` kernel test robot 2023-12-16 0:44 ` kernel test robot 2023-12-13 14:42 ` [PATCH 4/4] drm/amdgpu: use GTT only as fallback for VRAM|GTT Christian König ` (5 subsequent siblings) 7 siblings, 2 replies; 13+ messages in thread From: Christian König @ 2023-12-13 14:42 UTC (permalink / raw) To: dri-devel, intel-gfx Previously we would never try to move a BO into the preferred placements when it ever landed in a busy placement since those were considered compatible. Rework the whole handling and finally unify the idle and busy handling. ttm_bo_validate() is now responsible to try idle placement first and then use the busy placement if that didn't worked. Drawback is that we now always try the idle placement first for each validation which might cause some additional CPU overhead on overcommit. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 131 ++++++++------------- drivers/gpu/drm/ttm/ttm_resource.c | 14 ++- include/drm/ttm/ttm_bo.h | 3 +- include/drm/ttm/ttm_resource.h | 3 +- 6 files changed, 64 insertions(+), 91 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index aa0dd6dad068..f110dfdc4feb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -404,7 +404,7 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev, (*bo_ptr)->placements[i].lpfn = (offset + size) >> PAGE_SHIFT; } r = ttm_bo_mem_space(&(*bo_ptr)->tbo, &(*bo_ptr)->placement, - &(*bo_ptr)->tbo.resource, &ctx); + &(*bo_ptr)->tbo.resource, &ctx, false); if (r) goto error; diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 9a6a00b1af40..00da9a81cf6c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -967,7 +967,7 @@ int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo) placements.mem_type = TTM_PL_TT; placements.flags = bo->resource->placement; - r = ttm_bo_mem_space(bo, &placement, &tmp, &ctx); + r = ttm_bo_mem_space(bo, &placement, &tmp, &ctx, true); if (unlikely(r)) return r; diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index aa12bd5cfd17..17bfc252f76d 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -414,7 +414,7 @@ static int ttm_bo_bounce_temp_buffer(struct ttm_buffer_object *bo, hop_placement.placement = hop; /* find space in the bounce domain */ - ret = ttm_bo_mem_space(bo, &hop_placement, &hop_mem, ctx); + ret = ttm_bo_mem_space(bo, &hop_placement, &hop_mem, ctx, true); if (ret) return ret; /* move to the bounce domain */ @@ -454,7 +454,7 @@ static int ttm_bo_evict(struct ttm_buffer_object *bo, return ttm_bo_pipeline_gutting(bo); } - ret = ttm_bo_mem_space(bo, &placement, &evict_mem, ctx); + ret = ttm_bo_mem_space(bo, &placement, &evict_mem, ctx, true); if (ret) { if (ret != -ERESTARTSYS) { pr_err("Failed to find memory space for buffer 0x%p eviction\n", @@ -724,37 +724,6 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo, return ret; } -/* - * Repeatedly evict memory from the LRU for @mem_type until we create enough - * space, or we've evicted everything and there isn't enough space. - */ -static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo, - const struct ttm_place *place, - struct ttm_resource **mem, - struct ttm_operation_ctx *ctx) -{ - struct ttm_device *bdev = bo->bdev; - struct ttm_resource_manager *man; - struct ww_acquire_ctx *ticket; - int ret; - - man = ttm_manager_type(bdev, place->mem_type); - ticket = dma_resv_locking_ctx(bo->base.resv); - do { - ret = ttm_resource_alloc(bo, place, mem); - if (likely(!ret)) - break; - if (unlikely(ret != -ENOSPC)) - return ret; - ret = ttm_mem_evict_first(bdev, man, place, ctx, - ticket); - if (unlikely(ret != 0)) - return ret; - } while (1); - - return ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu); -} - /** * ttm_bo_mem_space * @@ -763,6 +732,7 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo, * @placement: Proposed new placement for the buffer object. * @mem: A struct ttm_resource. * @ctx: if and how to sleep, lock buffers and alloc memory + * @force_space: If we should evict buffers to force space * * Allocate memory space for the buffer object pointed to by @bo, using * the placement flags in @placement, potentially evicting other idle buffer objects. @@ -776,12 +746,14 @@ static int ttm_bo_mem_force_space(struct ttm_buffer_object *bo, int ttm_bo_mem_space(struct ttm_buffer_object *bo, struct ttm_placement *placement, struct ttm_resource **mem, - struct ttm_operation_ctx *ctx) + struct ttm_operation_ctx *ctx, + bool force_space) { struct ttm_device *bdev = bo->bdev; - bool type_found = false; + struct ww_acquire_ctx *ticket; int i, ret; + ticket = dma_resv_locking_ctx(bo->base.resv); ret = dma_resv_reserve_fences(bo->base.resv, 1); if (unlikely(ret)) return ret; @@ -790,19 +762,30 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, const struct ttm_place *place = &placement->placement[i]; struct ttm_resource_manager *man; - if (place->flags & TTM_PL_FLAG_BUSY) - continue; - man = ttm_manager_type(bdev, place->mem_type); if (!man || !ttm_resource_manager_used(man)) continue; - type_found = true; - ret = ttm_resource_alloc(bo, place, mem); - if (ret == -ENOSPC) + if (place->flags & (force_space ? TTM_PL_FLAG_IDLE : + TTM_PL_FLAG_BUSY)) + continue; + + do { + ret = ttm_resource_alloc(bo, place, mem); + if (unlikely(ret != -ENOSPC)) + return ret; + if (likely(!ret) || !force_space) + break; + + ret = ttm_mem_evict_first(bdev, man, place, ctx, + ticket); + if (unlikely(ret == -EBUSY)) + break; + if (unlikely(ret)) + return ret; + } while (1); + if (ret) continue; - if (unlikely(ret)) - goto error; ret = ttm_bo_add_move_fence(bo, man, *mem, ctx->no_wait_gpu); if (unlikely(ret)) { @@ -810,45 +793,19 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, if (ret == -EBUSY) continue; - goto error; + return ret; } return 0; } - for (i = 0; i < placement->num_placement; ++i) { - const struct ttm_place *place = &placement->placement[i]; - struct ttm_resource_manager *man; - - if (place->flags & TTM_PL_FLAG_IDLE) - continue; - - man = ttm_manager_type(bdev, place->mem_type); - if (!man || !ttm_resource_manager_used(man)) - continue; - - type_found = true; - ret = ttm_bo_mem_force_space(bo, place, mem, ctx); - if (likely(!ret)) - return 0; - - if (ret && ret != -EBUSY) - goto error; - } - - ret = -ENOSPC; - if (!type_found) { - pr_err(TTM_PFX "No compatible memory type found\n"); - ret = -EINVAL; - } - -error: - return ret; + return -ENOSPC; } EXPORT_SYMBOL(ttm_bo_mem_space); static int ttm_bo_move_buffer(struct ttm_buffer_object *bo, struct ttm_placement *placement, - struct ttm_operation_ctx *ctx) + struct ttm_operation_ctx *ctx, + bool force_space) { struct ttm_resource *mem; struct ttm_place hop; @@ -865,7 +822,7 @@ static int ttm_bo_move_buffer(struct ttm_buffer_object *bo, * stop and the driver will be called to make * the second hop. */ - ret = ttm_bo_mem_space(bo, placement, &mem, ctx); + ret = ttm_bo_mem_space(bo, placement, &mem, ctx, force_space); if (ret) return ret; bounce: @@ -902,6 +859,7 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, struct ttm_placement *placement, struct ttm_operation_ctx *ctx) { + bool force_space; int ret; dma_resv_assert_held(bo->base.resv); @@ -912,20 +870,27 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, if (!placement->num_placement) return ttm_bo_pipeline_gutting(bo); - /* Check whether we need to move buffer. */ - if (bo->resource && ttm_resource_compatible(bo->resource, placement)) - return 0; + force_space = false; + do { + /* Check whether we need to move buffer. */ + if (bo->resource && + ttm_resource_compatible(bo->resource, placement, + force_space)) + return 0; + + /* Moving of pinned BOs is forbidden */ + if (bo->pin_count) + return -EINVAL; - /* Moving of pinned BOs is forbidden */ - if (bo->pin_count) - return -EINVAL; + ret = ttm_bo_move_buffer(bo, placement, ctx, force_space); + if (ret && ret != -ENOSPC) + return ret; - ret = ttm_bo_move_buffer(bo, placement, ctx); + force_space = !force_space; + } while (force_space); /* For backward compatibility with userspace */ if (ret == -ENOSPC) return -ENOMEM; - if (ret) - return ret; /* * We might need to add a TTM. diff --git a/drivers/gpu/drm/ttm/ttm_resource.c b/drivers/gpu/drm/ttm/ttm_resource.c index 3cf1db122980..e49e359c7a43 100644 --- a/drivers/gpu/drm/ttm/ttm_resource.c +++ b/drivers/gpu/drm/ttm/ttm_resource.c @@ -296,7 +296,8 @@ bool ttm_resource_intersects(struct ttm_device *bdev, * Returns true if the placement is compatible. */ bool ttm_resource_compatible(struct ttm_resource *res, - struct ttm_placement *placement) + struct ttm_placement *placement, + bool busy) { struct ttm_buffer_object *bo = res->bo; struct ttm_device *bdev = bo->bdev; @@ -312,14 +313,19 @@ bool ttm_resource_compatible(struct ttm_resource *res, if (res->mem_type != place->mem_type) continue; + if (place->flags & (busy ? TTM_PL_FLAG_IDLE : TTM_PL_FLAG_BUSY)) + continue; + + if (place->flags & TTM_PL_FLAG_CONTIGUOUS && + !(res->placement & TTM_PL_FLAG_CONTIGUOUS)) + continue; + man = ttm_manager_type(bdev, res->mem_type); if (man->func->compatible && !man->func->compatible(man, res, place, bo->base.size)) continue; - if ((!(place->flags & TTM_PL_FLAG_CONTIGUOUS) || - (res->placement & TTM_PL_FLAG_CONTIGUOUS))) - return true; + return true; } return false; } diff --git a/include/drm/ttm/ttm_bo.h b/include/drm/ttm/ttm_bo.h index 0223a41a64b2..64d738f152d1 100644 --- a/include/drm/ttm/ttm_bo.h +++ b/include/drm/ttm/ttm_bo.h @@ -397,7 +397,8 @@ vm_fault_t ttm_bo_vm_dummy_page(struct vm_fault *vmf, pgprot_t prot); int ttm_bo_mem_space(struct ttm_buffer_object *bo, struct ttm_placement *placement, struct ttm_resource **mem, - struct ttm_operation_ctx *ctx); + struct ttm_operation_ctx *ctx, + bool force_space); void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); /* diff --git a/include/drm/ttm/ttm_resource.h b/include/drm/ttm/ttm_resource.h index 1afa13f0c22b..514858c49848 100644 --- a/include/drm/ttm/ttm_resource.h +++ b/include/drm/ttm/ttm_resource.h @@ -366,7 +366,8 @@ bool ttm_resource_intersects(struct ttm_device *bdev, const struct ttm_place *place, size_t size); bool ttm_resource_compatible(struct ttm_resource *res, - struct ttm_placement *placement); + struct ttm_placement *placement, + bool busy); void ttm_resource_set_bo(struct ttm_resource *res, struct ttm_buffer_object *bo); -- 2.34.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] drm/ttm: improve idle/busy handling 2023-12-13 14:42 ` [PATCH 3/4] drm/ttm: improve idle/busy handling Christian König @ 2023-12-14 8:30 ` kernel test robot 2023-12-16 0:44 ` kernel test robot 1 sibling, 0 replies; 13+ messages in thread From: kernel test robot @ 2023-12-14 8:30 UTC (permalink / raw) To: Christian König, dri-devel, intel-gfx; +Cc: llvm, oe-kbuild-all Hi Christian, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.7-rc5 next-20231214] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-ttm-replace-busy-placement-with-flags-v3/20231213-224456 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20231213144222.1871-3-christian.koenig%40amd.com patch subject: [PATCH 3/4] drm/ttm: improve idle/busy handling config: arm-defconfig (https://download.01.org/0day-ci/archive/20231214/202312141637.ciYxVFVl-lkp@intel.com/config) compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231214/202312141637.ciYxVFVl-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202312141637.ciYxVFVl-lkp@intel.com/ All warnings (new ones prefixed by >>): >> drivers/gpu/drm/ttm/ttm_resource.c:301: warning: Function parameter or member 'busy' not described in 'ttm_resource_compatible' vim +301 drivers/gpu/drm/ttm/ttm_resource.c 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 289 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 290 /** 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 291 * ttm_resource_compatible - check if resource is compatible with placement 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 292 * 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 293 * @res: the resource to check 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 294 * @placement: the placement to check against 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 295 * 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 296 * Returns true if the placement is compatible. 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 297 */ 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 298 bool ttm_resource_compatible(struct ttm_resource *res, 1e59504faf5d28 Christian König 2023-12-13 299 struct ttm_placement *placement, 1e59504faf5d28 Christian König 2023-12-13 300 bool busy) 98cca519df6da6 Christian König 2021-08-30 @301 { 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 302 struct ttm_buffer_object *bo = res->bo; 544432703b2fe7 Arunpravin Paneer Selvam 2022-08-20 303 struct ttm_device *bdev = bo->bdev; 98cca519df6da6 Christian König 2021-08-30 304 unsigned i; 98cca519df6da6 Christian König 2021-08-30 305 98cca519df6da6 Christian König 2021-08-30 306 if (res->placement & TTM_PL_FLAG_TEMPORARY) 98cca519df6da6 Christian König 2021-08-30 307 return false; 98cca519df6da6 Christian König 2021-08-30 308 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 309 for (i = 0; i < placement->num_placement; i++) { 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 310 const struct ttm_place *place = &placement->placement[i]; 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 311 struct ttm_resource_manager *man; 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 312 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 313 if (res->mem_type != place->mem_type) 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 314 continue; 98cca519df6da6 Christian König 2021-08-30 315 1e59504faf5d28 Christian König 2023-12-13 316 if (place->flags & (busy ? TTM_PL_FLAG_IDLE : TTM_PL_FLAG_BUSY)) 1e59504faf5d28 Christian König 2023-12-13 317 continue; 1e59504faf5d28 Christian König 2023-12-13 318 1e59504faf5d28 Christian König 2023-12-13 319 if (place->flags & TTM_PL_FLAG_CONTIGUOUS && 1e59504faf5d28 Christian König 2023-12-13 320 !(res->placement & TTM_PL_FLAG_CONTIGUOUS)) 1e59504faf5d28 Christian König 2023-12-13 321 continue; 1e59504faf5d28 Christian König 2023-12-13 322 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 323 man = ttm_manager_type(bdev, res->mem_type); 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 324 if (man->func->compatible && 9909b7ee1d1561 Somalapuram Amaranath 2023-12-13 325 !man->func->compatible(man, res, place, bo->base.size)) 98cca519df6da6 Christian König 2021-08-30 326 continue; 98cca519df6da6 Christian König 2021-08-30 327 98cca519df6da6 Christian König 2021-08-30 328 return true; 98cca519df6da6 Christian König 2021-08-30 329 } 98cca519df6da6 Christian König 2021-08-30 330 return false; 98cca519df6da6 Christian König 2021-08-30 331 } 98cca519df6da6 Christian König 2021-08-30 332 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/4] drm/ttm: improve idle/busy handling 2023-12-13 14:42 ` [PATCH 3/4] drm/ttm: improve idle/busy handling Christian König 2023-12-14 8:30 ` kernel test robot @ 2023-12-16 0:44 ` kernel test robot 1 sibling, 0 replies; 13+ messages in thread From: kernel test robot @ 2023-12-16 0:44 UTC (permalink / raw) To: Christian König, dri-devel, intel-gfx; +Cc: oe-kbuild-all Hi Christian, kernel test robot noticed the following build warnings: [auto build test WARNING on drm-misc/drm-misc-next] [also build test WARNING on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.7-rc5 next-20231215] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Christian-K-nig/drm-ttm-replace-busy-placement-with-flags-v3/20231213-224456 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20231213144222.1871-3-christian.koenig%40amd.com patch subject: [PATCH 3/4] drm/ttm: improve idle/busy handling config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20231216/202312160809.nvmiBwrJ-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231216/202312160809.nvmiBwrJ-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202312160809.nvmiBwrJ-lkp@intel.com/ All warnings (new ones prefixed by >>): >> scripts/kernel-doc: drivers/gpu/drm/ttm/ttm_resource.c:301: warning: Function parameter or struct member 'busy' not described in 'ttm_resource_compatible' -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 4/4] drm/amdgpu: use GTT only as fallback for VRAM|GTT 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König 2023-12-13 14:42 ` [PATCH 2/4] drm/ttm: replace busy placement with flags v3 Christian König 2023-12-13 14:42 ` [PATCH 3/4] drm/ttm: improve idle/busy handling Christian König @ 2023-12-13 14:42 ` Christian König 2023-12-13 14:50 ` [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König ` (4 subsequent siblings) 7 siblings, 0 replies; 13+ messages in thread From: Christian König @ 2023-12-13 14:42 UTC (permalink / raw) To: dri-devel, intel-gfx Try to fill up VRAM as well by setting the busy flag on GTT allocations. This fixes the issue that when VRAM was evacuated for suspend it's never filled up again unless the application is restarted. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index f110dfdc4feb..979cecf18f17 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -173,6 +173,12 @@ void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain) abo->flags & AMDGPU_GEM_CREATE_PREEMPTIBLE ? AMDGPU_PL_PREEMPT : TTM_PL_TT; places[c].flags = 0; + /* + * When GTT is just an alternative to VRAM make sure that we + * only use it as fallback and still try to fill up VRAM first. + */ + if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM) + places[c].flags |= TTM_PL_FLAG_BUSY; c++; } -- 2.34.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König ` (2 preceding siblings ...) 2023-12-13 14:42 ` [PATCH 4/4] drm/amdgpu: use GTT only as fallback for VRAM|GTT Christian König @ 2023-12-13 14:50 ` Christian König 2023-12-13 21:24 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork ` (3 subsequent siblings) 7 siblings, 0 replies; 13+ messages in thread From: Christian König @ 2023-12-13 14:50 UTC (permalink / raw) To: dri-devel, intel-gfx Before anybody wonders why no additional people are on CC: I just send that out to get feedback from the CI systems. Regards, Christian. Am 13.12.23 um 15:42 schrieb Christian König: > Only convert it to ENOMEM in ttm_bo_validate. > > Signed-off-by: Christian König <christian.koenig@amd.com> > --- > drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c > index edf10618fe2b..8c1eaa74fa21 100644 > --- a/drivers/gpu/drm/ttm/ttm_bo.c > +++ b/drivers/gpu/drm/ttm/ttm_bo.c > @@ -830,7 +830,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, > goto error; > } > > - ret = -ENOMEM; > + ret = -ENOSPC; > if (!type_found) { > pr_err(TTM_PFX "No compatible memory type found\n"); > ret = -EINVAL; > @@ -916,6 +916,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, > return -EINVAL; > > ret = ttm_bo_move_buffer(bo, placement, ctx); > + /* For backward compatibility with userspace */ > + if (ret == -ENOSPC) > + return -ENOMEM; > if (ret) > return ret; > ^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König ` (3 preceding siblings ...) 2023-12-13 14:50 ` [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König @ 2023-12-13 21:24 ` Patchwork 2023-12-13 21:24 ` ✗ Fi.CI.SPARSE: " Patchwork ` (2 subsequent siblings) 7 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2023-12-13 21:24 UTC (permalink / raw) To: Christian König; +Cc: intel-gfx == Series Details == Series: series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space URL : https://patchwork.freedesktop.org/series/127752/ State : warning == Summary == Error: dim checkpatch failed 2d6d981a7c8c drm/ttm: return ENOSPC from ttm_bo_mem_space -:35: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <ckoenig.leichtzumerken@gmail.com>' != 'Signed-off-by: Christian König <christian.koenig@amd.com>' total: 0 errors, 1 warnings, 0 checks, 17 lines checked 7dd77c5e8555 drm/ttm: replace busy placement with flags v3 -:297: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int *' to bare use of 'unsigned *' #297: FILE: drivers/gpu/drm/nouveau/nouveau_bo.c:442: + unsigned *n = &nvbo->placement.num_placement; -:629: CHECK:LINE_SPACING: Please don't use multiple blank lines #629: FILE: drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:182: + total: 0 errors, 1 warnings, 1 checks, 698 lines checked 1fa5a17d755b drm/ttm: improve idle/busy handling -:9: WARNING:COMMIT_LOG_LONG_LINE: Prefer a maximum 75 chars per line (possible unwrapped commit description?) #9: Previously we would never try to move a BO into the preferred placements when -:297: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #297: FILE: drivers/gpu/drm/ttm/ttm_resource.c:320: + if (place->flags & TTM_PL_FLAG_CONTIGUOUS && + !(res->placement & TTM_PL_FLAG_CONTIGUOUS)) -:339: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <ckoenig.leichtzumerken@gmail.com>' != 'Signed-off-by: Christian König <christian.koenig@amd.com>' total: 0 errors, 2 warnings, 1 checks, 279 lines checked f90570623edf drm/amdgpu: use GTT only as fallback for VRAM|GTT -:32: WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch: 'From: "Christian König" <ckoenig.leichtzumerken@gmail.com>' != 'Signed-off-by: Christian König <christian.koenig@amd.com>' total: 0 errors, 1 warnings, 0 checks, 12 lines checked ^ permalink raw reply [flat|nested] 13+ messages in thread
* ✗ Fi.CI.SPARSE: warning for series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König ` (4 preceding siblings ...) 2023-12-13 21:24 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork @ 2023-12-13 21:24 ` Patchwork 2023-12-13 21:47 ` ✓ Fi.CI.BAT: success " Patchwork 2023-12-13 22:42 ` ✓ Fi.CI.IGT: " Patchwork 7 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2023-12-13 21:24 UTC (permalink / raw) To: Christian König; +Cc: intel-gfx == Series Details == Series: series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space URL : https://patchwork.freedesktop.org/series/127752/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. ^ permalink raw reply [flat|nested] 13+ messages in thread
* ✓ Fi.CI.BAT: success for series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König ` (5 preceding siblings ...) 2023-12-13 21:24 ` ✗ Fi.CI.SPARSE: " Patchwork @ 2023-12-13 21:47 ` Patchwork 2023-12-13 22:42 ` ✓ Fi.CI.IGT: " Patchwork 7 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2023-12-13 21:47 UTC (permalink / raw) To: Christian König; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 5506 bytes --] == Series Details == Series: series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space URL : https://patchwork.freedesktop.org/series/127752/ State : success == Summary == CI Bug Log - changes from CI_DRM_14017 -> Patchwork_127752v1 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/index.html Participating hosts (37 -> 38) ------------------------------ Additional (2): bat-rpls-2 bat-kbl-2 Missing (1): fi-snb-2520m Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_127752v1: ### IGT changes ### #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@kms_psr@psr-primary-page-flip}: - bat-rpls-2: NOTRUN -> [ABORT][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@kms_psr@psr-primary-page-flip.html Known issues ------------ Here are the changes found in Patchwork_127752v1 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@debugfs_test@basic-hwmon: - bat-rpls-2: NOTRUN -> [SKIP][2] ([i915#9318]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@debugfs_test@basic-hwmon.html * igt@fbdev@info: - bat-kbl-2: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#1849]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-kbl-2/igt@fbdev@info.html * igt@gem_exec_suspend@basic-s3@smem: - fi-rkl-11600: [PASS][4] -> [FAIL][5] ([fdo#103375]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/fi-rkl-11600/igt@gem_exec_suspend@basic-s3@smem.html * igt@gem_lmem_swapping@parallel-random-engines: - bat-kbl-2: NOTRUN -> [SKIP][6] ([fdo#109271]) +36 other tests skip [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-kbl-2/igt@gem_lmem_swapping@parallel-random-engines.html * igt@gem_tiled_pread_basic: - bat-rpls-2: NOTRUN -> [SKIP][7] ([i915#3282]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@gem_tiled_pread_basic.html * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy: - bat-rpls-2: NOTRUN -> [SKIP][8] ([i915#4103]) +1 other test skip [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html * igt@kms_dsc@dsc-basic: - bat-rpls-2: NOTRUN -> [SKIP][9] ([i915#3555] / [i915#3840]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@kms_dsc@dsc-basic.html * igt@kms_force_connector_basic@force-load-detect: - bat-rpls-2: NOTRUN -> [SKIP][10] ([fdo#109285]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@kms_force_connector_basic@force-load-detect.html * igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1: - bat-rplp-1: [PASS][11] -> [ABORT][12] ([i915#8668]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/bat-rplp-1/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rplp-1/igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1.html * igt@kms_pm_backlight@basic-brightness: - bat-rpls-2: NOTRUN -> [SKIP][13] ([i915#5354]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/bat-rpls-2/igt@kms_pm_backlight@basic-brightness.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849 [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282 [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840 [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103 [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354 [i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668 [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318 Build changes ------------- * Linux: CI_DRM_14017 -> Patchwork_127752v1 CI-20190529: 20190529 CI_DRM_14017: 58ac4ffc75b62e6007e85ae6777820e77c113b01 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_7639: 18afc09e362b605a3c88c000331708f105d2c23a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_127752v1: 58ac4ffc75b62e6007e85ae6777820e77c113b01 @ git://anongit.freedesktop.org/gfx-ci/linux ### Linux commits 22a0d5c2f2ba drm/amdgpu: use GTT only as fallback for VRAM|GTT 190c2a343a62 drm/ttm: improve idle/busy handling a27ec5857635 drm/ttm: replace busy placement with flags v3 ab036fe2a6fa drm/ttm: return ENOSPC from ttm_bo_mem_space == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/index.html [-- Attachment #2: Type: text/html, Size: 6477 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* ✓ Fi.CI.IGT: success for series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König ` (6 preceding siblings ...) 2023-12-13 21:47 ` ✓ Fi.CI.BAT: success " Patchwork @ 2023-12-13 22:42 ` Patchwork 7 siblings, 0 replies; 13+ messages in thread From: Patchwork @ 2023-12-13 22:42 UTC (permalink / raw) To: Christian König; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 29586 bytes --] == Series Details == Series: series starting with [1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space URL : https://patchwork.freedesktop.org/series/127752/ State : success == Summary == CI Bug Log - changes from CI_DRM_14017_full -> Patchwork_127752v1_full ==================================================== Summary ------- **WARNING** Minor unknown changes coming with Patchwork_127752v1_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_127752v1_full, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them to document this new failure mode, which will reduce false positives in CI. Participating hosts (7 -> 8) ------------------------------ Additional (1): shard-glk-0 Possible new issues ------------------- Here are the unknown changes that may have been introduced in Patchwork_127752v1_full: ### IGT changes ### #### Warnings #### * igt@i915_pm_rps@fence-order: - shard-dg1: [ABORT][1] ([i915#9855]) -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-dg1-13/igt@i915_pm_rps@fence-order.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg1-18/igt@i915_pm_rps@fence-order.html * igt@kms_content_protection@uevent: - shard-snb: [SKIP][3] ([fdo#109271]) -> [INCOMPLETE][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-snb5/igt@kms_content_protection@uevent.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb7/igt@kms_content_protection@uevent.html Known issues ------------ Here are the changes found in Patchwork_127752v1_full that come from known issues: ### CI changes ### #### Issues hit #### * boot: - shard-glk: ([PASS][5], [PASS][6], [PASS][7], [PASS][8], [PASS][9], [PASS][10], [PASS][11], [PASS][12], [PASS][13], [PASS][14], [PASS][15], [PASS][16], [PASS][17], [PASS][18], [PASS][19], [PASS][20], [PASS][21], [PASS][22], [PASS][23], [PASS][24], [PASS][25], [PASS][26], [PASS][27], [PASS][28], [PASS][29]) -> ([PASS][30], [PASS][31], [PASS][32], [PASS][33], [PASS][34], [PASS][35], [PASS][36], [PASS][37], [PASS][38], [PASS][39], [PASS][40], [PASS][41], [PASS][42], [PASS][43], [PASS][44], [PASS][45], [PASS][46], [FAIL][47], [PASS][48], [PASS][49], [PASS][50], [PASS][51], [PASS][52], [PASS][53], [PASS][54]) ([i915#8293]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk8/boot.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk8/boot.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk9/boot.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk9/boot.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk4/boot.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk3/boot.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk3/boot.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk3/boot.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk2/boot.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk2/boot.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk2/boot.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk1/boot.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk1/boot.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk1/boot.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk7/boot.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk7/boot.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk7/boot.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk6/boot.html [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk6/boot.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk6/boot.html [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk5/boot.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk5/boot.html [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk5/boot.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk4/boot.html [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk4/boot.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk3/boot.html [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk1/boot.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk1/boot.html [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk2/boot.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk2/boot.html [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk2/boot.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk3/boot.html [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk3/boot.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk4/boot.html [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk4/boot.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk4/boot.html [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk5/boot.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk5/boot.html [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk6/boot.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk6/boot.html [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk6/boot.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk7/boot.html [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk7/boot.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk8/boot.html [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk8/boot.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk8/boot.html [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk8/boot.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk9/boot.html [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk9/boot.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk9/boot.html ### IGT changes ### #### Issues hit #### * igt@gem_exec_balancer@full: - shard-dg2: NOTRUN -> [ABORT][55] ([i915#9855] / [i915#9856]) [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-3/igt@gem_exec_balancer@full.html - shard-rkl: NOTRUN -> [INCOMPLETE][56] ([i915#9856]) [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-7/igt@gem_exec_balancer@full.html * igt@gem_exec_balancer@parallel-contexts: - shard-dg2: NOTRUN -> [ABORT][57] ([i915#9855]) [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-3/igt@gem_exec_balancer@parallel-contexts.html * igt@gem_exec_fair@basic-pace-solo@rcs0: - shard-tglu: [PASS][58] -> [FAIL][59] ([i915#2842]) [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-tglu-8/igt@gem_exec_fair@basic-pace-solo@rcs0.html [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-2/igt@gem_exec_fair@basic-pace-solo@rcs0.html * igt@gem_exec_suspend@basic-s4-devices@smem: - shard-tglu: [PASS][60] -> [ABORT][61] ([i915#7975] / [i915#8213]) [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-tglu-4/igt@gem_exec_suspend@basic-s4-devices@smem.html [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-10/igt@gem_exec_suspend@basic-s4-devices@smem.html * igt@gem_exec_whisper@basic-contexts: - shard-tglu: NOTRUN -> [INCOMPLETE][62] ([i915#6755] / [i915#9857]) [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-8/igt@gem_exec_whisper@basic-contexts.html * igt@gem_mmap_wc@write-gtt-read-wc: - shard-mtlp: NOTRUN -> [SKIP][63] ([i915#4083]) [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@gem_mmap_wc@write-gtt-read-wc.html * igt@gem_readwrite@new-obj: - shard-mtlp: NOTRUN -> [SKIP][64] ([i915#3282]) +1 other test skip [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@gem_readwrite@new-obj.html * igt@gem_render_copy@y-tiled-to-vebox-y-tiled: - shard-mtlp: NOTRUN -> [SKIP][65] ([i915#8428]) [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@gem_render_copy@y-tiled-to-vebox-y-tiled.html * igt@gem_tiled_partial_pwrite_pread@reads: - shard-mtlp: NOTRUN -> [SKIP][66] ([i915#4077]) +1 other test skip [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@gem_tiled_partial_pwrite_pread@reads.html * igt@gem_userptr_blits@mmap-offset-banned@gtt: - shard-mtlp: NOTRUN -> [SKIP][67] ([i915#3297]) [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-8/igt@gem_userptr_blits@mmap-offset-banned@gtt.html * igt@gem_userptr_blits@vma-merge: - shard-tglu: NOTRUN -> [FAIL][68] ([i915#3318]) [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-8/igt@gem_userptr_blits@vma-merge.html * igt@i915_pm_rc6_residency@rc6-idle: - shard-glk: NOTRUN -> [INCOMPLETE][69] ([i915#9858]) [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk8/igt@i915_pm_rc6_residency@rc6-idle.html - shard-dg2: NOTRUN -> [INCOMPLETE][70] ([i915#9858]) [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-11/igt@i915_pm_rc6_residency@rc6-idle.html - shard-rkl: NOTRUN -> [INCOMPLETE][71] ([i915#9858]) [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-7/igt@i915_pm_rc6_residency@rc6-idle.html * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip: - shard-mtlp: NOTRUN -> [SKIP][72] ([fdo#111615]) [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip.html * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0: - shard-dg2: NOTRUN -> [SKIP][73] ([i915#5190]) [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-11/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0.html * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip: - shard-tglu: NOTRUN -> [SKIP][74] ([fdo#111615]) [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-8/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html * igt@kms_ccs@pipe-a-random-ccs-data-4-tiled-dg2-mc-ccs: - shard-mtlp: NOTRUN -> [SKIP][75] ([i915#5354] / [i915#6095]) +4 other tests skip [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_ccs@pipe-a-random-ccs-data-4-tiled-dg2-mc-ccs.html * igt@kms_ccs@pipe-c-crc-primary-rotation-180-4-tiled-dg2-rc-ccs-cc: - shard-tglu: NOTRUN -> [SKIP][76] ([i915#5354] / [i915#6095]) [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-8/igt@kms_ccs@pipe-c-crc-primary-rotation-180-4-tiled-dg2-rc-ccs-cc.html * igt@kms_content_protection@srm@pipe-a-dp-4: - shard-dg2: NOTRUN -> [TIMEOUT][77] ([i915#7173]) [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-11/igt@kms_content_protection@srm@pipe-a-dp-4.html * igt@kms_cursor_crc@cursor-onscreen-32x32: - shard-mtlp: NOTRUN -> [SKIP][78] ([i915#3555] / [i915#8814]) +1 other test skip [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_cursor_crc@cursor-onscreen-32x32.html * igt@kms_cursor_legacy@cursorb-vs-flipa-legacy: - shard-mtlp: NOTRUN -> [SKIP][79] ([i915#9809]) [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-8/igt@kms_cursor_legacy@cursorb-vs-flipa-legacy.html * igt@kms_cursor_legacy@cursorb-vs-flipa-toggle: - shard-dg2: NOTRUN -> [SKIP][80] ([fdo#109274] / [i915#5354]) [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-11/igt@kms_cursor_legacy@cursorb-vs-flipa-toggle.html * igt@kms_flip@2x-plain-flip: - shard-mtlp: NOTRUN -> [SKIP][81] ([i915#3637]) [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-8/igt@kms_flip@2x-plain-flip.html * igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-default-mode: - shard-mtlp: NOTRUN -> [SKIP][82] ([i915#2672]) [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-64bpp-yftile-upscaling@pipe-a-default-mode.html * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling@pipe-a-default-mode: - shard-mtlp: NOTRUN -> [SKIP][83] ([i915#2672] / [i915#3555]) [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-8/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling@pipe-a-default-mode.html * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move: - shard-mtlp: NOTRUN -> [SKIP][84] ([i915#1825]) +3 other tests skip [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-move.html * igt@kms_frontbuffer_tracking@fbc-2p-rte: - shard-snb: [PASS][85] -> [SKIP][86] ([fdo#109271]) +5 other tests skip [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-snb7/igt@kms_frontbuffer_tracking@fbc-2p-rte.html [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb2/igt@kms_frontbuffer_tracking@fbc-2p-rte.html * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-gtt: - shard-mtlp: NOTRUN -> [SKIP][87] ([i915#8708]) [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-gtt.html * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt: - shard-tglu: NOTRUN -> [SKIP][88] ([fdo#110189]) [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-8/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt.html * igt@kms_hdr@invalid-metadata-sizes: - shard-mtlp: NOTRUN -> [SKIP][89] ([i915#3555] / [i915#8228]) [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_hdr@invalid-metadata-sizes.html * igt@kms_hdr@static-toggle-dpms: - shard-dg2: NOTRUN -> [SKIP][90] ([i915#3555] / [i915#8228]) [90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-6/igt@kms_hdr@static-toggle-dpms.html * igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-b-edp-1: - shard-mtlp: NOTRUN -> [SKIP][91] ([i915#5235]) +2 other tests skip [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-b-edp-1.html * igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-c-hdmi-a-3: - shard-dg1: NOTRUN -> [SKIP][92] ([i915#5235]) +7 other tests skip [92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg1-12/igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-c-hdmi-a-3.html * igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-d-edp-1: - shard-mtlp: NOTRUN -> [SKIP][93] ([i915#3555] / [i915#5235]) [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@kms_plane_scaling@planes-downscale-factor-0-25-unity-scaling@pipe-d-edp-1.html * igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-factor-0-25@pipe-b-hdmi-a-1: - shard-rkl: NOTRUN -> [SKIP][94] ([i915#5235]) +3 other tests skip [94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-4/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-factor-0-25@pipe-b-hdmi-a-1.html * igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-factor-0-25@pipe-d-hdmi-a-3: - shard-dg2: NOTRUN -> [SKIP][95] ([i915#5235]) +3 other tests skip [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-3/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-factor-0-25@pipe-d-hdmi-a-3.html * igt@kms_pm_rpm@dpms-mode-unset-non-lpsp: - shard-rkl: [PASS][96] -> [SKIP][97] ([i915#9519]) [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-6/igt@kms_pm_rpm@dpms-mode-unset-non-lpsp.html [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-2/igt@kms_pm_rpm@dpms-mode-unset-non-lpsp.html * igt@perf@blocking-parameterized: - shard-dg1: NOTRUN -> [ABORT][98] ([i915#9847]) [98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg1-13/igt@perf@blocking-parameterized.html * igt@perf@gen12-group-concurrent-oa-buffer-read: - shard-rkl: NOTRUN -> [ABORT][99] ([i915#9847]) +3 other tests abort [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-6/igt@perf@gen12-group-concurrent-oa-buffer-read.html * igt@perf@gen12-invalid-class-instance: - shard-glk: NOTRUN -> [ABORT][100] ([i915#9847]) [100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk1/igt@perf@gen12-invalid-class-instance.html * igt@perf@polling-parameterized: - shard-mtlp: NOTRUN -> [ABORT][101] ([i915#9847]) +1 other test abort [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-7/igt@perf@polling-parameterized.html * igt@perf_pmu@frequency: - shard-snb: NOTRUN -> [INCOMPLETE][102] ([i915#9853]) [102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb1/igt@perf_pmu@frequency.html * igt@runner@aborted: - shard-snb: NOTRUN -> [FAIL][103] ([i915#7812]) [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb2/igt@runner@aborted.html * igt@v3d/v3d_submit_csd@multiple-job-submission: - shard-mtlp: NOTRUN -> [SKIP][104] ([i915#2575]) +2 other tests skip [104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-8/igt@v3d/v3d_submit_csd@multiple-job-submission.html * igt@vc4/vc4_purgeable_bo@free-purged-bo: - shard-dg2: NOTRUN -> [SKIP][105] ([i915#7711]) [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg2-11/igt@vc4/vc4_purgeable_bo@free-purged-bo.html #### Possible fixes #### * igt@gem_exec_whisper@basic-contexts-forked: - shard-mtlp: [ABORT][106] ([i915#9855] / [i915#9857]) -> [PASS][107] [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-mtlp-3/igt@gem_exec_whisper@basic-contexts-forked.html [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-mtlp-8/igt@gem_exec_whisper@basic-contexts-forked.html * igt@i915_pm_rpm@gem-execbuf-stress@extra-wait-smem0: - shard-tglu: [INCOMPLETE][108] -> [PASS][109] [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-tglu-5/igt@i915_pm_rpm@gem-execbuf-stress@extra-wait-smem0.html [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-8/igt@i915_pm_rpm@gem-execbuf-stress@extra-wait-smem0.html #### Warnings #### * igt@device_reset@unbind-reset-rebind: - shard-dg1: [INCOMPLETE][110] ([i915#9408] / [i915#9618]) -> [ABORT][111] ([i915#9618]) [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-dg1-12/igt@device_reset@unbind-reset-rebind.html [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg1-13/igt@device_reset@unbind-reset-rebind.html * igt@gem_exec_balancer@full-late: - shard-rkl: [INCOMPLETE][112] ([i915#9856]) -> [ABORT][113] ([i915#9855] / [i915#9856]) [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-4/igt@gem_exec_balancer@full-late.html [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-5/igt@gem_exec_balancer@full-late.html * igt@gem_exec_whisper@basic-fds-forked: - shard-glk: [INCOMPLETE][114] ([i915#9857]) -> [ABORT][115] ([i915#9857]) [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk8/igt@gem_exec_whisper@basic-fds-forked.html [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk1/igt@gem_exec_whisper@basic-fds-forked.html * igt@gem_exec_whisper@basic-normal: - shard-glk: [ABORT][116] ([i915#9855] / [i915#9857]) -> [INCOMPLETE][117] ([i915#9857]) [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-glk1/igt@gem_exec_whisper@basic-normal.html [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-glk4/igt@gem_exec_whisper@basic-normal.html * igt@i915_pm_rc6_residency@rc6-fence@gt0: - shard-rkl: [INCOMPLETE][118] ([i915#9847] / [i915#9858]) -> [INCOMPLETE][119] ([i915#9858]) [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/igt@i915_pm_rc6_residency@rc6-fence@gt0.html [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-4/igt@i915_pm_rc6_residency@rc6-fence@gt0.html - shard-snb: [INCOMPLETE][120] ([i915#9858]) -> [INCOMPLETE][121] ([i915#9847] / [i915#9858]) [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-snb4/igt@i915_pm_rc6_residency@rc6-fence@gt0.html [121]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb5/igt@i915_pm_rc6_residency@rc6-fence@gt0.html - shard-tglu: [INCOMPLETE][122] ([i915#9858]) -> [INCOMPLETE][123] ([i915#9847] / [i915#9858]) [122]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-tglu-8/igt@i915_pm_rc6_residency@rc6-fence@gt0.html [123]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-5/igt@i915_pm_rc6_residency@rc6-fence@gt0.html * igt@i915_pm_rps@fence-order: - shard-tglu: [INCOMPLETE][124] -> [INCOMPLETE][125] ([i915#9847]) [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-tglu-8/igt@i915_pm_rps@fence-order.html [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-tglu-5/igt@i915_pm_rps@fence-order.html - shard-rkl: [INCOMPLETE][126] -> [ABORT][127] ([i915#9855]) [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-1/igt@i915_pm_rps@fence-order.html [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-5/igt@i915_pm_rps@fence-order.html - shard-snb: [INCOMPLETE][128] -> [INCOMPLETE][129] ([i915#9847]) [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-snb6/igt@i915_pm_rps@fence-order.html [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb7/igt@i915_pm_rps@fence-order.html * igt@kms_content_protection@mei-interface: - shard-snb: [INCOMPLETE][130] -> [SKIP][131] ([fdo#109271]) [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-snb7/igt@kms_content_protection@mei-interface.html [131]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-snb2/igt@kms_content_protection@mei-interface.html * igt@perf_pmu@busy-check-all@rcs0: - shard-rkl: [INCOMPLETE][132] ([i915#9847] / [i915#9853]) -> [INCOMPLETE][133] ([i915#9853]) [132]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/igt@perf_pmu@busy-check-all@rcs0.html [133]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-4/igt@perf_pmu@busy-check-all@rcs0.html * igt@perf_pmu@busy@rcs0: - shard-rkl: [INCOMPLETE][134] ([i915#9853]) -> [ABORT][135] ([i915#9847] / [i915#9853]) [134]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-7/igt@perf_pmu@busy@rcs0.html [135]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-5/igt@perf_pmu@busy@rcs0.html - shard-dg1: [ABORT][136] ([i915#9847] / [i915#9853]) -> [INCOMPLETE][137] ([i915#9853]) [136]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-dg1-13/igt@perf_pmu@busy@rcs0.html [137]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg1-15/igt@perf_pmu@busy@rcs0.html * igt@perf_pmu@interrupts: - shard-rkl: [ABORT][138] ([i915#9847] / [i915#9853]) -> [INCOMPLETE][139] ([i915#9853]) [138]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-rkl-5/igt@perf_pmu@interrupts.html [139]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-rkl-4/igt@perf_pmu@interrupts.html - shard-dg1: [INCOMPLETE][140] ([i915#9853]) -> [ABORT][141] ([i915#9847] / [i915#9853]) [140]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14017/shard-dg1-16/igt@perf_pmu@interrupts.html [141]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/shard-dg1-13/igt@perf_pmu@interrupts.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274 [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189 [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615 [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825 [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575 [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672 [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842 [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282 [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297 [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318 [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555 [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637 [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077 [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083 [i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190 [i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235 [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354 [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095 [i915#6755]: https://gitlab.freedesktop.org/drm/intel/issues/6755 [i915#7173]: https://gitlab.freedesktop.org/drm/intel/issues/7173 [i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711 [i915#7812]: https://gitlab.freedesktop.org/drm/intel/issues/7812 [i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975 [i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213 [i915#8228]: https://gitlab.freedesktop.org/drm/intel/issues/8228 [i915#8293]: https://gitlab.freedesktop.org/drm/intel/issues/8293 [i915#8428]: https://gitlab.freedesktop.org/drm/intel/issues/8428 [i915#8708]: https://gitlab.freedesktop.org/drm/intel/issues/8708 [i915#8814]: https://gitlab.freedesktop.org/drm/intel/issues/8814 [i915#9408]: https://gitlab.freedesktop.org/drm/intel/issues/9408 [i915#9519]: https://gitlab.freedesktop.org/drm/intel/issues/9519 [i915#9618]: https://gitlab.freedesktop.org/drm/intel/issues/9618 [i915#9673]: https://gitlab.freedesktop.org/drm/intel/issues/9673 [i915#9688]: https://gitlab.freedesktop.org/drm/intel/issues/9688 [i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732 [i915#9809]: https://gitlab.freedesktop.org/drm/intel/issues/9809 [i915#9847]: https://gitlab.freedesktop.org/drm/intel/issues/9847 [i915#9853]: https://gitlab.freedesktop.org/drm/intel/issues/9853 [i915#9855]: https://gitlab.freedesktop.org/drm/intel/issues/9855 [i915#9856]: https://gitlab.freedesktop.org/drm/intel/issues/9856 [i915#9857]: https://gitlab.freedesktop.org/drm/intel/issues/9857 [i915#9858]: https://gitlab.freedesktop.org/drm/intel/issues/9858 Build changes ------------- * Linux: CI_DRM_14017 -> Patchwork_127752v1 CI-20190529: 20190529 CI_DRM_14017: 58ac4ffc75b62e6007e85ae6777820e77c113b01 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_7639: 18afc09e362b605a3c88c000331708f105d2c23a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Patchwork_127752v1: 58ac4ffc75b62e6007e85ae6777820e77c113b01 @ git://anongit.freedesktop.org/gfx-ci/linux piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_127752v1/index.html [-- Attachment #2: Type: text/html, Size: 36098 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space @ 2024-01-04 15:02 Christian König 0 siblings, 0 replies; 13+ messages in thread From: Christian König @ 2024-01-04 15:02 UTC (permalink / raw) To: dri-devel, intel-gfx, thomas.hellstrom, nouveau, jani.nikula, kherbst, lyude, zackr Only convert it to ENOMEM in ttm_bo_validate. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index edf10618fe2b..8c1eaa74fa21 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -830,7 +830,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, goto error; } - ret = -ENOMEM; + ret = -ENOSPC; if (!type_found) { pr_err(TTM_PFX "No compatible memory type found\n"); ret = -EINVAL; @@ -916,6 +916,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, return -EINVAL; ret = ttm_bo_move_buffer(bo, placement, ctx); + /* For backward compatibility with userspace */ + if (ret == -ENOSPC) + return -ENOMEM; if (ret) return ret; -- 2.34.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Rework TTMs busy handling @ 2024-01-04 15:05 Christian König 2024-01-04 15:05 ` [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König 0 siblings, 1 reply; 13+ messages in thread From: Christian König @ 2024-01-04 15:05 UTC (permalink / raw) To: dri-devel, intel-gfx, thomas.hellstrom, nouveau, jani.nikula, kherbst, lyude, zackr Hi guys, I'm trying to make this functionality a bit more useful for years now since we multiple reports that behavior of drivers can be suboptimal when multiple placements be given. So basically instead of hacking around the TTM behavior in the driver once more I've gone ahead and changed the idle/busy placement list into idle/busy placement flags. This not only saves a bunch of code, but also allows setting some placements as fallback which are used if allocating from the preferred ones didn't worked. Intel CI seems to be happy with those patches, so any more comments? Regards, Christian. ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space 2024-01-04 15:05 Rework TTMs busy handling Christian König @ 2024-01-04 15:05 ` Christian König 0 siblings, 0 replies; 13+ messages in thread From: Christian König @ 2024-01-04 15:05 UTC (permalink / raw) To: dri-devel, intel-gfx, thomas.hellstrom, nouveau, jani.nikula, kherbst, lyude, zackr Only convert it to ENOMEM in ttm_bo_validate. Signed-off-by: Christian König <christian.koenig@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index edf10618fe2b..8c1eaa74fa21 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -830,7 +830,7 @@ int ttm_bo_mem_space(struct ttm_buffer_object *bo, goto error; } - ret = -ENOMEM; + ret = -ENOSPC; if (!type_found) { pr_err(TTM_PFX "No compatible memory type found\n"); ret = -EINVAL; @@ -916,6 +916,9 @@ int ttm_bo_validate(struct ttm_buffer_object *bo, return -EINVAL; ret = ttm_bo_move_buffer(bo, placement, ctx); + /* For backward compatibility with userspace */ + if (ret == -ENOSPC) + return -ENOMEM; if (ret) return ret; -- 2.34.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-01-04 15:05 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-12-13 14:42 [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König 2023-12-13 14:42 ` [PATCH 2/4] drm/ttm: replace busy placement with flags v3 Christian König 2023-12-13 14:42 ` [PATCH 3/4] drm/ttm: improve idle/busy handling Christian König 2023-12-14 8:30 ` kernel test robot 2023-12-16 0:44 ` kernel test robot 2023-12-13 14:42 ` [PATCH 4/4] drm/amdgpu: use GTT only as fallback for VRAM|GTT Christian König 2023-12-13 14:50 ` [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König 2023-12-13 21:24 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] " Patchwork 2023-12-13 21:24 ` ✗ Fi.CI.SPARSE: " Patchwork 2023-12-13 21:47 ` ✓ Fi.CI.BAT: success " Patchwork 2023-12-13 22:42 ` ✓ Fi.CI.IGT: " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2024-01-04 15:02 [PATCH 1/4] " Christian König 2024-01-04 15:05 Rework TTMs busy handling Christian König 2024-01-04 15:05 ` [PATCH 1/4] drm/ttm: return ENOSPC from ttm_bo_mem_space Christian König
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox