tee: add an interface for the teeload with swapping. [1/1]
authorNanxin Qin <nanxin.qin@amlogic.com>
Sat, 26 Jan 2019 17:21:20 +0000 (01:21 +0800)
committerNanxin Qin <nanxin.qin@amlogic.com>
Sun, 27 Jan 2019 04:26:14 +0000 (12:26 +0800)
PD#SWPL-2367

Problem:
building err and issue of compatibility.

Solution:
1. fixed building err without merging media_modules
2. add a new api tee_load_video_fw_swap

Verify:
p212,u212

Change-Id: Ifeedf2f3fa04b2427dccf2ac3940bad6860362d6
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
drivers/amlogic/tee/tee.c
include/linux/amlogic/tee.h

index 2e51e18..b10634f 100644 (file)
@@ -162,7 +162,7 @@ static CLASS_ATTR(api_version, 0644, tee_api_version_show,
  * index: firmware index
  * vdec:  vdec type(0: compatible, 1: legency vdec, 2: HEVC vdec)
  */
-int tee_load_video_fw(uint32_t index, uint32_t vdec, bool is_swap)
+static int tee_load_firmware(uint32_t index, uint32_t vdec, bool is_swap)
 {
        struct arm_smccc_res res;
        long cpu;
@@ -184,8 +184,19 @@ int tee_load_video_fw(uint32_t index, uint32_t vdec, bool is_swap)
                set_cpus_allowed_ptr(current, cpu_all_mask);
        return res.a0;
 }
+
+int tee_load_video_fw(uint32_t index, uint32_t vdec)
+{
+       return tee_load_firmware(index, vdec, false);
+}
 EXPORT_SYMBOL(tee_load_video_fw);
 
+int tee_load_video_fw_swap(uint32_t index, uint32_t vdec, bool is_swap)
+{
+       return tee_load_firmware(index, vdec, is_swap);
+}
+EXPORT_SYMBOL(tee_load_video_fw_swap);
+
 bool tee_enabled(void)
 {
        struct arm_smccc_res res;
index 0c62048..224dde5 100644 (file)
@@ -20,6 +20,7 @@
 
 extern bool tee_enabled(void);
 extern int is_secload_get(void);
-extern int tee_load_video_fw(uint32_t index, uint32_t vdec, bool is_swap);
+extern int tee_load_video_fw(uint32_t index, uint32_t vdec);
+extern int tee_load_video_fw_swap(uint32_t index, uint32_t vdec, bool is_swap);
 #endif /* __TEE_H__ */