[PATCH] drm/amdgpu: skip update root page table

Christian König christian.koenig at amd.com
Sat Feb 8 15:54:39 UTC 2020


Am 08.02.20 um 16:12 schrieb Pan, Xinhui:
> The pde is on root page table. No need to update parent's page table.

NAK, the caller is responsible to never call amdgpu_vm_update_pde() with 
the root PD.

Otherwise you could end up with empty update commands and that is 
illegal as well.

Christian.

>
> Change-Id: I2ec1015736039cf0278bdfa9bec35185ece506b5
> Signed-off-by: xinhui pan <xinhui.pan at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index cc56eaba1911..247f328b7223 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1235,10 +1235,14 @@ static int amdgpu_vm_update_pde(struct amdgpu_vm_update_params *params,
>   				struct amdgpu_vm_pt *entry)
>   {
>   	struct amdgpu_vm_pt *parent = amdgpu_vm_pt_parent(entry);
> -	struct amdgpu_bo *bo = parent->base.bo, *pbo;
> +	struct amdgpu_bo *bo, *pbo;
>   	uint64_t pde, pt, flags;
>   	unsigned level;
>   
> +	if (!parent)
> +		return 0;
> +
> +	bo = parent->base.bo;
>   	for (level = 0, pbo = bo->parent; pbo; ++level)
>   		pbo = pbo->parent;
>   



More information about the amd-gfx mailing list