| From d20b6eb3e48e56558488dbdda98875b1aed0c29f Mon Sep 17 00:00:00 2001 |
| From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
| Date: Wed, 5 Dec 2018 18:13:28 -0800 |
| Subject: [PATCH 2/3] linux: mali_memory_secure: Add header file dma-direct.h |
| |
| Add dma-direct.h header, as API dma_to_phys is defined here. |
| refer kernel commit ea8c64ace86647260ec4255f483e5844d62af2df |
| |
| Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> |
| Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com> |
| Upstream Status: Pending |
| --- |
| driver/src/devicedrv/mali/linux/mali_memory_secure.c | 4 ++++ |
| 1 file changed, 4 insertions(+) |
| |
| diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c b/driver/src/devicedrv/mali/linux/mali_memory_secure.c |
| index 2836b1b..4f55fa5 100644 |
| --- linux/mali_memory_secure.c |
| +++ b/linux/mali_memory_secure.c |
| @@ -13,7 +13,11 @@ |
| #include "mali_memory_secure.h" |
| #include "mali_osk.h" |
| #include <linux/mutex.h> |
| +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0) |
| +#include <linux/dma-direct.h> |
| +#else |
| #include <linux/dma-mapping.h> |
| +#endif |
| #include <linux/dma-buf.h> |
| |
| _mali_osk_errcode_t mali_mem_secure_attach_dma_buf(mali_mem_secure *secure_mem, u32 size, int mem_fd) |
| -- |
| 2.7.4 |
| |