Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199606
b: refs/heads/master
c: ac0c6b5
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson authored and Eric Anholt committed May 28, 2010
1 parent 35a1680 commit 031ea1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7faf32d00529b9c501e37a31d4bf8acef4f8f59
refs/heads/master: ac0c6b5ad3b3b513e1057806d4b7627fcc0ecc27
11 changes: 11 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4164,6 +4164,17 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment)
BUG_ON(obj_priv->pin_count == DRM_I915_GEM_OBJECT_MAX_PIN_COUNT);

i915_verify_inactive(dev, __FILE__, __LINE__);

if (obj_priv->gtt_space != NULL) {
if (alignment == 0)
alignment = i915_gem_get_gtt_alignment(obj);
if (obj_priv->gtt_offset & (alignment - 1)) {
ret = i915_gem_object_unbind(obj);
if (ret)
return ret;
}
}

if (obj_priv->gtt_space == NULL) {
ret = i915_gem_object_bind_to_gtt(obj, alignment);
if (ret)
Expand Down

0 comments on commit 031ea1d

Please sign in to comment.