[PATCH 02/11] drm/amdgpu: validate the VM root PD from the VM code

Huang Rui ray.huang at amd.com
Thu Aug 23 07:28:00 UTC 2018


On Wed, Aug 22, 2018 at 05:05:08PM +0200, Christian König wrote:
> Preparation for following changes. This validates the root PD twice,
> but the overhead of that should be minimal.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 73b8dcaf66e6..53ce9982a5ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -291,11 +291,11 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
>  	list_for_each_entry_safe(bo_base, tmp, &vm->evicted, vm_status) {
>  		struct amdgpu_bo *bo = bo_base->bo;
>  
> -		if (bo->parent) {
> -			r = validate(param, bo);
> -			if (r)
> -				break;
> +		r = validate(param, bo);
> +		if (r)
> +			break;

In orignal case, we skip the root PD. But now, it is validated one time.
May I know where is another time?

Thanks,
Ray

>  
> +		if (bo->parent) {
>  			spin_lock(&glob->lru_lock);
>  			ttm_bo_move_to_lru_tail(&bo->tbo);
>  			if (bo->shadow)
> -- 
> 2.17.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list