[PATCH 2/2] drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm()

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

 



On Thu, Feb 9, 2017 at 5:28 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> This removes code duplication.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

Applied.  thanks!

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index ae4658a10e2c..76569e31bfd8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -506,13 +506,7 @@ static void amdgpu_gem_va_update_vm(struct amdgpu_device *adev,
>         list_for_each_entry(entry, list, head) {
>                 struct amdgpu_bo *bo =
>                         container_of(entry->bo, struct amdgpu_bo, tbo);
> -
> -               /* if anything is swapped out don't swap it in here,
> -                  just abort and wait for the next CS */
> -               if (!amdgpu_bo_gpu_accessible(bo))
> -                       goto error;
> -
> -               if (bo->shadow && !amdgpu_bo_gpu_accessible(bo->shadow))
> +               if (amdgpu_gem_va_check(NULL, bo))
>                         goto error;
>         }
>
> --
> 2.11.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> 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