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.Signed-off-by: Tvrtko Ursulin <[email protected]> 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(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 5376035d32fe..0259d81e5157 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -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); -- 2.54.0
