[PATCH 06/11] drm/i915: Take the handle idr spinlock once for looking up the exec objects

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

 



On Tue, Jan 08, 2013 at 10:53:14AM +0000, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---

Tiny bikeshed to sneak into follow-up patches, maybe ;-)

>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |   86 +++++++++++++++-------------
>  1 file changed, 46 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 27e2bf6..827d51b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -72,6 +72,46 @@ eb_add_object(struct eb_objects *eb, struct drm_i915_gem_object *obj)
>  		       &eb->buckets[obj->exec_handle & eb->and]);
>  }
>  
> +static int
> +eb_lookup_objects(struct eb_objects *eb,
> +		  struct drm_i915_gem_exec_object2 *exec,
> +		  int count,
> +		  struct drm_file *file,
> +		  struct list_head *objects)
> +{
> +	int i;
> +
> +	spin_lock(&file->table_lock);
> +	for (i = 0; i < count; i++) {
> +		struct drm_i915_gem_object *obj;
> +
> +		obj = to_intel_bo(idr_find(&file->object_idr, exec[i].handle));

static inline drm_gem_object_lookup_unlocked helper?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


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