Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228665
b: refs/heads/master
c: 7465378
h: refs/heads/master
i:
  228663: 5f05c36
v: v3
  • Loading branch information
Chris Wilson committed Oct 29, 2010
1 parent 54b50e2 commit 941c341
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bbe2e11a4b683ead070ad5823cdf756e1525b903
refs/heads/master: 7465378fd7c681f6cf2b74b3494c4f0991d8c8ac
16 changes: 3 additions & 13 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4128,12 +4128,7 @@ i915_gem_object_pin(struct drm_gem_object *obj, uint32_t alignment,
return ret;
}

obj_priv->pin_count++;

/* If the object is not active and not pending a flush,
* remove it from the inactive list
*/
if (obj_priv->pin_count == 1) {
if (obj_priv->pin_count++ == 0) {
i915_gem_info_add_pin(dev_priv, obj, mappable);
if (!obj_priv->active)
list_move_tail(&obj_priv->mm_list,
Expand All @@ -4153,15 +4148,10 @@ i915_gem_object_unpin(struct drm_gem_object *obj)
struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);

WARN_ON(i915_verify_lists(dev));
obj_priv->pin_count--;
BUG_ON(obj_priv->pin_count < 0);
BUG_ON(obj_priv->pin_count == 0);
BUG_ON(obj_priv->gtt_space == NULL);

/* If the object is no longer pinned, and is
* neither active nor being flushed, then stick it on
* the inactive list
*/
if (obj_priv->pin_count == 0) {
if (--obj_priv->pin_count == 0) {
if (!obj_priv->active)
list_move_tail(&obj_priv->mm_list,
&dev_priv->mm.inactive_list);
Expand Down

0 comments on commit 941c341

Please sign in to comment.