[PATCH 1/8] drm/amdgpu: fix waiting for BO moves with CPU based PD/PT updates
Kuehling, Felix
Felix.Kuehling at amd.com
Mon Feb 4 20:19:37 UTC 2019
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.koenig at amd.com>
This patch is Reviewed-by: Felix Kuehling <Felix.Kuehling at 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(¶ms, start, last + 1,
More information about the amd-gfx
mailing list