Skip to contentSkip to conversation

drm/amdgpu: Remove obsolete check from userptr creation

PATCH New Tvrtko Ursulin 1 participant 1 message May 13

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Remove obsolete check from userptr creation

Ever since commit
b39df63b16b6 ("drm/amdgpu: always register an MMU notifier for userptr") it is no longer needed to reject not asking for a MMU notifier with read-write objects since notifiers are always installed.

Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Felix Kuehling <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -7
index 5376035d32fe..0259d81e5157 100644
@@ -514,13 +514,6 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
 	    AMDGPU_GEM_USERPTR_REGISTER))
 		return -EINVAL;
 
-	if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) &&
-	     !(args->flags & AMDGPU_GEM_USERPTR_REGISTER)) {
-
-		/* if we want to write to it we must install a MMU notifier */
-		return -EACCES;
-	}
-
 	/* create a gem object to contain this object in */
 	r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU,
 				     0, ttm_bo_type_device, NULL, &gobj, fpriv->xcp_id + 1);
Signature · 1 line
2.54.0