Skip to content

Commit

Permalink
drm/i915: Be more informative when reporting "too large for aperture"…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed May 23, 2013
1 parent 90a8864 commit a36689c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2975,7 +2975,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;
}

Expand Down

0 comments on commit a36689c

Please sign in to comment.