diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-04 07:37:41 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-09 14:24:30 -0400 |
commit | ae7d49d879fd196bded306e9465e0aa5a203e971 (patch) | |
tree | 40bb7a541a38fade186a1ea8dadb94f525584a62 | |
parent | 87f8ebf309b2df69b57be96bf36d2d61009fd296 (diff) |
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 <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 24ee4622484f..b0fb394b9ff4 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) | |||
4198 | if (alignment == 0) | 4198 | if (alignment == 0) |
4199 | alignment = i915_gem_get_gtt_alignment(obj); | 4199 | alignment = i915_gem_get_gtt_alignment(obj); |
4200 | if (obj_priv->gtt_offset & (alignment - 1)) { | 4200 | if (obj_priv->gtt_offset & (alignment - 1)) { |
4201 | WARN(obj_priv->pin_count, | ||
4202 | "bo is already pinned with incorrect alignment:" | ||
4203 | " offset=%x, req.alignment=%x\n", | ||
4204 | obj_priv->gtt_offset, alignment); | ||
4201 | ret = i915_gem_object_unbind(obj); | 4205 | ret = i915_gem_object_unbind(obj); |
4202 | if (ret) | 4206 | if (ret) |
4203 | return ret; | 4207 | return ret; |