[PATCH 1/4] drm/amdgpu: always register an MMU notifier for userptr
Felix Kuehling
felix.kuehling at amd.com
Thu Nov 10 21:46:36 UTC 2022
Am 2022-11-10 um 08:00 schrieb Christian König:
> Since switching to HMM we always need that because we no longer grab
> references to the pages.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> CC: stable at vger.kernel.org
Acked-by: Felix Kuehling <Felix.Kuehling at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 8ef31d687ef3..111484ceb47d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> @@ -413,11 +413,9 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
> if (r)
> goto release_object;
>
> - if (args->flags & AMDGPU_GEM_USERPTR_REGISTER) {
> - r = amdgpu_mn_register(bo, args->addr);
> - if (r)
> - goto release_object;
> - }
> + r = amdgpu_mn_register(bo, args->addr);
> + if (r)
> + goto release_object;
>
> if (args->flags & AMDGPU_GEM_USERPTR_VALIDATE) {
> r = amdgpu_ttm_tt_get_user_pages(bo, bo->tbo.ttm->pages);
More information about the amd-gfx
mailing list