All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Olšák" <maraeo@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 08/10] amdgpu: validate user memory for userptr
Date: Tue, 12 Jan 2016 22:23:54 +0100	[thread overview]
Message-ID: <1452633836-26855-9-git-send-email-maraeo@gmail.com> (raw)
In-Reply-To: <1452633836-26855-1-git-send-email-maraeo@gmail.com>

From: Chunming Zhou <David1.Zhou@amd.com>

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
---
 amdgpu/amdgpu_bo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 2ae1c18..d30fd1e 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -539,7 +539,8 @@ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev,
 	struct drm_amdgpu_gem_userptr args;
 
 	args.addr = (uintptr_t)cpu;
-	args.flags = AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER;
+	args.flags = AMDGPU_GEM_USERPTR_ANONONLY | AMDGPU_GEM_USERPTR_REGISTER |
+		AMDGPU_GEM_USERPTR_VALIDATE;
 	args.size = size;
 	r = drmCommandWriteRead(dev->fd, DRM_AMDGPU_GEM_USERPTR,
 				&args, sizeof(args));
-- 
2.1.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-01-12 21:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 21:23 [PATCH 00/10] libdrm amdgpu patches Marek Olšák
2016-01-12 21:23 ` [PATCH 01/10] Revert "amdgpu: remove sequence mutex" Marek Olšák
2016-01-12 21:23 ` [PATCH 02/10] amdgpu: add the interface of waiting multiple fences Marek Olšák
2016-01-12 21:23 ` [PATCH 03/10] amdgpu: drop address patching logics Marek Olšák
2016-01-12 21:23 ` [PATCH 04/10] amdgpu/tests: add multi-fence test in base test Marek Olšák
2016-01-12 21:23 ` [PATCH 05/10] amdgpu: Cast pointer to uintptr_t for assignment to unsigned integer Marek Olšák
2016-01-13  3:31   ` Michel Dänzer
2016-01-12 21:23 ` [PATCH 06/10] amdgpu: add semaphore support Marek Olšák
2016-01-12 21:23 ` [PATCH 07/10] tests/amdgpu: add semaphore test Marek Olšák
2016-01-12 21:23 ` Marek Olšák [this message]
2016-01-12 21:23 ` [PATCH 09/10] amdgpu: cs_wait_fences now can return the first signaled fence index Marek Olšák
2016-01-12 21:23 ` [PATCH 10/10] amdgpu: list each entry safely for sw semaphore when submit ib Marek Olšák
2016-01-12 21:30 ` [PATCH 00/10] libdrm amdgpu patches Alex Deucher
2016-01-13 10:43   ` Christian König
2016-01-13 11:15     ` Marek Olšák
2016-01-13 11:34       ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1452633836-26855-9-git-send-email-maraeo@gmail.com \
    --to=maraeo@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.