diff options
| author | Jordan Crouse <jcrouse@codeaurora.org> | 2017-05-04 13:48:20 -0600 |
|---|---|---|
| committer | Jordan Crouse <jcrouse@codeaurora.org> | 2017-05-04 14:07:05 -0600 |
| commit | b2fd7c67bc61c3ed770d2af2ba8c83eac88d7022 (patch) | |
| tree | ba39369f5f3b51b23e4bc993fa1fb2fc75ca0d8e /include | |
| parent | 2db428de0b9d4b653b8e1f9196c289e272be6121 (diff) | |
drm/msm: Support secure rendering for A5XX targets
A5XX targets support GPU rendering on secured surfaces by going
into a special secure mode to execute the commands. In secure mode
GPU rendering can only write to secure buffers that have been mapped
in an appropriately secured pagetable. In secure mode the GPU can read
both secure and unsecure buffers and the CP engine can only access
unsecured buffers (so commands do not need to be secure).
Secure buffers virtual addresses must fall into a specific range; this
is the clue to the GPU that it should use the secure pagetable
instead of the regular one. For A5XX targets that range will start
at 0xC0000000 and be 256MB in size. All secure buffers in all processes
share the same pagetable.
Add a secure address space for A5XX targets and automatically trigger
into secure mode if any buffer in the submission is marked as secure.
Change-Id: Ic0dedbad8f7168711d10928cd1894b98f908425f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/drm/msm_drm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index db65513ad656..07e6e00a89f6 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -78,6 +78,7 @@ struct drm_msm_param { #define MSM_BO_SCANOUT 0x00000001 /* scanout capable */ #define MSM_BO_GPU_READONLY 0x00000002 #define MSM_BO_PRIVILEGED 0x00000004 +#define MSM_BO_SECURE 0x00000008 /* Allocate and map as secure */ #define MSM_BO_CACHE_MASK 0x000f0000 /* cache modes */ #define MSM_BO_CACHED 0x00010000 @@ -86,6 +87,7 @@ struct drm_msm_param { #define MSM_BO_FLAGS (MSM_BO_SCANOUT | \ MSM_BO_GPU_READONLY | \ + MSM_BO_SECURE | \ MSM_BO_CACHED | \ MSM_BO_WC | \ MSM_BO_UNCACHED) |
