From: Chris Wilson Date: Wed, 4 Aug 2010 11:37:41 +0000 (+0100) Subject: drm/i915: Emit a backtrace if we attempt to rebind a pinned buffer X-Git-Tag: v3.0~3525^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae7d49d879fd196bded306e9465e0aa5a203e971;p=platform%2Fkernel%2Flinux-amlogic.git drm/i915: Emit a backtrace if we attempt to rebind a pinned buffer This debugging trace was useful for finding the fbcon regression on i965, and it may prove useful again in future. Signed-off-by: Chris Wilson Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 24ee462..b0fb394 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4198,6 +4198,10 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment) if (alignment == 0) alignment = i915_gem_get_gtt_alignment(obj); if (obj_priv->gtt_offset & (alignment - 1)) { + WARN(obj_priv->pin_count, + "bo is already pinned with incorrect alignment:" + " offset=%x, req.alignment=%x\n", + obj_priv->gtt_offset, alignment); ret = i915_gem_object_unbind(obj); if (ret) return ret;