author | shihong.zheng <shihong.zheng@amlogic.com> | 2020-07-02 05:28:25 (GMT) |
---|---|---|
committer | Hui Zhang <hui.zhang@amlogic.com> | 2020-07-22 13:48:13 (GMT) |
commit | fc199e88480b0d209449652365f0e9501bd1da43 (patch) | |
tree | 988b0a750ab1824828b8fc08f965a730a7aec9dc | |
parent | ad56b0a56f4e2a4d3f5a3a912c36839326a95e2d (diff) | |
download | media_modules-fc199e88480b0d209449652365f0e9501bd1da43.zip media_modules-fc199e88480b0d209449652365f0e9501bd1da43.tar.gz media_modules-fc199e88480b0d209449652365f0e9501bd1da43.tar.bz2 |
vdec: set sc2 no single mode profile. [1/1]
PD#SWPL-28657
Problem:
sc2 do not support single mode.
sc2 stream mode dv freeze at first frame.
Solution:
1. add no_single in vcodec profile.
2. update wp for el to get a right buf level.
Verify:
sc2
Change-Id: I53da1855b5245e919b0ca7379f557b975a34b0dd
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
(cherry picked from commit 3360b1a2411905d15e81de423c94986f2830dd1c)
-rw-r--r-- | drivers/frame_provider/decoder/utils/vdec.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/frame_provider/decoder/utils/vdec.c b/drivers/frame_provider/decoder/utils/vdec.c index b6e66f2..ff91179 100644 --- a/drivers/frame_provider/decoder/utils/vdec.c +++ b/drivers/frame_provider/decoder/utils/vdec.c @@ -787,6 +787,11 @@ static void vdec_update_buff_status(void) } else if (input_stream_based(input)) { core->stream_buff_flag |= vdec->core_mask; } + /* slave el pre_decode_level wp update */ + if ((is_support_no_parser()) && (vdec->slave)) { + STBUF_WRITE(&vdec->slave->vbuf, set_wp, + STBUF_READ(&vdec->vbuf, get_wp)); + } } vdec_inputbuff_unlock(core, flags); } @@ -4913,6 +4918,11 @@ static struct platform_driver vdec_driver = { } }; +static struct codec_profile_t amvdec_common_profile = { + .name = "vdec_common", + .profile = "vdec" +}; + static struct codec_profile_t amvdec_input_profile = { .name = "vdec_input", .profile = "drm_framemode" @@ -4926,6 +4936,11 @@ int vdec_module_init(void) } INIT_REG_NODE_CONFIGS("media.decoder", &vdec_node, "vdec", vdec_configs, CONFIG_FOR_RW); + if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_SC2) { + amvdec_common_profile.profile = "vdec, no_single"; + } + vcodec_profile_register(&amvdec_common_profile); + vcodec_profile_register(&amvdec_input_profile); return 0; } |