aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4096-drm-amdgpu-add-UAPI-for-creating-encrypted-buffers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4096-drm-amdgpu-add-UAPI-for-creating-encrypted-buffers.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4096-drm-amdgpu-add-UAPI-for-creating-encrypted-buffers.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4096-drm-amdgpu-add-UAPI-for-creating-encrypted-buffers.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4096-drm-amdgpu-add-UAPI-for-creating-encrypted-buffers.patch
new file mode 100644
index 00000000..f03d972c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4096-drm-amdgpu-add-UAPI-for-creating-encrypted-buffers.patch
@@ -0,0 +1,39 @@
+From b665ac5a941f0d47b1cf6c1cc3777ff4f7cffac8 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Wed, 7 Aug 2019 21:43:24 -0500
+Subject: [PATCH 4096/4256] drm/amdgpu: add UAPI for creating encrypted buffers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add a flag to the GEM_CREATE ioctl to create encrypted buffers.
+Buffers with this flag set will be created with the TMZ bit set
+in the PTEs or engines accessing them. This is required in order
+to properly access the data from the engines.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Reviewed-by: Christian König <christian.koenig@amd.com>
+---
+ include/uapi/drm/amdgpu_drm.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
+index 8b3694310e44..2de868bf8266 100644
+--- a/include/uapi/drm/amdgpu_drm.h
++++ b/include/uapi/drm/amdgpu_drm.h
+@@ -146,6 +146,11 @@ extern "C" {
+ * releasing the memory
+ */
+ #define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9)
++/* Flag that BO will be encrypted and that the TMZ bit should be
++ * set in the PTEs when mapping this buffer via GPUVM or
++ * accessing it with various hw blocks
++ */
++#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10)
+
+ /* hybrid specific */
+ /* Flag that the memory allocation should be from top of domain */
+--
+2.17.1
+