[PATCH] drm/amdgpu: allow write access to mapped userptrs
Alex Deucher
alexdeucher at gmail.com
Fri Mar 11 22:02:13 UTC 2016
On Fri, Mar 11, 2016 at 9:29 AM, Christian König
<deathsimple at vodafone.de> wrote:
> From: Christian König <christian.koenig at amd.com>
>
> With the updated MMU notifier we should also be able to
> handle the writeback case correctly.
>
> Signed-off-by: Christian König <christian.koenig at amd.com>
Applied. thanks!
Alex
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 8 +++-----
> 1 file 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 7f6b4d9..5d280f6 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;
> }
>
> --
> 2.5.0
>
More information about the dri-devel
mailing list