Re: [PATCH 2/8] drm/amdgpu: cleanup VM dw estimation a bit

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

 



On 2019-02-04 7:42 a.m., Christian König wrote:
> No functional change.
>
> Signed-off-by: Christian König <christian.koenig@xxxxxxx>

Minor indentation issue inline. With that fixed, this patch is 
Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 ++++++++--------
>   1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 44950f3b8801..69b0bee0661e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1804,13 +1804,12 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>   	/*
>   	 * reserve space for two commands every (1 << BLOCK_SIZE)
>   	 *  entries or 2k dwords (whatever is smaller)
> -         *
> -         * The second command is for the shadow pagetables.
>   	 */
> +	ncmds = ((nptes >> min(adev->vm_manager.block_size, 11u)) + 1);
> +
> +         /* The second command is for the shadow pagetables. */

Using space instead of TABs.


>   	if (vm->root.base.bo->shadow)
> -		ncmds = ((nptes >> min(adev->vm_manager.block_size, 11u)) + 1) * 2;
> -	else
> -		ncmds = ((nptes >> min(adev->vm_manager.block_size, 11u)) + 1);
> +		ncmds *= 2;
>   
>   	/* padding, etc. */
>   	ndw = 64;
> @@ -1829,10 +1828,11 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
>   		ndw += ncmds * 10;
>   
>   		/* extra commands for begin/end fragments */
> +		ncmds = 2 * adev->vm_manager.fragment_size;
>   		if (vm->root.base.bo->shadow)
> -		        ndw += 2 * 10 * adev->vm_manager.fragment_size * 2;
> -		else
> -		        ndw += 2 * 10 * adev->vm_manager.fragment_size;
> +			ncmds *= 2;
> +
> +		ndw += 10 * ncmds;
>   
>   		params.func = amdgpu_vm_do_set_ptes;
>   	}
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux