[PATCH 10/11] drm/i915: Skip holding a reference to the execbuffer objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As we only maintain the list underneath the struct_mutex, we can hold a
'borrowed' reference to the objects safe in the knowledge that they will
not disappear.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 18a6ab7..f6bd92c 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -111,7 +111,6 @@ eb_lookup_objects(struct eb_objects *eb,
 			return -EINVAL;
 		}
 
-		drm_gem_object_reference(&obj->base);
 		list_add_tail(&obj->exec_list, &eb->objects);
 
 		obj->exec_entry = &exec[i];
@@ -162,7 +161,6 @@ eb_destroy(struct eb_objects *eb)
 				       struct drm_i915_gem_object,
 				       exec_list);
 		list_del_init(&obj->exec_list);
-		drm_gem_object_unreference(&obj->base);
 	}
 	kfree(eb);
 }
@@ -603,7 +601,6 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
 				       struct drm_i915_gem_object,
 				       exec_list);
 		list_del_init(&obj->exec_list);
-		drm_gem_object_unreference(&obj->base);
 	}
 
 	mutex_unlock(&dev->struct_mutex);
-- 
1.7.10.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux