Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 358c258a authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: allow write access to mapped userptrs



With the updated MMU notifier we should also be able to
handle the writeback case correctly.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 00dfedc1
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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;
	}