diff options
author | Christian König <christian.koenig@amd.com> | 2016-03-11 09:29:27 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-03-14 13:35:04 -0400 |
commit | 358c258a816baed4c6997b59c2117578a1360498 (patch) | |
tree | 12e42c7a610de5db482e988f0aeb26a873376013 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 00dfedc1e4999926d4af455fc07215ec8c0347ff (diff) |
drm/amdgpu: allow write access to mapped userptrs
With the updated MMU notifier we should also be able to
handle the writeback case correctly.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 |
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 7f6b4d9841e5..5d280f6ae5bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |||
@@ -258,12 +258,10 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, | |||
258 | AMDGPU_GEM_USERPTR_REGISTER)) | 258 | AMDGPU_GEM_USERPTR_REGISTER)) |
259 | return -EINVAL; | 259 | return -EINVAL; |
260 | 260 | ||
261 | if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) && ( | 261 | if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) && |
262 | !(args->flags & AMDGPU_GEM_USERPTR_ANONONLY) || | 262 | !(args->flags & AMDGPU_GEM_USERPTR_REGISTER)) { |
263 | !(args->flags & AMDGPU_GEM_USERPTR_REGISTER))) { | ||
264 | 263 | ||
265 | /* if we want to write to it we must require anonymous | 264 | /* if we want to write to it we must install a MMU notifier */ |
266 | memory and install a MMU notifier */ | ||
267 | return -EACCES; | 265 | return -EACCES; |
268 | } | 266 | } |
269 | 267 | ||