From 600ff4f57b377267b53d0d1979c6a453a64b6c12 Mon Sep 17 00:00:00 2001 From: Nanxin Qin Date: Thu, 20 Dec 2018 16:59:53 +0800 Subject: [PATCH] tee: add swapping of the fw for the tee loading. [3/7] 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 --- drivers/amlogic/tee/tee.c | 4 ++-- include/linux/amlogic/tee.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/amlogic/tee/tee.c b/drivers/amlogic/tee/tee.c index 2d2e224..2e51e18 100644 --- a/drivers/amlogic/tee/tee.c +++ b/drivers/amlogic/tee/tee.c @@ -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) diff --git a/include/linux/amlogic/tee.h b/include/linux/amlogic/tee.h index 46a518c..0c62048 100644 --- a/include/linux/amlogic/tee.h +++ b/include/linux/amlogic/tee.h @@ -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__ */ -- 2.7.4