From: Alex Deucher <alexander.deuc...@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.deuc...@amd.com>
Reviewed-by: Huang Rui <ray.hu...@amd.com>
Signed-off-by: Huang Rui <ray.hu...@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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to