On 2019-02-04 7:42 a.m., Christian König wrote:
> Otherwise we open up the possibility to use uninitialized memory.
>
> Signed-off-by: Christian König <christian.koe...@amd.com>

This patch is Reviewed-by: Felix Kuehling <felix.kuehl...@amd.com>


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index c70621db3bb7..44950f3b8801 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1779,13 +1779,18 @@ static int amdgpu_vm_bo_update_mapping(struct 
> amdgpu_device *adev,
>               if (pages_addr)
>                       params.src = ~0;
>   
> -             /* Wait for PT BOs to be free. PTs share the same resv. object
> +             /* Wait for PT BOs to be idle. PTs share the same resv. object
>                * as the root PD BO
>                */
>               r = amdgpu_vm_wait_pd(adev, vm, owner);
>               if (unlikely(r))
>                       return r;
>   
> +             /* Wait for any BO move to be completed */
> +             r = dma_fence_wait(exclusive, true);
> +             if (unlikely(r))
> +                     return r;
> +
>               params.func = amdgpu_vm_cpu_set_ptes;
>               params.pages_addr = pages_addr;
>               return amdgpu_vm_update_ptes(&params, start, last + 1,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to