Message ID | 1448532380-8289-1-git-send-email-deathsimple@vodafone.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 26.11.2015 19:06, Christian König wrote: > From: Christian König <christian.koenig@amd.com> > > That got messed up while porting it from Radeon. > > Signed-off-by: Christian König <christian.koenig@amd.com> > Cc: stable@vger.kernel.org > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++-- > 1 file 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 00c5b58..af53215 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c > @@ -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 */ > Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
On Thu, Nov 26, 2015 at 9:42 PM, Michel Dänzer <michel@daenzer.net> wrote: > On 26.11.2015 19:06, Christian König wrote: >> From: Christian König <christian.koenig@amd.com> >> >> That got messed up while porting it from Radeon. >> >> Signed-off-by: Christian König <christian.koenig@amd.com> >> Cc: stable@vger.kernel.org >> --- >> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 +++-- >> 1 file 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 00c5b58..af53215 100644 >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c >> @@ -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 */ >> > > Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Applied. thanks! Alex > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 00c5b58..af53215 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -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 */