Commit 015df4f5 authored by Chris Wilson's avatar Chris Wilson

drm/i915/selftests: Report setup errors for igt_partial_tiling

igt_partial_tiling managed to fail with an -EBUSY. This usually means a
pin leak, but that should be impossible given the test setup. Add a
couple of error messages to help identify the path that failed.

References: https://bugs.freedesktop.org/show_bug.cgi?id=105073Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180213120940.21579-1-chris@chris-wilson.co.uk
parent c3cc39c5
...@@ -212,8 +212,11 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, ...@@ -212,8 +212,11 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj,
return -EINTR; return -EINTR;
err = i915_gem_object_set_tiling(obj, tile->tiling, tile->stride); err = i915_gem_object_set_tiling(obj, tile->tiling, tile->stride);
if (err) if (err) {
pr_err("Failed to set tiling mode=%u, stride=%u, err=%d\n",
tile->tiling, tile->stride, err);
return err; return err;
}
GEM_BUG_ON(i915_gem_object_get_tiling(obj) != tile->tiling); GEM_BUG_ON(i915_gem_object_get_tiling(obj) != tile->tiling);
GEM_BUG_ON(i915_gem_object_get_stride(obj) != tile->stride); GEM_BUG_ON(i915_gem_object_get_stride(obj) != tile->stride);
...@@ -230,13 +233,16 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, ...@@ -230,13 +233,16 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj,
GEM_BUG_ON(view.partial.size > nreal); GEM_BUG_ON(view.partial.size > nreal);
err = i915_gem_object_set_to_gtt_domain(obj, true); err = i915_gem_object_set_to_gtt_domain(obj, true);
if (err) if (err) {
pr_err("Failed to flush to GTT write domain; err=%d\n",
err);
return err; return err;
}
vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE); vma = i915_gem_object_ggtt_pin(obj, &view, 0, 0, PIN_MAPPABLE);
if (IS_ERR(vma)) { if (IS_ERR(vma)) {
pr_err("Failed to pin partial view: offset=%lu\n", pr_err("Failed to pin partial view: offset=%lu; err=%d\n",
page); page, (int)PTR_ERR(vma));
return PTR_ERR(vma); return PTR_ERR(vma);
} }
...@@ -246,8 +252,8 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, ...@@ -246,8 +252,8 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj,
io = i915_vma_pin_iomap(vma); io = i915_vma_pin_iomap(vma);
i915_vma_unpin(vma); i915_vma_unpin(vma);
if (IS_ERR(io)) { if (IS_ERR(io)) {
pr_err("Failed to iomap partial view: offset=%lu\n", pr_err("Failed to iomap partial view: offset=%lu; err=%d\n",
page); page, (int)PTR_ERR(io));
return PTR_ERR(io); return PTR_ERR(io);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment