diff mbox series

[02/14] drm/amdgpu: add UAPI for creating secure contexts (v2)

Message ID 1568202584-14471-3-git-send-email-ray.huang@amd.com (mailing list archive)
State New, archived
Headers show
Series drm/amdgpu: introduce secure buffer object support (trusted memory zone) | expand

Commit Message

Huang Rui Sept. 11, 2019, 11:50 a.m. UTC
From: Alex Deucher <alexander.deucher@amd.com>

Add a flag for when allocating a context to flag it as
secure.  The kernel driver will use this flag to determine
whether a rendering context is secure or not so that the
engine can be transitioned between secure or unsecure
or the work can be submitted to a secure queue depending
on the IP.

v2: the flag will be used for security, so remove the comment (Ray)

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 include/uapi/drm/amdgpu_drm.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index f90b453..7aab4e1 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -207,6 +207,9 @@  union drm_amdgpu_bo_list {
 #define AMDGPU_CTX_OP_QUERY_STATE	3
 #define AMDGPU_CTX_OP_QUERY_STATE2	4
 
+/* Flag the context as secure */
+#define AMDGPU_CTX_ALLOC_FLAGS_SECURE	(1 << 0)
+
 /* GPU reset status */
 #define AMDGPU_CTX_NO_RESET		0
 /* this the context caused it */
@@ -241,7 +244,6 @@  union drm_amdgpu_bo_list {
 struct drm_amdgpu_ctx_in {
 	/** AMDGPU_CTX_OP_* */
 	__u32	op;
-	/** For future use, no flags defined so far */
 	__u32	flags;
 	__u32	ctx_id;
 	/** AMDGPU_CTX_PRIORITY_* */