aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <[email protected]>2022-11-09 12:14:44 +0100
committerAlex Deucher <[email protected]>2022-11-21 16:40:04 -0500
commitb39df63b16b64a3af42695acb9bc567aad144776 (patch)
treeaad62ef0004303f933d1b424cc0e8028d5913382
parent85ef1679a190a9740f6b72217cb139a0d9c58706 (diff)
drm/amdgpu: always register an MMU notifier for userptr
Since switching to HMM we always need that because we no longer grab references to the pages. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Felix Kuehling <[email protected]> CC: [email protected] Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c8
1 files 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);