drm/i915: drop duplicate ggtt vma list add in setup_global_gtt
Subsystems (2)
PATCH 1/1 drm/i915: drop duplicate ggtt vma list add in setup_global_gtt
Preallocated, stolen objects will already be added to this list when we first create them.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 1 - 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +0 -1
@@ -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 ; -list_add (&vma->vma_link, &obj->vma_list); } dev_priv->gtt.base.start = start;
Signature · 1 line
1.8.4.2
Quoted 2 lines · Jesse Barnes
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."
Quoted 2 lines
Signed-off-by Jesse Barnes <[email protected]>
drivers/gpu/drm/i915/i915_gem_gtt.c void i915_gem_setup_global_gtt(struct drm_device *dev, · line 1126
Quoted 12 lines
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 1 - 1 file changed, 1 deletion(-)drivers/gpu/drm/i915/i915_gem_gtt.c +0
-0@@ -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;
drivers/gpu/drm/i915/i915_gem_gtt.c void i915_gem_setup_global_gtt(struct drm_device *dev, · line 1127
Quoted 2 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +0
-1-list_add (&vma->vma_link, &obj->vma_list); }
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Daniel Vetter
AppliedQuoted 11 lines · Chris Wilson
Quoted 2 lines · Jesse Barnes
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_listwhen creating their ggtt vma entry, and coincidentally also marked as holding a ggtt mapping. Repeating thevma_listmanipulation when setting up the ggtt after preallocation is a recipe for an unhappy kernel."
Agreed.
Quoted 4 lines
Quoted 3 lines
Signed-off-by Jesse Barnes <[email protected]>Reviewed-by Chris Wilson <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch