diff options
| author | Christian König <[email protected]> | 2015-11-26 10:06:20 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-11-30 19:38:47 +0000 |
| commit | 585116c5fafe578e89c146c9839c95ac75acfb9d (patch) | |
| tree | a7e266a0801cf431719ccb4c1e36a60c13749249 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | Merge branch 'linux-4.4' of git://anongit.freedesktop.org/git/nouveau/linux-2... (diff) | |
| download | kernel-585116c5fafe578e89c146c9839c95ac75acfb9d.tar.gz kernel-585116c5fafe578e89c146c9839c95ac75acfb9d.zip | |
drm/amdgpu: fix userptr flags check
That got messed up while porting it from Radeon.
Reviewed-by: Michel Dänzer <[email protected]>
Signed-off-by: Christian König <[email protected]>
Cc: [email protected]
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index fc32fc01a64b..f6ea4b43a60c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -235,8 +235,9 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, AMDGPU_GEM_USERPTR_REGISTER)) return -EINVAL; - if (!(args->flags & AMDGPU_GEM_USERPTR_ANONONLY) || - !(args->flags & AMDGPU_GEM_USERPTR_REGISTER)) { + if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) && ( + !(args->flags & AMDGPU_GEM_USERPTR_ANONONLY) || + !(args->flags & AMDGPU_GEM_USERPTR_REGISTER))) { /* if we want to write to it we must require anonymous memory and install a MMU notifier */ |
