drm/amdgpu: fix userptr flags check
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix userptr flags check
From: Christian König <[email protected]>
That got messed up while porting it from Radeon.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3 -2
@@ -242,8 +242,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 */
Signature · 6 lines
2.5.0 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 17 lines · Christian König
From: Christian König <[email protected]>
That got messed up while porting it from Radeon.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0
-0@@ -242,8 +242,9 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, AMDGPU_GEM_USERPTR_REGISTER))
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, · line 250
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3
-2return -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 */
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Alex Deucher
AppliedQuoted 25 lines · Michel Dänzer
Quoted 24 lines · Christian König
From: Christian König <[email protected]>
That got messed up while porting it from Radeon.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3
-2@@ -242,8 +242,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 ))) {
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data, · line 250
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0
-0/* if we want to write to it we must require anonymous memory and install a MMU notifier */ Reviewed-by Michel Dänzer <[email protected]>
Applied. thanks!
Alex
Quoted 5 lines
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel