diff mbox series

drm/i915/gem: Reinitialise the local list before repeating

Message ID 20191205132912.606868-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915/gem: Reinitialise the local list before repeating | expand

Commit Message

Chris Wilson Dec. 5, 2019, 1:29 p.m. UTC
As we may start the loop again, we require our local list of i915_vma
we've processed to be reinitialised.

Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events")
Closes: https://gitlab.freedesktop.org/drm/intel/issues/731
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andi Shyti Dec. 5, 2019, 2:23 p.m. UTC | #1
Hi Chris,

On Thu, Dec 05, 2019 at 01:29:12PM +0000, Chris Wilson wrote:
> As we may start the loop again, we require our local list of i915_vma
> we've processed to be reinitialised.
> 
> Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events")
> Closes: https://gitlab.freedesktop.org/drm/intel/issues/731
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index cc8c6960b689..98b65b718e1a 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -175,7 +175,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj,
>  		i915_vm_close(vm);
>  		spin_lock(&obj->vma.lock);
>  	}
> -	list_splice(&still_in_list, &obj->vma.list);
> +	list_splice_init(&still_in_list, &obj->vma.list);

Reviewed-by: Andi Shyti <andi.shyti@intel.com>

Thanks,
Andi
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index cc8c6960b689..98b65b718e1a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -175,7 +175,7 @@  int i915_gem_object_unbind(struct drm_i915_gem_object *obj,
 		i915_vm_close(vm);
 		spin_lock(&obj->vma.lock);
 	}
-	list_splice(&still_in_list, &obj->vma.list);
+	list_splice_init(&still_in_list, &obj->vma.list);
 	spin_unlock(&obj->vma.lock);
 
 	if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) {