All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: xinhui pan <xinhui.pan@amd.com>, amd-gfx@lists.freedesktop.org
Cc: "Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Do not move root PT bo to relocated list
Date: Tue, 11 Feb 2020 10:46:47 +0100	[thread overview]
Message-ID: <21e97807-d7ad-8181-89da-eae0da17628a@gmail.com> (raw)
In-Reply-To: <20200211023245.3092-1-xinhui.pan@amd.com>

Am 11.02.20 um 03:32 schrieb xinhui pan:
> As root PD has no parent, we just need move its status to idle.
>
> Suggested-by: Christian König <christian.koenig@amd.com>
> Signed-off-by: xinhui pan <xinhui.pan@amd.com>
> CC: Christian König <christian.koenig@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++++++++++++-------------
>   1 file changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index cc56eaba1911..0be293eb2773 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -229,19 +229,6 @@ static void amdgpu_vm_bo_evicted(struct amdgpu_vm_bo_base *vm_bo)
>   	else
>   		list_move_tail(&vm_bo->vm_status, &vm->evicted);
>   }
> -
> -/**
> - * amdgpu_vm_bo_relocated - vm_bo is reloacted
> - *
> - * @vm_bo: vm_bo which is relocated
> - *
> - * State for PDs/PTs which needs to update their parent PD.
> - */
> -static void amdgpu_vm_bo_relocated(struct amdgpu_vm_bo_base *vm_bo)
> -{
> -	list_move(&vm_bo->vm_status, &vm_bo->vm->relocated);
> -}
> -
>   /**
>    * amdgpu_vm_bo_moved - vm_bo is moved
>    *
> @@ -284,6 +271,22 @@ static void amdgpu_vm_bo_invalidated(struct amdgpu_vm_bo_base *vm_bo)
>   	spin_unlock(&vm_bo->vm->invalidated_lock);
>   }
>   
> +/**
> + * amdgpu_vm_bo_relocated - vm_bo is reloacted
> + *
> + * @vm_bo: vm_bo which is relocated
> + *
> + * State for PDs/PTs which needs to update their parent PD.
> + * For the root PD, just move to idle state.
> + */
> +static void amdgpu_vm_bo_relocated(struct amdgpu_vm_bo_base *vm_bo)
> +{
> +	if (vm_bo->bo->parent)
> +		list_move(&vm_bo->vm_status, &vm_bo->vm->relocated);
> +	else
> +		amdgpu_vm_bo_idle(vm_bo);
> +}
> +
>   /**
>    * amdgpu_vm_bo_done - vm_bo is done
>    *
> @@ -691,10 +694,7 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
>   			amdgpu_vm_bo_moved(bo_base);
>   		} else {
>   			vm->update_funcs->map_table(bo);
> -			if (bo->parent)
> -				amdgpu_vm_bo_relocated(bo_base);
> -			else
> -				amdgpu_vm_bo_idle(bo_base);
> +			amdgpu_vm_bo_relocated(bo_base);
>   		}
>   	}
>   

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-02-11  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11  2:32 [PATCH] drm/amdgpu: Do not move root PT bo to relocated list xinhui pan
2020-02-11  9:46 ` Christian König [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-09  2:52 Pan, Xinhui
2020-02-09  8:21 ` Christian König
2020-02-10  0:59   ` Pan, Xinhui
2020-02-10  9:31     ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21e97807-d7ad-8181-89da-eae0da17628a@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=xinhui.pan@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.