diff options
author | Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com> | 2022-03-02 17:16:37 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-30 14:48:39 +0000 |
commit | 6dabc23d23fde76877f4f73e7507f9ad08d6ad5c (patch) | |
tree | a4d45b52a647e0bfcbbf8344f9dd15c52bb82d99 /chip | |
parent | ec167b97e37d26c0decf0830a9aec3789760cd55 (diff) | |
download | chrome-ec-6dabc23d23fde76877f4f73e7507f9ad08d6ad5c.tar.gz |
mt_scp: Add support for mt8186 decoder
1. Add vdec ipi service interface
2. Add supported capability
3. Add ectasklist for mt8186 lat architecture
4. Separate mt8186 and mt8183 using define
5. Fix venc and mdp build error when add mt8186 driver
6. Fix cros_license_check errors
BRANCH=none
BUG=b:218771968
TEST=build corsola_scp pass
Signed-off-by: kyrie wu <kyrie.wu@mediatek.corp-partner.google.com>
Signed-off-by: Mingjia Zhang <mingjia.zhang@mediatek.corp-partner.google.com>
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.corp-partner.google.com>
Signed-off-by: Allen-kh Cheng <allen-kh.cheng@mediatek.corp-partner.google.com>
Change-Id: I9d458a8c92ee27366ae03c3386d5682f62f5693b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3379786
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
Commit-Queue: Hsin-Yi Wang <hsinyi@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/mt_scp/mt818x/build.mk | 1 | ||||
-rw-r--r-- | chip/mt_scp/mt818x/ipi.c | 5 | ||||
-rw-r--r-- | chip/mt_scp/mt818x/memmap.h | 2 | ||||
-rw-r--r-- | chip/mt_scp/mt818x/video.c | 19 | ||||
-rw-r--r-- | chip/mt_scp/mt818x/video.h | 31 |
5 files changed, 58 insertions, 0 deletions
diff --git a/chip/mt_scp/mt818x/build.mk b/chip/mt_scp/mt818x/build.mk index 39b1bce7dc..c44b2f0ebe 100644 --- a/chip/mt_scp/mt818x/build.mk +++ b/chip/mt_scp/mt818x/build.mk @@ -12,6 +12,7 @@ chip-y+=mt818x/gpio.o chip-y+=mt818x/memmap.o chip-y+=mt818x/system.o chip-y+=mt818x/uart.o +chip-y+=mt818x/video.o # Optional chip modules chip-$(CONFIG_AUDIO_CODEC_WOV)+=mt818x/audio_codec_wov.o diff --git a/chip/mt_scp/mt818x/ipi.c b/chip/mt_scp/mt818x/ipi.c index 7ae4ed12a0..723137d9c9 100644 --- a/chip/mt_scp/mt818x/ipi.c +++ b/chip/mt_scp/mt818x/ipi.c @@ -31,6 +31,7 @@ #include "task.h" #include "util.h" #include "hwtimer.h" +#include "video.h" #define CPRINTF(format, args...) cprintf(CC_IPI, format, ##args) #define CPRINTS(format, args...) cprints(CC_IPI, format, ##args) @@ -246,7 +247,11 @@ void ipi_inform_ap(void) scp_run.signaled = 1; strncpy(scp_run.fw_ver, system_get_version(EC_IMAGE_RW), SCP_FW_VERSION_LEN); +#ifdef HAVE_PRIVATE_MT8183 scp_run.dec_capability = VCODEC_CAPABILITY_4K_DISABLED; +#else + scp_run.dec_capability = video_get_dec_capability(); +#endif scp_run.enc_capability = 0; ret = ipi_send(IPI_SCP_INIT, (void *)&scp_run, sizeof(scp_run), 1); diff --git a/chip/mt_scp/mt818x/memmap.h b/chip/mt_scp/mt818x/memmap.h index b89123d57f..a3dee1710a 100644 --- a/chip/mt_scp/mt818x/memmap.h +++ b/chip/mt_scp/mt818x/memmap.h @@ -8,6 +8,8 @@ #ifndef __CROS_EC_MEMMAP_H #define __CROS_EC_MEMMAP_H +#include "stdint.h" + void scp_memmap_init(void); /** diff --git a/chip/mt_scp/mt818x/video.c b/chip/mt_scp/mt818x/video.c new file mode 100644 index 0000000000..10ea586575 --- /dev/null +++ b/chip/mt_scp/mt818x/video.c @@ -0,0 +1,19 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "common.h" +#include "video.h" + +uint32_t video_get_enc_capability(void) +{ + /* not support 4K */ + return 0; +} + +uint32_t video_get_dec_capability(void) +{ + return VDEC_CAP_MM21 | VDEC_CAP_4K_DISABLED | VDEC_CAP_H264_SLICE | + VDEC_CAP_VP8_FRAME | VDEC_CAP_VP9_FRAME; +} diff --git a/chip/mt_scp/mt818x/video.h b/chip/mt_scp/mt818x/video.h new file mode 100644 index 0000000000..feb2215cfd --- /dev/null +++ b/chip/mt_scp/mt818x/video.h @@ -0,0 +1,31 @@ +/* Copyright 2022 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __CROS_EC_VIDEO_H +#define __CROS_EC_VIDEO_H + +#include "common.h" + +/* + * Video decoder supported capability + */ +#define VDEC_CAP_4K_DISABLED BIT(4) +#define VDEC_CAP_MM21 BIT(5) +#define VDEC_CAP_MT21C BIT(6) +#define VDEC_CAP_H264_SLICE BIT(8) +#define VDEC_CAP_VP8_FRAME BIT(9) +#define VDEC_CAP_VP9_FRAME BIT(10) +#define VDEC_CAP_IRQ_IN_SCP BIT(16) + +/* + * Video encoder supported capability: + * BIT(0): enable 4K + */ +#define VENC_CAP_4K BIT(0) + +uint32_t video_get_enc_capability(void); +uint32_t video_get_dec_capability(void); + +#endif /* #ifndef __CROS_EC_VIDEO_H */ |