drm/amdgpu: fix userptr flags check
That got messed up while porting it from Radeon. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
8c14f72b57
commit
585116c5fa
@@ -235,8 +235,9 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
|
|||||||
AMDGPU_GEM_USERPTR_REGISTER))
|
AMDGPU_GEM_USERPTR_REGISTER))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (!(args->flags & AMDGPU_GEM_USERPTR_ANONONLY) ||
|
if (!(args->flags & AMDGPU_GEM_USERPTR_READONLY) && (
|
||||||
!(args->flags & AMDGPU_GEM_USERPTR_REGISTER)) {
|
!(args->flags & AMDGPU_GEM_USERPTR_ANONONLY) ||
|
||||||
|
!(args->flags & AMDGPU_GEM_USERPTR_REGISTER))) {
|
||||||
|
|
||||||
/* if we want to write to it we must require anonymous
|
/* if we want to write to it we must require anonymous
|
||||||
memory and install a MMU notifier */
|
memory and install a MMU notifier */
|
||||||
|
|||||||
Reference in New Issue
Block a user