Re: [PATCH] drm/i915: drop duplicate ggtt vma list add in setup_global_gtt

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

 



On Tue, Nov 12, 2013 at 02:53:08PM -0800, Jesse Barnes wrote:
> Preallocated, stolen objects will already be added to this list when we
> first create them.

That had me scratching my head a bit trying to work out where and why
stolen objects were explicitly adding themselves to the obj->vma_list.

"Preallocated objects will already have been added to the vma_list when
creating their ggtt vma entry, and coincidentally also marked as holding
a ggtt mapping. Repeating the vma_list manipulation when setting up the
ggtt after preallocation is a recipe for an unhappy kernel."

> 
> Signed-off-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/i915/i915_gem_gtt.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index f69bdc7..efb5dab 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1124,7 +1124,6 @@ void i915_gem_setup_global_gtt(struct drm_device *dev,
>  		if (ret)
>  			DRM_DEBUG_KMS("Reservation failed\n");
>  		obj->has_global_gtt_mapping = 1;
 -		obj->has_global_gtt_mapping = 1;
> -		list_add(&vma->vma_link, &obj->vma_list);
>  	}
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




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