[PATCH v1 6/6] [DEBUG] hunt for the nospace
Robert Beckett
bob.beckett at collabora.com
Tue Feb 1 20:49:05 UTC 2022
---
drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
index 9afea008192d..cd200a758384 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_gtt.c
@@ -1078,18 +1078,23 @@ static int misaligned_case(struct i915_address_space *vm, struct intel_memory_re
u64 expected_vma_size, expected_node_size;
obj = i915_gem_object_create_region(mr, size, 0, 0);
- if (IS_ERR(obj))
+ if (IS_ERR(obj)) {
+ pr_info("BOB_DEBUG: %s(): i915_gem_object_create_region returned %ld\n", __func__, PTR_ERR(obj));
return PTR_ERR(obj);
+ }
vma = i915_vma_instance(obj, vm, NULL);
if (IS_ERR(vma)) {
err = PTR_ERR(vma);
+ pr_info("BOB_DEBUG: %s(): i915_vma_instance returned %d\n", __func__, err);
goto err_put;
}
err = i915_vma_pin(vma, 0, 0, addr | flags);
- if (err)
+ if (err) {
+ pr_info("BOB_DEBUG: %s(): i915_vma_pin returned %d\n", __func__, err);
goto err_put;
+ }
i915_vma_unpin(vma);
if (!drm_mm_node_allocated(&vma->node)) {
@@ -1118,8 +1123,10 @@ static int misaligned_case(struct i915_address_space *vm, struct intel_memory_re
}
err = i915_vma_unbind_unlocked(vma);
- if (err)
+ if (err) {
+ pr_info("BOB_DEBUG: %s(): i915_vma_unbind_unlocked returned %d\n", __func__, err);
goto err_put;
+ }
GEM_BUG_ON(drm_mm_node_allocated(&vma->node));
@@ -1151,6 +1158,8 @@ static int misaligned_pin(struct i915_address_space *vm,
if (min_alignment != I915_GTT_PAGE_SIZE_4K) {
err = misaligned_case(vm, mr, addr + (min_alignment / 2), size, flags);
/* misaligned should error with -EINVAL*/
+ if (err == -ENOSPC)
+ pr_info("BOB_DEBUG: %s(): misaligned case returned %d\n", __func__, err);
if (!err)
err = -EBADSLT;
if (err != -EINVAL)
@@ -1160,6 +1169,8 @@ static int misaligned_pin(struct i915_address_space *vm,
/* test for vma->size expansion to min page size */
err = misaligned_case(vm, mr, addr, PAGE_SIZE, flags);
if (min_alignment > hole_size) {
+ if (err == -ENOSPC)
+ pr_info("BOB_DEBUG: %s(): min page size case returned %d\n", __func__, err);
if (!err)
err = -EBADSLT;
else if (err == -ENOSPC)
@@ -1171,6 +1182,8 @@ static int misaligned_pin(struct i915_address_space *vm,
/* test for intermediate size not expanding vma->size for large alignments */
err = misaligned_case(vm, mr, addr, size / 2, flags);
if (min_alignment > hole_size) {
+ if (err == -ENOSPC)
+ pr_info("BOB_DEBUG: %s(): vma expansion case returned %d\n", __func__, err);
if (!err)
err = -EBADSLT;
else if (err == -ENOSPC)
--
2.25.1
More information about the Intel-gfx-trybot
mailing list