vc1: supports teeload of vc1 for g12a.

PD#161616: supports teeload of vc1 for g12a.

Change-Id: I35869ed9aaf0a7d12f63cd3d5a84a531e8afe429
Signed-off-by: Nanxin Qin <nanxin.qin@amlogic.com>
This commit is contained in:
Nanxin Qin
2018-04-24 20:41:43 +08:00
committed by Dongjin Kim
parent 7e5bd674b6
commit 03030ee8d5

View File

@@ -41,6 +41,7 @@
#include <linux/amlogic/media/codec_mm/codec_mm.h>
#include <linux/amlogic/media/codec_mm/configs.h>
#include "../utils/firmware.h"
#include <linux/amlogic/tee.h>
#define DRIVER_NAME "amvdec_vc1"
#define MODULE_NAME "amvdec_vc1"
@@ -1058,12 +1059,17 @@ static s32 vvc1_init(void)
if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A)
fw_type = VIDEO_DEC_VC1_G12A;
size = get_firmware_data(fw_type, buf);
if (size < 0) {
amvdec_disable();
pr_err("get firmware fail.");
vfree(buf);
return -1;
if (get_cpu_type() >= MESON_CPU_MAJOR_ID_G12A && tee_enabled()) {
ret = tee_load_video_fw((u32)fw_type, 1);
size = 1;
} else {
size = get_firmware_data(fw_type, buf);
if (size < 0) {
amvdec_disable();
pr_err("get firmware fail.");
vfree(buf);
return -1;
}
}
if (size == 1)