blob: c28a83f478f9e90b9be85820df0365c6abc49917 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From d20b6eb3e48e56558488dbdda98875b1aed0c29f Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
3Date: Wed, 5 Dec 2018 18:13:28 -0800
4Subject: [PATCH 2/3] linux: mali_memory_secure: Add header file dma-direct.h
5
6Add dma-direct.h header, as API dma_to_phys is defined here.
7refer kernel commit ea8c64ace86647260ec4255f483e5844d62af2df
8
9Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
10Reviewed-by: Hyun Kwon <hyun.kwon@xilinx.com>
11Upstream Status: Pending
12---
13 driver/src/devicedrv/mali/linux/mali_memory_secure.c | 4 ++++
14 1 file changed, 4 insertions(+)
15
16diff --git a/driver/src/devicedrv/mali/linux/mali_memory_secure.c b/driver/src/devicedrv/mali/linux/mali_memory_secure.c
17index 2836b1b..4f55fa5 100644
18--- linux/mali_memory_secure.c
19+++ b/linux/mali_memory_secure.c
20@@ -13,7 +13,11 @@
21 #include "mali_memory_secure.h"
22 #include "mali_osk.h"
23 #include <linux/mutex.h>
24+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
25+#include <linux/dma-direct.h>
26+#else
27 #include <linux/dma-mapping.h>
28+#endif
29 #include <linux/dma-buf.h>
30
31 _mali_osk_errcode_t mali_mem_secure_attach_dma_buf(mali_mem_secure *secure_mem, u32 size, int mem_fd)
32--
332.7.4
34