Commit ff240199 authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: s/DRM_ERROR/DRM_DEBUG in i915_gem_execbuffer.c

These are all user-trigerable, so tune down their loudness a notch.
For some of these we have i-g-t tests (because they prevent
newly-discovered bugs), without this patches running the test suite
leaves behind a dirty dmesg.
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3fa7d235
...@@ -287,14 +287,14 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj, ...@@ -287,14 +287,14 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
* exec_object list, so it should have a GTT space bound by now. * exec_object list, so it should have a GTT space bound by now.
*/ */
if (unlikely(target_offset == 0)) { if (unlikely(target_offset == 0)) {
DRM_ERROR("No GTT space found for object %d\n", DRM_DEBUG("No GTT space found for object %d\n",
reloc->target_handle); reloc->target_handle);
return ret; return ret;
} }
/* Validate that the target is in a valid r/w GPU domain */ /* Validate that the target is in a valid r/w GPU domain */
if (unlikely(reloc->write_domain & (reloc->write_domain - 1))) { if (unlikely(reloc->write_domain & (reloc->write_domain - 1))) {
DRM_ERROR("reloc with multiple write domains: " DRM_DEBUG("reloc with multiple write domains: "
"obj %p target %d offset %d " "obj %p target %d offset %d "
"read %08x write %08x", "read %08x write %08x",
obj, reloc->target_handle, obj, reloc->target_handle,
...@@ -305,7 +305,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj, ...@@ -305,7 +305,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
} }
if (unlikely((reloc->write_domain | reloc->read_domains) if (unlikely((reloc->write_domain | reloc->read_domains)
& ~I915_GEM_GPU_DOMAINS)) { & ~I915_GEM_GPU_DOMAINS)) {
DRM_ERROR("reloc with read/write non-GPU domains: " DRM_DEBUG("reloc with read/write non-GPU domains: "
"obj %p target %d offset %d " "obj %p target %d offset %d "
"read %08x write %08x", "read %08x write %08x",
obj, reloc->target_handle, obj, reloc->target_handle,
...@@ -316,7 +316,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj, ...@@ -316,7 +316,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
} }
if (unlikely(reloc->write_domain && target_obj->pending_write_domain && if (unlikely(reloc->write_domain && target_obj->pending_write_domain &&
reloc->write_domain != target_obj->pending_write_domain)) { reloc->write_domain != target_obj->pending_write_domain)) {
DRM_ERROR("Write domain conflict: " DRM_DEBUG("Write domain conflict: "
"obj %p target %d offset %d " "obj %p target %d offset %d "
"new %08x old %08x\n", "new %08x old %08x\n",
obj, reloc->target_handle, obj, reloc->target_handle,
...@@ -337,7 +337,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj, ...@@ -337,7 +337,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
/* Check that the relocation address is valid... */ /* Check that the relocation address is valid... */
if (unlikely(reloc->offset > obj->base.size - 4)) { if (unlikely(reloc->offset > obj->base.size - 4)) {
DRM_ERROR("Relocation beyond object bounds: " DRM_DEBUG("Relocation beyond object bounds: "
"obj %p target %d offset %d size %d.\n", "obj %p target %d offset %d size %d.\n",
obj, reloc->target_handle, obj, reloc->target_handle,
(int) reloc->offset, (int) reloc->offset,
...@@ -345,7 +345,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj, ...@@ -345,7 +345,7 @@ i915_gem_execbuffer_relocate_entry(struct drm_i915_gem_object *obj,
return ret; return ret;
} }
if (unlikely(reloc->offset & 3)) { if (unlikely(reloc->offset & 3)) {
DRM_ERROR("Relocation not 4-byte aligned: " DRM_DEBUG("Relocation not 4-byte aligned: "
"obj %p target %d offset %d.\n", "obj %p target %d offset %d.\n",
obj, reloc->target_handle, obj, reloc->target_handle,
(int) reloc->offset); (int) reloc->offset);
...@@ -724,7 +724,7 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev, ...@@ -724,7 +724,7 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
obj = to_intel_bo(drm_gem_object_lookup(dev, file, obj = to_intel_bo(drm_gem_object_lookup(dev, file,
exec[i].handle)); exec[i].handle));
if (&obj->base == NULL) { if (&obj->base == NULL) {
DRM_ERROR("Invalid object handle %d at index %d\n", DRM_DEBUG("Invalid object handle %d at index %d\n",
exec[i].handle, i); exec[i].handle, i);
ret = -ENOENT; ret = -ENOENT;
goto err; goto err;
...@@ -1055,7 +1055,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1055,7 +1055,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
int ret, mode, i; int ret, mode, i;
if (!i915_gem_check_execbuffer(args)) { if (!i915_gem_check_execbuffer(args)) {
DRM_ERROR("execbuf with invalid offset/length\n"); DRM_DEBUG("execbuf with invalid offset/length\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1070,20 +1070,20 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1070,20 +1070,20 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
break; break;
case I915_EXEC_BSD: case I915_EXEC_BSD:
if (!HAS_BSD(dev)) { if (!HAS_BSD(dev)) {
DRM_ERROR("execbuf with invalid ring (BSD)\n"); DRM_DEBUG("execbuf with invalid ring (BSD)\n");
return -EINVAL; return -EINVAL;
} }
ring = &dev_priv->ring[VCS]; ring = &dev_priv->ring[VCS];
break; break;
case I915_EXEC_BLT: case I915_EXEC_BLT:
if (!HAS_BLT(dev)) { if (!HAS_BLT(dev)) {
DRM_ERROR("execbuf with invalid ring (BLT)\n"); DRM_DEBUG("execbuf with invalid ring (BLT)\n");
return -EINVAL; return -EINVAL;
} }
ring = &dev_priv->ring[BCS]; ring = &dev_priv->ring[BCS];
break; break;
default: default:
DRM_ERROR("execbuf with unknown ring: %d\n", DRM_DEBUG("execbuf with unknown ring: %d\n",
(int)(args->flags & I915_EXEC_RING_MASK)); (int)(args->flags & I915_EXEC_RING_MASK));
return -EINVAL; return -EINVAL;
} }
...@@ -1109,18 +1109,18 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1109,18 +1109,18 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
} }
break; break;
default: default:
DRM_ERROR("execbuf with unknown constants: %d\n", mode); DRM_DEBUG("execbuf with unknown constants: %d\n", mode);
return -EINVAL; return -EINVAL;
} }
if (args->buffer_count < 1) { if (args->buffer_count < 1) {
DRM_ERROR("execbuf with %d buffers\n", args->buffer_count); DRM_DEBUG("execbuf with %d buffers\n", args->buffer_count);
return -EINVAL; return -EINVAL;
} }
if (args->num_cliprects != 0) { if (args->num_cliprects != 0) {
if (ring != &dev_priv->ring[RCS]) { if (ring != &dev_priv->ring[RCS]) {
DRM_ERROR("clip rectangles are only valid with the render ring\n"); DRM_DEBUG("clip rectangles are only valid with the render ring\n");
return -EINVAL; return -EINVAL;
} }
...@@ -1165,7 +1165,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1165,7 +1165,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
obj = to_intel_bo(drm_gem_object_lookup(dev, file, obj = to_intel_bo(drm_gem_object_lookup(dev, file,
exec[i].handle)); exec[i].handle));
if (&obj->base == NULL) { if (&obj->base == NULL) {
DRM_ERROR("Invalid object handle %d at index %d\n", DRM_DEBUG("Invalid object handle %d at index %d\n",
exec[i].handle, i); exec[i].handle, i);
/* prevent error path from reading uninitialized data */ /* prevent error path from reading uninitialized data */
ret = -ENOENT; ret = -ENOENT;
...@@ -1173,7 +1173,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1173,7 +1173,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
} }
if (!list_empty(&obj->exec_list)) { if (!list_empty(&obj->exec_list)) {
DRM_ERROR("Object %p [handle %d, index %d] appears more than once in object list\n", DRM_DEBUG("Object %p [handle %d, index %d] appears more than once in object list\n",
obj, exec[i].handle, i); obj, exec[i].handle, i);
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
...@@ -1211,7 +1211,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, ...@@ -1211,7 +1211,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
/* Set the pending read domains for the batch buffer to COMMAND */ /* Set the pending read domains for the batch buffer to COMMAND */
if (batch_obj->base.pending_write_domain) { if (batch_obj->base.pending_write_domain) {
DRM_ERROR("Attempting to use self-modifying batch buffer\n"); DRM_DEBUG("Attempting to use self-modifying batch buffer\n");
ret = -EINVAL; ret = -EINVAL;
goto err; goto err;
} }
...@@ -1316,7 +1316,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -1316,7 +1316,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
int ret, i; int ret, i;
if (args->buffer_count < 1) { if (args->buffer_count < 1) {
DRM_ERROR("execbuf with %d buffers\n", args->buffer_count); DRM_DEBUG("execbuf with %d buffers\n", args->buffer_count);
return -EINVAL; return -EINVAL;
} }
...@@ -1324,7 +1324,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -1324,7 +1324,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
exec_list = drm_malloc_ab(sizeof(*exec_list), args->buffer_count); exec_list = drm_malloc_ab(sizeof(*exec_list), args->buffer_count);
exec2_list = drm_malloc_ab(sizeof(*exec2_list), args->buffer_count); exec2_list = drm_malloc_ab(sizeof(*exec2_list), args->buffer_count);
if (exec_list == NULL || exec2_list == NULL) { if (exec_list == NULL || exec2_list == NULL) {
DRM_ERROR("Failed to allocate exec list for %d buffers\n", DRM_DEBUG("Failed to allocate exec list for %d buffers\n",
args->buffer_count); args->buffer_count);
drm_free_large(exec_list); drm_free_large(exec_list);
drm_free_large(exec2_list); drm_free_large(exec2_list);
...@@ -1335,7 +1335,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -1335,7 +1335,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
(uintptr_t) args->buffers_ptr, (uintptr_t) args->buffers_ptr,
sizeof(*exec_list) * args->buffer_count); sizeof(*exec_list) * args->buffer_count);
if (ret != 0) { if (ret != 0) {
DRM_ERROR("copy %d exec entries failed %d\n", DRM_DEBUG("copy %d exec entries failed %d\n",
args->buffer_count, ret); args->buffer_count, ret);
drm_free_large(exec_list); drm_free_large(exec_list);
drm_free_large(exec2_list); drm_free_large(exec2_list);
...@@ -1376,7 +1376,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, ...@@ -1376,7 +1376,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
sizeof(*exec_list) * args->buffer_count); sizeof(*exec_list) * args->buffer_count);
if (ret) { if (ret) {
ret = -EFAULT; ret = -EFAULT;
DRM_ERROR("failed to copy %d exec entries " DRM_DEBUG("failed to copy %d exec entries "
"back to user (%d)\n", "back to user (%d)\n",
args->buffer_count, ret); args->buffer_count, ret);
} }
...@@ -1396,7 +1396,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, ...@@ -1396,7 +1396,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
int ret; int ret;
if (args->buffer_count < 1) { if (args->buffer_count < 1) {
DRM_ERROR("execbuf2 with %d buffers\n", args->buffer_count); DRM_DEBUG("execbuf2 with %d buffers\n", args->buffer_count);
return -EINVAL; return -EINVAL;
} }
...@@ -1406,7 +1406,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, ...@@ -1406,7 +1406,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
exec2_list = drm_malloc_ab(sizeof(*exec2_list), exec2_list = drm_malloc_ab(sizeof(*exec2_list),
args->buffer_count); args->buffer_count);
if (exec2_list == NULL) { if (exec2_list == NULL) {
DRM_ERROR("Failed to allocate exec list for %d buffers\n", DRM_DEBUG("Failed to allocate exec list for %d buffers\n",
args->buffer_count); args->buffer_count);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1415,7 +1415,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, ...@@ -1415,7 +1415,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
(uintptr_t) args->buffers_ptr, (uintptr_t) args->buffers_ptr,
sizeof(*exec2_list) * args->buffer_count); sizeof(*exec2_list) * args->buffer_count);
if (ret != 0) { if (ret != 0) {
DRM_ERROR("copy %d exec entries failed %d\n", DRM_DEBUG("copy %d exec entries failed %d\n",
args->buffer_count, ret); args->buffer_count, ret);
drm_free_large(exec2_list); drm_free_large(exec2_list);
return -EFAULT; return -EFAULT;
...@@ -1430,7 +1430,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data, ...@@ -1430,7 +1430,7 @@ i915_gem_execbuffer2(struct drm_device *dev, void *data,
sizeof(*exec2_list) * args->buffer_count); sizeof(*exec2_list) * args->buffer_count);
if (ret) { if (ret) {
ret = -EFAULT; ret = -EFAULT;
DRM_ERROR("failed to copy %d exec entries " DRM_DEBUG("failed to copy %d exec entries "
"back to user (%d)\n", "back to user (%d)\n",
args->buffer_count, ret); args->buffer_count, ret);
} }
......
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