blob: ead49fa5bd216e87b09ca87fabe24992db269803 [file] [log] [blame]
From c02628fc0cd3df67a39ce0ea2cb7dbfeaabbfd90 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue, 21 May 2013 16:58:49 +0100
Subject: drm/i915: Be more informative when reporting "too large for aperture"
error
This should help debugging the truly unexpected cases where it occurs -
in particular to see which value is garbage.
References: https://bugzilla.kernel.org/show_bug.cgi?id=58511
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[danvet: s/%ld/%zd/ as spotted by Wu Fengguang's autobuilder.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit a36689cb771f06819c3fa8139c3d3716dfdf6d53)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 34a1d71655a3..33de1ead1f5d 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3007,7 +3007,10 @@ i915_gem_object_bind_to_gtt(struct drm_i915_gem_object *obj,
*/
if (obj->base.size >
(map_and_fenceable ? dev_priv->gtt.mappable_end : dev_priv->gtt.total)) {
- DRM_ERROR("Attempting to bind an object larger than the aperture\n");
+ DRM_ERROR("Attempting to bind an object larger than the aperture: object=%zd > %s aperture=%ld\n",
+ obj->base.size,
+ map_and_fenceable ? "mappable" : "total",
+ map_and_fenceable ? dev_priv->gtt.mappable_end : dev_priv->gtt.total);
return -E2BIG;
}
--
1.8.5.rc3