tee: add an interface for the teeload with swapping. [1/1]

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>
This commit is contained in:
Nanxin Qin
2019-01-27 01:21:20 +08:00
committed by Luke Go
parent 661a11aa46
commit a7fa141afa
2 changed files with 14 additions and 2 deletions

View 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;

View 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__ */