Re: [PATCH] drm/radeon: fix adding all VAs to the freed list on remove v2

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

 



On Fri, Jun 26, 2015 at 6:31 AM, Christian König
<deathsimple@xxxxxxxxxxx> wrote:
> From: Christian König <christian.koenig@xxxxxxx>
>
> We only should do so when the BO_VA was actually mapped.
> Otherwise we get a nice error message on the next CS.
>
> v2: It actually doesn't matter if it was invalidated or not,
>     if it was mapped we need to clear the area where it was mapped.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>
> Tested-by: Michel Dänzer <michel.daenzer@xxxxxxx> (v1)

Applied.  Thanks!

Alex

> ---
>  drivers/gpu/drm/radeon/radeon_vm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
> index 3662157..ec10533 100644
> --- a/drivers/gpu/drm/radeon/radeon_vm.c
> +++ b/drivers/gpu/drm/radeon/radeon_vm.c
> @@ -1129,12 +1129,12 @@ void radeon_vm_bo_rmv(struct radeon_device *rdev,
>                 interval_tree_remove(&bo_va->it, &vm->va);
>
>         spin_lock(&vm->status_lock);
> -       if (list_empty(&bo_va->vm_status)) {
> +       list_del(&bo_va->vm_status);
> +       if (bo_va->it.start || bo_va->it.last) {
>                 bo_va->bo = radeon_bo_ref(bo_va->bo);
>                 list_add(&bo_va->vm_status, &vm->freed);
>         } else {
>                 radeon_fence_unref(&bo_va->last_pt_update);
> -               list_del(&bo_va->vm_status);
>                 kfree(bo_va);
>         }
>         spin_unlock(&vm->status_lock);
> --
> 1.9.1
>
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux