summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-03-11 15:29:27 +0100
committerAlex Deucher <alexander.deucher@amd.com>2016-03-14 13:35:04 -0400
commit358c258a816baed4c6997b59c2117578a1360498 (patch)
tree12e42c7a610de5db482e988f0aeb26a873376013 /drivers
parent00dfedc1e4999926d4af455fc07215ec8c0347ff (diff)
downloadlinux-358c258a816baed4c6997b59c2117578a1360498.tar.gz
linux-358c258a816baed4c6997b59c2117578a1360498.tar.bz2
linux-358c258a816baed4c6997b59c2117578a1360498.zip
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')
-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 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,
AMDGPU_GEM_USERPTR_REGISTER))
return -EINVAL;
- if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) && (
- !(args->flags & AMDGPU_GEM_USERPTR_ANONONLY) ||
- !(args->flags & AMDGPU_GEM_USERPTR_REGISTER))) {
+ if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) &&
+ !(args->flags & AMDGPU_GEM_USERPTR_REGISTER)) {
- /* if we want to write to it we must require anonymous
- memory and install a MMU notifier */
+ /* if we want to write to it we must install a MMU notifier */
return -EACCES;
}