[PATCH 02/14] drm/amdgpu: add UAPI for creating secure contexts (v2)
Huang, Ray
Ray.Huang at amd.com
Wed Sep 11 11:50:08 UTC 2019
From: Alex Deucher <alexander.deucher at 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 at amd.com>
Reviewed-by: Huang Rui <ray.huang at amd.com>
Signed-off-by: Huang Rui <ray.huang at amd.com>
---
include/uapi/drm/amdgpu_drm.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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_* */
--
2.7.4
More information about the dri-devel
mailing list