tee: add swapping of the fw for the tee loading. [3/7]
authorNanxin Qin <nanxin.qin@amlogic.com>
Thu, 20 Dec 2018 08:59:53 +0000 (16:59 +0800)
committerLuan Yuan <luan.yuan@amlogic.com>
Thu, 14 Mar 2019 06:11:32 +0000 (14:11 +0800)
PD#SWPL-2367

Problem:
can not playback hevc after update video fw.

Solution:
add swapping of the fw for the tee loading.

Verify:
p212,u212

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

index 2d2e224..2e51e18 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)
+int tee_load_video_fw(uint32_t index, uint32_t vdec, bool is_swap)
 {
        struct arm_smccc_res res;
        long cpu;
@@ -177,7 +177,7 @@ int tee_load_video_fw(uint32_t index, uint32_t vdec)
        }
 
        arm_smccc_smc(TEE_SMC_LOAD_VIDEO_FW,
-                       index, vdec, 0, 0, 0, 0, 0, &res);
+                       index, vdec, is_swap, 0, 0, 0, 0, &res);
 
        if (get_meson_cpu_version(MESON_CPU_VERSION_LVL_MAJOR)
                        == MESON_CPU_MAJOR_ID_G12B)
index 46a518c..0c62048 100644 (file)
@@ -20,6 +20,6 @@
 
 extern bool tee_enabled(void);
 extern int is_secload_get(void);
-extern int tee_load_video_fw(uint32_t index, uint32_t vdec);
+extern int tee_load_video_fw(uint32_t index, uint32_t vdec, bool is_swap);
 #endif /* __TEE_H__ */